From 83a05a4a0f4789992db6c0efe11165e4f60a0369 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 12 May 2022 07:28:46 +0000 Subject: [PATCH] CodeGen from PR 18849 in Azure/azure-rest-api-specs Fix incorrect description prefix (#18849) --- sdk/appservice/azure-mgmt-web/_meta.json | 6 +- .../azure/mgmt/web/_operations_mixin.py | 52 +- .../mgmt/web/_web_site_management_client.py | 3 +- .../azure/mgmt/web/aio/_operations_mixin.py | 52 +- .../web/aio/_web_site_management_client.py | 3 +- .../mgmt/web/v2015_04_01/_configuration.py | 12 +- .../azure/mgmt/web/v2015_04_01/_metadata.json | 4 +- .../azure/mgmt/web/v2015_04_01/_version.py | 2 +- .../_web_site_management_client.py | 12 +- .../web/v2015_04_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 10 +- ...domain_registration_provider_operations.py | 18 +- .../aio/operations/_domains_operations.py | 183 +- .../_top_level_domains_operations.py | 39 +- ...domain_registration_provider_operations.py | 39 +- .../operations/_domains_operations.py | 497 +- .../_top_level_domains_operations.py | 106 +- .../mgmt/web/v2015_08_01/_configuration.py | 12 +- .../azure/mgmt/web/v2015_08_01/_metadata.json | 4 +- .../azure/mgmt/web/v2015_08_01/_version.py | 2 +- .../_web_site_management_client.py | 12 +- .../web/v2015_08_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 10 +- ...p_service_certificate_orders_operations.py | 255 +- ...ficate_registration_provider_operations.py | 18 +- ...p_service_certificate_orders_operations.py | 655 +- ...ficate_registration_provider_operations.py | 39 +- .../mgmt/web/v2016_03_01/_configuration.py | 12 +- .../azure/mgmt/web/v2016_03_01/_metadata.json | 20 +- .../azure/mgmt/web/v2016_03_01/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2016_03_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- .../operations/_billing_meters_operations.py | 20 +- .../operations/_certificates_operations.py | 73 +- .../_deleted_web_apps_operations.py | 18 +- .../aio/operations/_diagnostics_operations.py | 302 +- .../aio/operations/_provider_operations.py | 46 +- .../operations/_recommendations_operations.py | 127 +- .../_resource_health_metadata_operations.py | 75 +- .../_web_site_management_client_operations.py | 176 +- .../operations/_billing_meters_operations.py | 45 +- .../operations/_certificates_operations.py | 198 +- .../_deleted_web_apps_operations.py | 41 +- .../operations/_diagnostics_operations.py | 809 +- .../operations/_provider_operations.py | 111 +- .../operations/_recommendations_operations.py | 303 +- .../_resource_health_metadata_operations.py | 204 +- .../_web_site_management_client_operations.py | 496 +- .../mgmt/web/v2016_08_01/_configuration.py | 12 +- .../azure/mgmt/web/v2016_08_01/_metadata.json | 4 +- .../azure/mgmt/web/v2016_08_01/_version.py | 2 +- .../_web_site_management_client.py | 12 +- .../web/v2016_08_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 10 +- .../aio/operations/_web_apps_operations.py | 3808 +++- .../operations/_web_apps_operations.py | 10133 ++++++----- .../mgmt/web/v2016_09_01/_configuration.py | 12 +- .../azure/mgmt/web/v2016_09_01/_metadata.json | 4 +- .../azure/mgmt/web/v2016_09_01/_version.py | 2 +- .../_web_site_management_client.py | 12 +- .../web/v2016_09_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 10 +- .../_app_service_environments_operations.py | 554 +- .../_app_service_plans_operations.py | 360 +- .../_app_service_environments_operations.py | 1400 +- .../_app_service_plans_operations.py | 963 +- .../mgmt/web/v2018_02_01/_configuration.py | 12 +- .../azure/mgmt/web/v2018_02_01/_metadata.json | 24 +- .../azure/mgmt/web/v2018_02_01/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2018_02_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- ...p_service_certificate_orders_operations.py | 255 +- .../_app_service_environments_operations.py | 608 +- .../_app_service_plans_operations.py | 360 +- ...ficate_registration_provider_operations.py | 18 +- .../operations/_certificates_operations.py | 73 +- .../_deleted_web_apps_operations.py | 40 +- .../aio/operations/_diagnostics_operations.py | 302 +- ...domain_registration_provider_operations.py | 18 +- .../aio/operations/_domains_operations.py | 183 +- .../aio/operations/_provider_operations.py | 46 +- .../operations/_recommendations_operations.py | 209 +- .../_resource_health_metadata_operations.py | 75 +- .../_top_level_domains_operations.py | 39 +- .../aio/operations/_web_apps_operations.py | 4512 +++-- .../_web_site_management_client_operations.py | 206 +- ...p_service_certificate_orders_operations.py | 655 +- .../_app_service_environments_operations.py | 1518 +- .../_app_service_plans_operations.py | 963 +- ...ficate_registration_provider_operations.py | 39 +- .../operations/_certificates_operations.py | 198 +- .../_deleted_web_apps_operations.py | 106 +- .../operations/_diagnostics_operations.py | 809 +- ...domain_registration_provider_operations.py | 39 +- .../operations/_domains_operations.py | 491 +- .../operations/_provider_operations.py | 111 +- .../operations/_recommendations_operations.py | 513 +- .../_resource_health_metadata_operations.py | 204 +- .../_top_level_domains_operations.py | 106 +- .../operations/_web_apps_operations.py | 11929 ++++++++----- .../_web_site_management_client_operations.py | 577 +- .../mgmt/web/v2018_11_01/_configuration.py | 12 +- .../azure/mgmt/web/v2018_11_01/_metadata.json | 4 +- .../azure/mgmt/web/v2018_11_01/_version.py | 2 +- .../_web_site_management_client.py | 12 +- .../web/v2018_11_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 10 +- .../operations/_certificates_operations.py | 73 +- .../operations/_certificates_operations.py | 198 +- .../mgmt/web/v2019_08_01/_configuration.py | 12 +- .../azure/mgmt/web/v2019_08_01/_metadata.json | 76 +- .../azure/mgmt/web/v2019_08_01/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2019_08_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- ...p_service_certificate_orders_operations.py | 295 +- .../_app_service_environments_operations.py | 600 +- .../_app_service_plans_operations.py | 389 +- ...ficate_registration_provider_operations.py | 22 +- .../operations/_certificates_operations.py | 85 +- .../_deleted_web_apps_operations.py | 46 +- .../aio/operations/_diagnostics_operations.py | 344 +- ...domain_registration_provider_operations.py | 22 +- .../aio/operations/_domains_operations.py | 217 +- .../aio/operations/_provider_operations.py | 54 +- .../operations/_recommendations_operations.py | 240 +- .../_resource_health_metadata_operations.py | 90 +- .../operations/_static_sites_operations.py | 362 +- .../_top_level_domains_operations.py | 45 +- .../aio/operations/_web_apps_operations.py | 5498 ++++-- .../_web_site_management_client_operations.py | 230 +- ...p_service_certificate_orders_operations.py | 727 +- .../_app_service_environments_operations.py | 1372 +- .../_app_service_plans_operations.py | 976 +- ...ficate_registration_provider_operations.py | 43 +- .../operations/_certificates_operations.py | 216 +- .../_deleted_web_apps_operations.py | 112 +- .../operations/_diagnostics_operations.py | 851 +- ...domain_registration_provider_operations.py | 43 +- .../operations/_domains_operations.py | 543 +- .../operations/_provider_operations.py | 119 +- .../operations/_recommendations_operations.py | 592 +- .../_resource_health_metadata_operations.py | 219 +- .../operations/_static_sites_operations.py | 918 +- .../_top_level_domains_operations.py | 112 +- .../operations/_web_apps_operations.py | 13485 +++++++++------ .../_web_site_management_client_operations.py | 583 +- .../mgmt/web/v2020_06_01/_configuration.py | 12 +- .../azure/mgmt/web/v2020_06_01/_metadata.json | 76 +- .../azure/mgmt/web/v2020_06_01/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2020_06_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- ...p_service_certificate_orders_operations.py | 295 +- .../_app_service_environments_operations.py | 600 +- .../_app_service_plans_operations.py | 389 +- ...ficate_registration_provider_operations.py | 22 +- .../operations/_certificates_operations.py | 85 +- .../_deleted_web_apps_operations.py | 46 +- .../aio/operations/_diagnostics_operations.py | 344 +- ...domain_registration_provider_operations.py | 22 +- .../aio/operations/_domains_operations.py | 217 +- .../aio/operations/_provider_operations.py | 54 +- .../operations/_recommendations_operations.py | 240 +- .../_resource_health_metadata_operations.py | 90 +- .../operations/_static_sites_operations.py | 374 +- .../_top_level_domains_operations.py | 45 +- .../aio/operations/_web_apps_operations.py | 5524 ++++-- .../_web_site_management_client_operations.py | 230 +- ...p_service_certificate_orders_operations.py | 727 +- .../_app_service_environments_operations.py | 1372 +- .../_app_service_plans_operations.py | 976 +- ...ficate_registration_provider_operations.py | 43 +- .../operations/_certificates_operations.py | 216 +- .../_deleted_web_apps_operations.py | 112 +- .../operations/_diagnostics_operations.py | 851 +- ...domain_registration_provider_operations.py | 43 +- .../operations/_domains_operations.py | 543 +- .../operations/_provider_operations.py | 119 +- .../operations/_recommendations_operations.py | 592 +- .../_resource_health_metadata_operations.py | 219 +- .../operations/_static_sites_operations.py | 952 +- .../_top_level_domains_operations.py | 112 +- .../operations/_web_apps_operations.py | 13555 +++++++++------ .../_web_site_management_client_operations.py | 583 +- .../mgmt/web/v2020_09_01/_configuration.py | 12 +- .../azure/mgmt/web/v2020_09_01/_metadata.json | 76 +- .../azure/mgmt/web/v2020_09_01/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2020_09_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- ...p_service_certificate_orders_operations.py | 295 +- .../_app_service_environments_operations.py | 600 +- .../_app_service_plans_operations.py | 389 +- ...ficate_registration_provider_operations.py | 22 +- .../operations/_certificates_operations.py | 85 +- .../_deleted_web_apps_operations.py | 46 +- .../aio/operations/_diagnostics_operations.py | 344 +- ...domain_registration_provider_operations.py | 22 +- .../aio/operations/_domains_operations.py | 217 +- .../aio/operations/_provider_operations.py | 54 +- .../operations/_recommendations_operations.py | 240 +- .../_resource_health_metadata_operations.py | 90 +- .../operations/_static_sites_operations.py | 374 +- .../_top_level_domains_operations.py | 45 +- .../aio/operations/_web_apps_operations.py | 5524 ++++-- .../_web_site_management_client_operations.py | 230 +- ...p_service_certificate_orders_operations.py | 727 +- .../_app_service_environments_operations.py | 1372 +- .../_app_service_plans_operations.py | 976 +- ...ficate_registration_provider_operations.py | 43 +- .../operations/_certificates_operations.py | 216 +- .../_deleted_web_apps_operations.py | 112 +- .../operations/_diagnostics_operations.py | 851 +- ...domain_registration_provider_operations.py | 43 +- .../operations/_domains_operations.py | 543 +- .../operations/_provider_operations.py | 119 +- .../operations/_recommendations_operations.py | 592 +- .../_resource_health_metadata_operations.py | 219 +- .../operations/_static_sites_operations.py | 952 +- .../_top_level_domains_operations.py | 112 +- .../operations/_web_apps_operations.py | 13555 +++++++++------ .../_web_site_management_client_operations.py | 583 +- .../mgmt/web/v2020_12_01/_configuration.py | 12 +- .../azure/mgmt/web/v2020_12_01/_metadata.json | 76 +- .../azure/mgmt/web/v2020_12_01/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2020_12_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- ...p_service_certificate_orders_operations.py | 295 +- .../_app_service_environments_operations.py | 708 +- .../_app_service_plans_operations.py | 389 +- ...rtificate_orders_diagnostics_operations.py | 39 +- ...ficate_registration_provider_operations.py | 22 +- .../operations/_certificates_operations.py | 87 +- .../_deleted_web_apps_operations.py | 46 +- .../aio/operations/_diagnostics_operations.py | 344 +- ...domain_registration_provider_operations.py | 22 +- .../aio/operations/_domains_operations.py | 217 +- .../_global_operations_operations.py | 46 +- .../aio/operations/_provider_operations.py | 118 +- .../operations/_recommendations_operations.py | 240 +- .../_resource_health_metadata_operations.py | 90 +- .../operations/_static_sites_operations.py | 784 +- .../_top_level_domains_operations.py | 45 +- .../aio/operations/_web_apps_operations.py | 5699 ++++-- .../_web_site_management_client_operations.py | 230 +- ...p_service_certificate_orders_operations.py | 727 +- .../_app_service_environments_operations.py | 1629 +- .../_app_service_plans_operations.py | 976 +- ...rtificate_orders_diagnostics_operations.py | 90 +- ...ficate_registration_provider_operations.py | 43 +- .../operations/_certificates_operations.py | 220 +- .../_deleted_web_apps_operations.py | 112 +- .../operations/_diagnostics_operations.py | 851 +- ...domain_registration_provider_operations.py | 43 +- .../operations/_domains_operations.py | 543 +- .../_global_operations_operations.py | 112 +- .../operations/_provider_operations.py | 271 +- .../operations/_recommendations_operations.py | 592 +- .../_resource_health_metadata_operations.py | 219 +- .../operations/_static_sites_operations.py | 1816 +- .../_top_level_domains_operations.py | 112 +- .../operations/_web_apps_operations.py | 14026 +++++++++------ .../_web_site_management_client_operations.py | 583 +- .../mgmt/web/v2021_01_01/_configuration.py | 12 +- .../azure/mgmt/web/v2021_01_01/_metadata.json | 76 +- .../azure/mgmt/web/v2021_01_01/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2021_01_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- ...p_service_certificate_orders_operations.py | 295 +- .../_app_service_environments_operations.py | 708 +- .../_app_service_plans_operations.py | 389 +- ...rtificate_orders_diagnostics_operations.py | 39 +- ...ficate_registration_provider_operations.py | 22 +- .../operations/_certificates_operations.py | 87 +- .../_deleted_web_apps_operations.py | 46 +- .../aio/operations/_diagnostics_operations.py | 344 +- ...domain_registration_provider_operations.py | 22 +- .../aio/operations/_domains_operations.py | 217 +- .../_global_operations_operations.py | 46 +- .../_kube_environments_operations.py | 105 +- .../aio/operations/_provider_operations.py | 118 +- .../operations/_recommendations_operations.py | 240 +- .../_resource_health_metadata_operations.py | 90 +- .../operations/_static_sites_operations.py | 784 +- .../_top_level_domains_operations.py | 45 +- .../aio/operations/_web_apps_operations.py | 5699 ++++-- .../_web_site_management_client_operations.py | 230 +- ...p_service_certificate_orders_operations.py | 727 +- .../_app_service_environments_operations.py | 1629 +- .../_app_service_plans_operations.py | 976 +- ...rtificate_orders_diagnostics_operations.py | 90 +- ...ficate_registration_provider_operations.py | 43 +- .../operations/_certificates_operations.py | 220 +- .../_deleted_web_apps_operations.py | 112 +- .../operations/_diagnostics_operations.py | 851 +- ...domain_registration_provider_operations.py | 43 +- .../operations/_domains_operations.py | 543 +- .../_global_operations_operations.py | 112 +- .../_kube_environments_operations.py | 236 +- .../operations/_provider_operations.py | 271 +- .../operations/_recommendations_operations.py | 592 +- .../_resource_health_metadata_operations.py | 219 +- .../operations/_static_sites_operations.py | 1816 +- .../_top_level_domains_operations.py | 112 +- .../operations/_web_apps_operations.py | 14026 +++++++++------ .../_web_site_management_client_operations.py | 583 +- .../mgmt/web/v2021_01_15/_configuration.py | 12 +- .../azure/mgmt/web/v2021_01_15/_metadata.json | 76 +- .../azure/mgmt/web/v2021_01_15/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2021_01_15/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- ...p_service_certificate_orders_operations.py | 295 +- .../_app_service_environments_operations.py | 708 +- .../_app_service_plans_operations.py | 389 +- ...rtificate_orders_diagnostics_operations.py | 39 +- ...ficate_registration_provider_operations.py | 22 +- .../operations/_certificates_operations.py | 87 +- .../_deleted_web_apps_operations.py | 46 +- .../aio/operations/_diagnostics_operations.py | 344 +- ...domain_registration_provider_operations.py | 22 +- .../aio/operations/_domains_operations.py | 217 +- .../_global_operations_operations.py | 46 +- .../_kube_environments_operations.py | 105 +- .../aio/operations/_provider_operations.py | 118 +- .../operations/_recommendations_operations.py | 240 +- .../_resource_health_metadata_operations.py | 90 +- .../operations/_static_sites_operations.py | 784 +- .../_top_level_domains_operations.py | 45 +- .../aio/operations/_web_apps_operations.py | 5749 +++++-- .../_web_site_management_client_operations.py | 230 +- .../web/v2021_01_15/models/_models_py3.py | 6 +- ...p_service_certificate_orders_operations.py | 727 +- .../_app_service_environments_operations.py | 1629 +- .../_app_service_plans_operations.py | 976 +- ...rtificate_orders_diagnostics_operations.py | 90 +- ...ficate_registration_provider_operations.py | 43 +- .../operations/_certificates_operations.py | 220 +- .../_deleted_web_apps_operations.py | 112 +- .../operations/_diagnostics_operations.py | 851 +- ...domain_registration_provider_operations.py | 43 +- .../operations/_domains_operations.py | 543 +- .../_global_operations_operations.py | 112 +- .../_kube_environments_operations.py | 236 +- .../operations/_provider_operations.py | 271 +- .../operations/_recommendations_operations.py | 592 +- .../_resource_health_metadata_operations.py | 219 +- .../operations/_static_sites_operations.py | 1816 +- .../_top_level_domains_operations.py | 112 +- .../operations/_web_apps_operations.py | 14142 +++++++++------ .../_web_site_management_client_operations.py | 583 +- .../mgmt/web/v2021_03_01/_configuration.py | 12 +- .../azure/mgmt/web/v2021_03_01/_metadata.json | 76 +- .../azure/mgmt/web/v2021_03_01/_version.py | 2 +- .../_web_site_management_client.py | 14 +- .../web/v2021_03_01/aio/_configuration.py | 12 +- .../aio/_web_site_management_client.py | 12 +- ...p_service_certificate_orders_operations.py | 291 +- .../_app_service_environments_operations.py | 708 +- .../_app_service_plans_operations.py | 389 +- ...rtificate_orders_diagnostics_operations.py | 39 +- ...ficate_registration_provider_operations.py | 22 +- .../operations/_certificates_operations.py | 87 +- .../operations/_container_apps_operations.py | 98 +- .../_container_apps_revisions_operations.py | 67 +- .../_deleted_web_apps_operations.py | 46 +- .../aio/operations/_diagnostics_operations.py | 344 +- ...domain_registration_provider_operations.py | 22 +- .../aio/operations/_domains_operations.py | 228 +- .../_global_operations_operations.py | 46 +- .../_kube_environments_operations.py | 105 +- .../aio/operations/_provider_operations.py | 118 +- .../operations/_recommendations_operations.py | 240 +- .../_resource_health_metadata_operations.py | 90 +- .../operations/_static_sites_operations.py | 784 +- .../_top_level_domains_operations.py | 45 +- .../aio/operations/_web_apps_operations.py | 5857 +++++-- .../_web_site_management_client_operations.py | 242 +- ...p_service_certificate_orders_operations.py | 723 +- .../_app_service_environments_operations.py | 1629 +- .../_app_service_plans_operations.py | 976 +- ...rtificate_orders_diagnostics_operations.py | 90 +- ...ficate_registration_provider_operations.py | 43 +- .../operations/_certificates_operations.py | 220 +- .../operations/_container_apps_operations.py | 228 +- .../_container_apps_revisions_operations.py | 175 +- .../_deleted_web_apps_operations.py | 112 +- .../operations/_diagnostics_operations.py | 851 +- ...domain_registration_provider_operations.py | 43 +- .../operations/_domains_operations.py | 575 +- .../_global_operations_operations.py | 112 +- .../_kube_environments_operations.py | 236 +- .../operations/_provider_operations.py | 271 +- .../operations/_recommendations_operations.py | 592 +- .../_resource_health_metadata_operations.py | 219 +- .../operations/_static_sites_operations.py | 1816 +- .../_top_level_domains_operations.py | 112 +- .../operations/_web_apps_operations.py | 14349 ++++++++++------ .../_web_site_management_client_operations.py | 616 +- 404 files changed, 174065 insertions(+), 95441 deletions(-) diff --git a/sdk/appservice/azure-mgmt-web/_meta.json b/sdk/appservice/azure-mgmt-web/_meta.json index 5ba0443c2c24..2e5ef863a804 100644 --- a/sdk/appservice/azure-mgmt-web/_meta.json +++ b/sdk/appservice/azure-mgmt-web/_meta.json @@ -1,11 +1,11 @@ { "autorest": "3.7.2", "use": [ - "@autorest/python@5.12.0", + "@autorest/python@5.13.0", "@autorest/modelerfour@4.19.3" ], - "commit": "cf47fa91b882618a1043e3aeb5803b3a7397cd08", + "commit": "eb2b882ef0a4aa5956ca38cfa566fc4d7cfb3fb0", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/web/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/web/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/web/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py index 75ff368216a7..321e72fc7f4b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py @@ -30,13 +30,13 @@ def check_name_availability( # type: (...) -> "_models.ResourceNameAvailability" """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2021_03_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -79,7 +79,7 @@ def get_publishing_user( # type: (...) -> "_models.User" """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -123,7 +123,7 @@ def get_source_control( # type: (...) -> "_models.SourceControl" """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -168,7 +168,7 @@ def get_subscription_deployment_locations( # type: (...) -> "_models.DeploymentLocations" """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -213,11 +213,11 @@ def list_billing_meters( # type: (...) -> Iterable["_models.BillingMeterCollection"] """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -292,18 +292,18 @@ def list_geo_regions( # type: (...) -> Iterable["_models.GeoRegionCollection"] """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2021_03_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -346,7 +346,7 @@ def list_premier_add_on_offers( # type: (...) -> Iterable["_models.PremierAddOnOfferCollection"] """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -392,7 +392,7 @@ def list_site_identifiers_assigned_to_host_name( # type: (...) -> Iterable["_models.IdentifierCollection"] """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier @@ -438,7 +438,7 @@ def list_skus( # type: (...) -> "_models.SkuInfos" """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -481,7 +481,7 @@ def list_source_controls( # type: (...) -> Iterable["_models.SourceControlCollection"] """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -519,7 +519,7 @@ def list_source_controls( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.list_source_controls(**kwargs) - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name, # type: str move_resource_envelope, # type: "_models.CsmMoveResourceEnvelope" @@ -528,7 +528,7 @@ def move( # type: (...) -> None """Move resources between resource groups. - Description for 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 @@ -576,7 +576,7 @@ def update_publishing_user( # type: (...) -> "_models.User" """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2021_03_01.models.User @@ -623,7 +623,7 @@ def update_source_control( # type: (...) -> "_models.SourceControl" """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -672,7 +672,7 @@ def validate( # type: (...) -> "_models.ValidateResponse" """Validate if a resource can be created. - Description for 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 @@ -746,7 +746,7 @@ def validate_container_settings( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.validate_container_settings(resource_group_name, validate_container_settings_request, **kwargs) - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name, # type: str move_resource_envelope, # type: "_models.CsmMoveResourceEnvelope" @@ -755,7 +755,7 @@ def validate_move( # type: (...) -> None """Validate whether a resource can be moved. - Description for 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 @@ -804,8 +804,8 @@ def verify_hosting_environment_vnet( """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. + 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.v2021_03_01.models.VnetParameters diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py index 02380881af2f..90d265625878 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py @@ -11,10 +11,11 @@ from typing import TYPE_CHECKING +from msrest import Deserializer, Serializer + from azure.mgmt.core import ARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin -from msrest import Deserializer, Serializer from ._configuration import WebSiteManagementClientConfiguration from ._operations_mixin import WebSiteManagementClientOperationsMixin diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py index 200341d7413a..7389f813d309 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_operations_mixin.py @@ -25,13 +25,13 @@ async def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2021_03_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -73,7 +73,7 @@ async def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -116,7 +116,7 @@ async def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -160,7 +160,7 @@ async def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -204,11 +204,11 @@ def list_billing_meters( ) -> AsyncIterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -282,18 +282,18 @@ def list_geo_regions( ) -> AsyncIterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2021_03_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -336,7 +336,7 @@ def list_premier_add_on_offers( ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -381,7 +381,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> AsyncIterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier @@ -427,7 +427,7 @@ async def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -469,7 +469,7 @@ def list_source_controls( ) -> AsyncIterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -507,7 +507,7 @@ def list_source_controls( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return mixin_instance.list_source_controls(**kwargs) - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -515,7 +515,7 @@ async def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -562,7 +562,7 @@ async def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2021_03_01.models.User @@ -608,7 +608,7 @@ async def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -656,7 +656,7 @@ async def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -729,7 +729,7 @@ async def validate_container_settings( mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) return await mixin_instance.validate_container_settings(resource_group_name, validate_container_settings_request, **kwargs) - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -737,7 +737,7 @@ async def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -785,8 +785,8 @@ async def verify_hosting_environment_vnet( """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. + 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.v2021_03_01.models.VnetParameters diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py index 83bcd3afca09..a2a1738ab267 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/aio/_web_site_management_client.py @@ -11,10 +11,11 @@ from typing import Any, Optional, TYPE_CHECKING +from msrest import Deserializer, Serializer + from azure.mgmt.core import AsyncARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin -from msrest import Deserializer, Serializer from ._configuration import WebSiteManagementClientConfiguration from ._operations_mixin import WebSiteManagementClientOperationsMixin diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_configuration.py index 17ee6774876c..1bb5c1ce7dad 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2015-04-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2015-04-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_metadata.json index 74394878c7ed..2e24cbefcc5d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_web_site_management_client.py index 510ec8c582aa..d774e4311a21 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -36,8 +37,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2015-04-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -63,7 +67,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_configuration.py index 99711a6d2060..c6566433d3e2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2015-04-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2015-04-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_web_site_management_client.py index 55b6d18f78eb..2b6294d2d3d9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -36,8 +37,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2015-04-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domain_registration_provider_operations.py index 357d73d39440..e0a2f09cf2f4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_04_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -111,4 +117,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domains_operations.py index 9457ed3a118c..3a478a6cfacc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -98,7 +103,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -116,6 +121,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_04_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -126,6 +133,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -135,6 +143,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -152,7 +161,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -165,7 +178,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -187,15 +200,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -209,7 +229,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -231,6 +251,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_04_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -244,6 +265,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -256,6 +278,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -275,7 +298,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -288,7 +315,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -308,6 +335,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_04_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -319,6 +348,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -329,6 +359,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -346,7 +377,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -359,7 +394,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -387,17 +422,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -411,7 +453,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -427,6 +469,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -435,6 +478,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -442,7 +486,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -460,7 +508,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -494,8 +542,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2015_04_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -507,6 +556,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -531,13 +581,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -566,18 +615,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -587,7 +643,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -619,6 +675,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -627,6 +684,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -634,7 +692,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -652,7 +714,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -677,6 +739,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -689,6 +753,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -700,6 +765,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -717,7 +783,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -730,7 +800,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -761,18 +831,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -786,7 +863,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -823,6 +900,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -832,6 +910,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -839,7 +918,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -853,11 +936,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -885,18 +968,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -906,7 +996,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -943,6 +1033,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -952,6 +1043,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -959,7 +1051,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -973,11 +1069,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1002,17 +1098,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1023,5 +1126,5 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_top_level_domains_operations.py index 5ce0db864496..a1999dc7836b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_04_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -111,7 +118,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -136,16 +143,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -159,7 +173,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -184,6 +198,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_04_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -198,6 +213,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -211,6 +227,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -230,7 +247,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -243,4 +264,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domain_registration_provider_operations.py index 8264d0103af9..a6aacd0b668c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_04_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -136,4 +145,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domains_operations.py index 9caec194002b..60be4b986e06 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-04-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-04-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-04-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,27 +295,28 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -325,35 +330,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-04-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -366,31 +371,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -402,10 +408,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -413,21 +420,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -442,12 +449,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-04-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -455,23 +462,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,9 +492,10 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -495,16 +503,16 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -519,12 +527,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-04-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -532,23 +540,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -561,31 +569,32 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -634,12 +643,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -647,7 +658,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -661,7 +676,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -678,6 +693,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_04_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -688,6 +705,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -697,6 +715,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -714,7 +733,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -727,7 +750,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -749,15 +772,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -771,7 +801,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -793,6 +823,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_04_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -806,6 +837,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -818,6 +850,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -837,7 +870,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -850,7 +887,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -869,6 +906,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_04_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -880,6 +919,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -890,6 +930,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -907,7 +948,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -920,7 +965,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -948,17 +993,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -972,7 +1024,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -988,6 +1040,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -996,6 +1049,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1003,7 +1057,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1021,7 +1079,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1054,8 +1112,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2015_04_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1067,6 +1126,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1091,13 +1151,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1126,18 +1185,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1147,7 +1213,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1179,6 +1245,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1187,6 +1254,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1194,7 +1262,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1212,7 +1284,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1237,6 +1309,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_04_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1249,6 +1323,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1260,6 +1335,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1277,7 +1353,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1290,7 +1370,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1321,18 +1401,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1346,7 +1433,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1383,6 +1470,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1392,6 +1480,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1399,7 +1488,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1413,11 +1506,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1445,18 +1538,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1466,7 +1566,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1503,6 +1603,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1512,6 +1613,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1519,7 +1621,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1533,11 +1639,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1562,17 +1668,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1583,5 +1696,5 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_top_level_domains_operations.py index e30b67bfa44a..93c21c7f9982 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_04_01/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-04-01" + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-04-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_04_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -219,7 +229,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -244,16 +254,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-04-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -267,7 +284,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -292,6 +309,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_04_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-04-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -306,6 +324,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -319,6 +338,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -338,7 +358,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -351,4 +375,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_configuration.py index c973970af8ee..cce0d89a9945 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2015-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2015-08-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_metadata.json index 76d9d758cea5..7a4b3422b10d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_web_site_management_client.py index ba33d06d92b1..05f7c60fc8ad 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -35,8 +36,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2015-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -61,7 +65,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_configuration.py index 8864617dfe23..5af3f7ed28b9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2015-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2015-08-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_web_site_management_client.py index 9e33c525af66..69aed39662f8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -35,8 +36,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2015-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_app_service_certificate_orders_operations.py index 81f0dddc5f70..9f583eceaad7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,10 +120,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any @@ -139,12 +146,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -152,7 +161,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -162,7 +175,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -184,6 +197,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -195,6 +210,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -205,6 +221,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -222,7 +239,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -235,7 +256,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -263,17 +284,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -287,7 +315,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -303,6 +331,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -311,6 +340,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -318,7 +348,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -336,7 +370,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -372,8 +406,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -385,6 +420,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -409,13 +445,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -440,17 +475,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -460,7 +502,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -493,6 +535,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -501,6 +544,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -508,7 +552,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -526,7 +574,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -551,6 +599,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -563,6 +613,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -574,6 +625,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -591,7 +643,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -604,7 +660,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -635,18 +691,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -660,7 +723,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -677,6 +740,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -686,6 +750,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -693,7 +758,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -711,7 +780,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -749,8 +818,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -763,6 +833,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -787,13 +858,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -821,18 +891,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -842,7 +919,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -878,6 +955,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -887,6 +965,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -894,7 +973,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -912,11 +995,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -945,6 +1028,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -953,6 +1037,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -960,7 +1045,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -970,11 +1059,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1003,6 +1092,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1011,6 +1101,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1018,7 +1109,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1028,11 +1123,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1057,17 +1152,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1077,11 +1179,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1109,6 +1211,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1117,6 +1220,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1124,7 +1228,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1134,7 +1242,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1166,6 +1274,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1174,6 +1283,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1181,7 +1291,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1195,11 +1309,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1224,17 +1338,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1244,7 +1365,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1273,17 +1394,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1297,7 +1425,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1326,17 +1454,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1350,5 +1485,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_certificate_registration_provider_operations.py index 067cc9605a1f..e32d2f26f7d8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2015_08_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -111,4 +117,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_app_service_certificate_orders_operations.py index a83f6b7df2dc..d0635fbf1a93 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,31 +68,31 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -103,30 +104,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,31 +139,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -175,35 +178,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -216,25 +219,26 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -289,31 +293,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -325,10 +330,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -336,21 +342,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -365,12 +371,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -378,23 +384,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -408,9 +414,10 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -418,16 +425,16 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -442,12 +449,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -455,23 +462,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -487,33 +494,33 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -529,33 +536,33 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -568,25 +575,26 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -600,33 +608,33 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -642,35 +650,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2015-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -683,25 +691,26 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -712,31 +721,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -747,35 +757,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -813,6 +824,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -823,6 +836,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -832,6 +846,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -849,7 +864,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -862,10 +881,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any @@ -888,12 +907,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -901,7 +922,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -911,7 +936,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -933,6 +958,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -944,6 +971,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -954,6 +982,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -971,7 +1000,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -984,7 +1017,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1012,17 +1045,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1036,7 +1076,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1052,6 +1092,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1060,6 +1101,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1067,7 +1109,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1085,7 +1131,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1121,8 +1167,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1134,6 +1181,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1158,13 +1206,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1189,17 +1236,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1209,7 +1263,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1242,6 +1296,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1250,6 +1305,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1257,7 +1313,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1275,7 +1335,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1300,6 +1360,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1312,6 +1374,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1323,6 +1386,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1340,7 +1404,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1353,7 +1421,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1384,18 +1452,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1409,7 +1484,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1426,6 +1501,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1435,6 +1511,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1442,7 +1519,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1460,7 +1541,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1498,8 +1579,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2015_08_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1512,6 +1594,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1536,13 +1619,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1570,18 +1652,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1591,7 +1680,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1627,6 +1716,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1636,6 +1726,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1643,7 +1734,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1661,11 +1756,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1694,6 +1789,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1702,6 +1798,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1709,7 +1806,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1719,11 +1820,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1752,6 +1853,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1760,6 +1862,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1767,7 +1870,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1777,11 +1884,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1806,17 +1913,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1826,11 +1940,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1858,6 +1972,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1866,6 +1981,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1873,7 +1989,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1883,7 +2003,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1915,6 +2035,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1923,6 +2044,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1930,7 +2052,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1944,11 +2070,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1973,17 +2099,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1993,7 +2126,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2022,17 +2155,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2046,7 +2186,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2075,17 +2215,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2099,5 +2246,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_certificate_registration_provider_operations.py index 480eaad3bd2a..45370db2ad7c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2015_08_01/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2015-08-01" + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2015_08_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2015-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -136,4 +145,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_configuration.py index b0f956355a91..c0b6a2c6bb63 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2016-03-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2016-03-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_metadata.json index 72317015c76e..4b2ab2212c44 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -172,12 +172,12 @@ "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2016_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, @@ -196,12 +196,12 @@ "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled" }, @@ -255,12 +255,12 @@ }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" @@ -279,12 +279,12 @@ }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2016_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_web_site_management_client.py index 42c311c5b418..8bdf8266ed4a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar certificates: CertificatesOperations operations @@ -44,8 +45,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2016-03-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -73,7 +77,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_configuration.py index 80201c4ea707..37c656b7fef0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2016-03-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2016-03-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_web_site_management_client.py index 2d440cf8f1fe..38c7e0eb6144 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar certificates: CertificatesOperations operations @@ -44,8 +45,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2016-03-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_billing_meters_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_billing_meters_operations.py index 6f466d767ca9..fcd0330d074a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_billing_meters_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_billing_meters_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -56,7 +54,7 @@ def list( Gets a list of meters for a given location. - :param billing_location: Azure Location of billable resource. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -65,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -75,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, template_url=self.list.metadata['url'], ) @@ -85,6 +86,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, template_url=next_link, ) @@ -103,7 +105,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -116,4 +122,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_certificates_operations.py index 3e5f949d6e72..5821985fd7bc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -111,7 +118,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -132,6 +139,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -143,6 +152,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -153,6 +163,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -170,7 +181,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -183,7 +198,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -211,17 +226,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -235,7 +257,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -267,6 +289,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -275,6 +298,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -282,7 +306,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -296,11 +324,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -325,17 +353,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -345,7 +380,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -377,6 +412,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -385,6 +421,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -392,7 +429,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -406,5 +447,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_deleted_web_apps_operations.py index 7bfbe56de0a8..36b588df781b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -62,6 +60,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +72,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -111,4 +117,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_diagnostics_operations.py index 91ffc802ebda..517d1b787e54 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -122,7 +129,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -145,11 +152,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -162,12 +169,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -176,7 +186,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -190,7 +204,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -215,6 +229,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -227,6 +243,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -238,6 +255,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -255,7 +273,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -268,7 +290,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -291,11 +313,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -308,12 +330,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -322,7 +347,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -336,7 +365,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -361,6 +390,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -373,6 +404,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -384,6 +416,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -401,7 +434,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -414,7 +451,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -445,18 +482,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -470,7 +514,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -498,6 +542,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -511,6 +557,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -523,6 +570,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -540,7 +588,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -553,7 +605,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -587,6 +639,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -594,12 +648,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -613,7 +672,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -640,11 +699,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -657,6 +716,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -664,6 +725,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -672,7 +734,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -686,7 +752,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -714,6 +780,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -727,6 +795,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -739,6 +808,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -756,7 +826,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -769,7 +843,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -799,6 +873,8 @@ def get_site_detector( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -813,6 +889,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) @@ -826,6 +903,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -843,7 +921,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -856,7 +938,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async async def execute_site_detector( @@ -882,11 +964,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -899,6 +981,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -906,6 +990,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -914,7 +999,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -928,7 +1017,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -956,6 +1045,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -969,6 +1060,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -981,6 +1073,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -998,7 +1091,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1011,7 +1108,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1037,11 +1134,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1054,6 +1151,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1061,6 +1160,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1069,7 +1169,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1083,7 +1187,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1111,6 +1215,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1124,6 +1230,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1136,6 +1243,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1153,7 +1261,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1166,7 +1278,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1200,6 +1312,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1207,12 +1321,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1226,7 +1345,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1257,6 +1376,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1271,6 +1392,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1284,6 +1406,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1301,7 +1424,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1441,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1351,6 +1478,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1359,12 +1488,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1378,7 +1512,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1408,11 +1542,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1425,6 +1559,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1433,6 +1569,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1441,7 +1578,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1455,7 +1596,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1486,6 +1627,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1500,6 +1643,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1513,6 +1657,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1530,7 +1675,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1543,7 +1692,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -1576,6 +1725,8 @@ def get_site_detector_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1591,6 +1742,7 @@ def prepare_request(next_link=None): detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) @@ -1605,6 +1757,7 @@ def prepare_request(next_link=None): detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1622,7 +1775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1635,7 +1792,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async async def execute_site_detector_slot( @@ -1664,11 +1821,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1681,6 +1838,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1689,6 +1848,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1697,7 +1857,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1711,5 +1875,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_provider_operations.py index f3664a46e356..5e00fde0247f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -56,7 +54,7 @@ def get_available_stacks( Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2016_03_01.models.Enum0 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -134,6 +140,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -143,6 +151,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -151,6 +160,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -168,7 +178,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -181,7 +195,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -193,7 +207,7 @@ def get_available_stacks_on_prem( Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2016_03_01.models.Enum1 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -202,6 +216,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -212,6 +228,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -222,6 +239,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -240,7 +258,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -253,4 +275,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_recommendations_operations.py index cac9dd727651..4e60bb7ee61c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,7 +61,7 @@ def list( :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]. + '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -124,10 +131,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: @@ -146,15 +153,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -164,11 +178,11 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any @@ -190,16 +204,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -209,7 +230,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -230,7 +251,7 @@ def list_history_for_web_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]. + '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -239,6 +260,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -251,6 +274,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], ) @@ -263,6 +287,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -281,7 +306,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -294,7 +323,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -317,7 +346,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -326,6 +355,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -338,6 +369,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -351,6 +383,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -370,7 +403,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -383,10 +420,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -411,17 +448,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -431,11 +475,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -460,17 +504,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -480,7 +531,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -504,10 +555,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -520,12 +571,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -533,7 +587,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -547,11 +605,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -579,18 +637,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -600,5 +665,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_resource_health_metadata_operations.py index 86fb1ed0c171..1fc803384e87 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -133,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -209,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -221,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -232,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -249,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -263,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -291,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -316,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -344,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -357,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -369,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -386,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -400,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -431,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -457,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_web_site_management_client_operations.py index 03cf82422995..4a11ed33d2a5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -67,7 +73,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -93,11 +99,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -105,7 +113,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -119,7 +131,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -138,6 +150,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -147,6 +161,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -155,6 +170,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +205,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -210,15 +230,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -232,7 +259,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -261,12 +288,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -274,7 +303,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -288,7 +321,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -307,7 +340,7 @@ async def check_name_availability( :type name: str :param type: Resource type used for verification. :type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -320,6 +353,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -327,6 +361,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -334,7 +369,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -348,7 +387,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace_async @@ -371,15 +410,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -393,7 +439,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -407,10 +453,10 @@ def list_geo_regions( Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -418,6 +464,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -428,6 +476,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, template_url=self.list_geo_regions.metadata['url'], @@ -439,6 +488,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, template_url=next_link, @@ -458,7 +508,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -471,7 +525,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -492,6 +546,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -505,6 +560,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -517,6 +573,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -536,7 +593,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -549,7 +610,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -567,6 +628,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_03_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -577,6 +640,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -586,6 +650,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -603,7 +668,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -616,7 +685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -638,15 +707,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -660,7 +736,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -688,12 +764,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -701,7 +779,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -715,11 +797,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -744,6 +826,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -751,6 +834,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -758,7 +842,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -768,7 +856,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -797,6 +885,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -804,6 +893,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -811,7 +901,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -825,11 +919,11 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -854,6 +948,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -861,6 +956,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -868,7 +964,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -878,5 +978,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_billing_meters_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_billing_meters_operations.py index e64f7d56a622..10da83c25717 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_billing_meters_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_billing_meters_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -32,31 +32,32 @@ def build_list_request( billing_location: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -92,7 +93,7 @@ def list( Gets a list of meters for a given location. - :param billing_location: Azure Location of billable resource. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -100,6 +101,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -110,6 +113,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, template_url=self.list.metadata['url'], ) @@ -120,6 +124,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, template_url=next_link, ) @@ -138,7 +143,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -151,4 +160,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_certificates_operations.py index 600ca068a1f3..696023194e43 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -135,35 +138,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,25 +179,26 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -208,35 +212,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -279,6 +283,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -289,6 +295,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -298,6 +305,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -315,7 +323,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -328,7 +340,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -348,6 +360,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -359,6 +373,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -369,6 +384,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -386,7 +402,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -399,7 +419,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -427,17 +447,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -451,7 +478,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -483,6 +510,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -491,6 +519,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -498,7 +527,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -512,11 +545,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -541,17 +574,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -561,7 +601,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -593,6 +633,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -601,6 +642,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -608,7 +650,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -622,5 +668,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_deleted_web_apps_operations.py index 9b56ffcedf70..824ce47143b3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -94,6 +95,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -104,6 +107,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -113,6 +117,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -130,7 +135,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -143,4 +152,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_diagnostics_operations.py index df5d76305550..f29d04f49383 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1033,7 +1063,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1056,11 +1086,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1073,12 +1103,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1087,7 +1120,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1101,7 +1138,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1126,6 +1163,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1138,6 +1177,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1149,6 +1189,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1166,7 +1207,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1179,7 +1224,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1202,11 +1247,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1219,12 +1264,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1233,7 +1281,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1247,7 +1299,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1272,6 +1324,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1284,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1295,6 +1350,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1312,7 +1368,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1325,7 +1385,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1356,18 +1416,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1381,7 +1448,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1409,6 +1476,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1422,6 +1491,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1434,6 +1504,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1451,7 +1522,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1464,7 +1539,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1498,6 +1573,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1505,12 +1582,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1524,7 +1606,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1551,11 +1633,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1568,6 +1650,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1575,6 +1659,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1583,7 +1668,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1597,7 +1686,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1625,6 +1714,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1638,6 +1729,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1650,6 +1742,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1667,7 +1760,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1680,7 +1777,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1710,6 +1807,8 @@ def get_site_detector( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1724,6 +1823,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) @@ -1737,6 +1837,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1754,7 +1855,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1767,7 +1872,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace def execute_site_detector( @@ -1793,11 +1898,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1810,6 +1915,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1817,6 +1924,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1825,7 +1933,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1839,7 +1951,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1867,6 +1979,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1880,6 +1994,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1892,6 +2007,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1909,7 +2025,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1922,7 +2042,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1948,11 +2068,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1965,6 +2085,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1972,6 +2094,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1980,7 +2103,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1994,7 +2121,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2022,6 +2149,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2035,6 +2164,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2047,6 +2177,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2064,7 +2195,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2077,7 +2212,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2111,6 +2246,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2118,12 +2255,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2137,7 +2279,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2168,6 +2310,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2182,6 +2326,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2195,6 +2340,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2212,7 +2358,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2225,7 +2375,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2262,6 +2412,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2270,12 +2422,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2289,7 +2446,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2319,11 +2476,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2336,6 +2493,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2344,6 +2503,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2352,7 +2512,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2366,7 +2530,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2397,6 +2561,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2411,6 +2577,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2424,6 +2591,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2441,7 +2609,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2454,7 +2626,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2487,6 +2659,8 @@ def get_site_detector_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2502,6 +2676,7 @@ def prepare_request(next_link=None): detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) @@ -2516,6 +2691,7 @@ def prepare_request(next_link=None): detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2533,7 +2709,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2546,7 +2726,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace def execute_site_detector_slot( @@ -2575,11 +2755,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2592,6 +2772,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2600,6 +2782,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2608,7 +2791,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2622,5 +2809,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_provider_operations.py index 57c0899ccc76..2b9750a836f5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum0"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,24 +59,25 @@ def build_get_available_stacks_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -86,31 +88,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum1"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -146,7 +149,7 @@ def get_available_stacks( Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2016_03_01.models.Enum0 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -155,6 +158,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +169,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -173,6 +179,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -191,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -204,7 +215,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -223,6 +234,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -232,6 +245,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -240,6 +254,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +272,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -270,7 +289,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -282,7 +301,7 @@ def get_available_stacks_on_prem( Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2016_03_01.models.Enum1 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -291,6 +310,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -301,6 +322,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -311,6 +333,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -329,7 +352,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -342,4 +369,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_recommendations_operations.py index 32f70cb0e9ad..d59662733e90 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,23 +69,24 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -94,24 +96,25 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -124,33 +127,34 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -164,35 +168,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -203,25 +208,26 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -232,25 +238,26 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -265,10 +272,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -276,25 +284,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -306,9 +314,10 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -316,16 +325,16 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -367,7 +376,7 @@ def list( :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]. + '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -376,6 +385,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -386,6 +397,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -397,6 +409,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -416,7 +429,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -429,10 +446,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: @@ -451,15 +468,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -469,11 +493,11 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any @@ -495,16 +519,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -514,7 +545,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -535,7 +566,7 @@ def list_history_for_web_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]. + '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -544,6 +575,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -556,6 +589,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], ) @@ -568,6 +602,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -586,7 +621,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -599,7 +638,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -622,7 +661,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -631,6 +670,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -643,6 +684,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -656,6 +698,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -675,7 +718,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -688,10 +735,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -716,17 +763,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -736,11 +790,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -765,17 +819,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -785,7 +846,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -809,10 +870,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -825,12 +886,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -838,7 +902,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -852,11 +920,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -884,18 +952,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -905,5 +980,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_resource_health_metadata_operations.py index bce65c6c14c3..a87cf9c5d3a7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -342,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -353,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -363,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -380,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -394,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -418,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -430,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -441,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -458,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -472,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -500,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -525,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -553,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -566,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -578,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -595,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -609,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -640,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -666,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_web_site_management_client_operations.py index aa9dee3d7797..68fdc6cb4bc5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_03_01/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -226,29 +229,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -260,33 +264,34 @@ def build_list_geo_regions_request( linux_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,33 +303,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -335,29 +340,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -366,29 +372,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-03-01" + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -400,33 +407,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -441,32 +448,32 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -481,34 +488,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -523,32 +530,32 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-03-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -576,14 +583,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -597,7 +611,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -623,11 +637,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -635,7 +651,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -649,7 +669,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -668,6 +688,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -677,6 +699,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -685,6 +708,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -702,7 +726,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -715,7 +743,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -740,15 +768,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -762,7 +797,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -791,12 +826,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -804,7 +841,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -818,7 +859,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -837,7 +878,7 @@ def check_name_availability( :type name: str :param type: Resource type used for verification. :type type: str or ~azure.mgmt.web.v2016_03_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -850,6 +891,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -857,6 +899,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -864,7 +907,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -878,7 +925,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -901,15 +948,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -923,7 +977,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -937,16 +991,18 @@ def list_geo_regions( Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2016_03_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -957,6 +1013,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, template_url=self.list_geo_regions.metadata['url'], @@ -968,6 +1025,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, template_url=next_link, @@ -987,7 +1045,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1000,7 +1062,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1020,6 +1082,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1033,6 +1096,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1045,6 +1109,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1064,7 +1129,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1077,7 +1146,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1095,6 +1164,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_03_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1105,6 +1176,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1114,6 +1186,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1131,7 +1204,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1144,7 +1221,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1166,15 +1243,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1188,7 +1272,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1216,12 +1300,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1229,7 +1315,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1243,11 +1333,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1272,6 +1362,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1279,6 +1370,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1286,7 +1378,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1296,7 +1392,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1325,6 +1421,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1332,6 +1429,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1339,7 +1437,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1353,11 +1455,11 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1382,6 +1484,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1389,6 +1492,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1396,7 +1500,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1406,5 +1514,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py index 45af61b927cf..aa583cd88e67 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2016-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2016-08-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_metadata.json index de815525b3b9..0c4f0648b1ac 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_web_site_management_client.py index 879889853643..aa40cc3482da 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -31,8 +32,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2016-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -56,7 +60,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_configuration.py index 592b540b5206..ad9dacc52a46 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2016-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2016-08-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_web_site_management_client.py index aec5728062a8..f34713fc9039 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -31,8 +32,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2016-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/operations/_web_apps_operations.py index d7330f4e3202..bc6b03c394cc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -136,6 +143,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -147,6 +156,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -158,6 +168,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -176,7 +187,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -189,7 +204,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -217,17 +232,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -243,7 +265,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -259,6 +281,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -267,6 +290,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -274,7 +298,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -292,7 +320,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -328,8 +356,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -341,6 +370,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -365,13 +395,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -387,10 +416,10 @@ async def delete( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -403,11 +432,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -415,7 +447,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -425,7 +461,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -460,6 +496,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -468,6 +505,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -475,7 +513,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -493,7 +535,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -512,7 +554,7 @@ async def analyze_custom_hostname( :type resource_group_name: str :param name: Name of web app. :type name: str - :param host_name: Custom hostname. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -525,18 +567,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -550,11 +599,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -582,6 +631,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -590,6 +640,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -597,7 +648,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -607,7 +662,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -640,6 +695,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -648,6 +704,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -655,7 +712,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,7 +730,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -694,6 +755,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -706,6 +769,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -717,6 +781,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -734,7 +799,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -747,7 +816,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def discover_restore( @@ -779,6 +848,7 @@ async def discover_restore( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -787,6 +857,7 @@ async def discover_restore( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_restore.metadata['url'], @@ -794,7 +865,11 @@ async def discover_restore( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -808,7 +883,7 @@ async def discover_restore( return deserialized - discover_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover'} # type: ignore + discover_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover"} # type: ignore @distributed_trace_async @@ -840,18 +915,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -865,11 +947,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -897,18 +979,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -918,7 +1007,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -957,6 +1046,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -966,6 +1056,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -973,7 +1064,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -987,7 +1082,7 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore async def _restore_initial( @@ -1004,6 +1099,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -1013,6 +1109,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -1020,7 +1117,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1135,7 @@ async def _restore_initial( return deserialized - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async @@ -1071,8 +1172,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.RestoreResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -1085,6 +1187,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1109,10 +1212,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations( @@ -1136,6 +1238,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1148,6 +1252,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1159,6 +1264,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1176,7 +1282,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1189,7 +1299,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1220,6 +1330,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1228,6 +1339,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1235,7 +1347,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1249,7 +1365,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1278,17 +1394,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1302,7 +1425,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1334,6 +1457,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1342,6 +1466,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1349,7 +1474,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1363,7 +1492,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1392,17 +1521,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1416,7 +1552,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1448,6 +1584,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -1456,6 +1593,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -1463,7 +1601,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1477,11 +1619,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1506,17 +1648,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1526,7 +1675,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -1555,17 +1704,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1579,7 +1735,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace_async @@ -1611,6 +1767,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -1619,6 +1776,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -1626,7 +1784,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1640,7 +1802,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -1669,17 +1831,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1693,7 +1862,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -1722,17 +1891,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1746,7 +1922,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -1779,6 +1955,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -1787,6 +1964,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -1794,7 +1972,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1808,7 +1990,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -1840,6 +2022,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -1848,6 +2031,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -1855,7 +2039,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1869,7 +2057,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -1898,17 +2086,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1922,7 +2117,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -1937,17 +2132,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1961,7 +2163,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -1991,7 +2193,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2002,6 +2205,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2025,10 +2229,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2059,6 +2262,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2067,6 +2271,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2074,7 +2279,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2088,7 +2297,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2117,17 +2326,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2141,7 +2357,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2170,17 +2386,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2194,7 +2417,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2228,6 +2451,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -2236,6 +2460,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -2243,7 +2468,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2257,7 +2486,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2288,17 +2517,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2312,7 +2548,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2344,6 +2580,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2352,6 +2589,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -2359,7 +2597,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2373,7 +2615,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2405,6 +2647,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2413,6 +2656,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -2420,7 +2664,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2434,7 +2682,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -2461,6 +2709,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2473,6 +2723,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -2484,6 +2735,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2501,7 +2753,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2514,7 +2770,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -2545,18 +2801,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2570,11 +2833,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2602,18 +2865,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2623,7 +2893,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -2652,17 +2922,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -2678,7 +2955,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -2707,17 +2984,24 @@ async def get_web_site_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_site_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -2733,7 +3017,7 @@ async def get_web_site_container_logs_zip( return deserialized - get_web_site_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_web_site_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -2758,6 +3042,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2770,6 +3056,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -2781,6 +3068,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2798,7 +3086,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2811,7 +3103,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -2842,18 +3134,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2869,11 +3168,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2901,18 +3200,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -2922,11 +3228,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2954,18 +3260,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2975,11 +3288,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3007,18 +3320,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3028,7 +3348,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3053,6 +3373,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3065,6 +3387,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3076,6 +3399,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3093,7 +3417,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3106,7 +3434,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3137,18 +3465,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3162,7 +3497,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3197,6 +3532,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -3206,6 +3542,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -3213,7 +3550,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3227,11 +3568,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3259,18 +3600,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3280,7 +3628,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3313,18 +3661,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3338,7 +3693,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -3363,6 +3718,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3375,6 +3732,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -3386,6 +3744,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3403,7 +3762,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3416,7 +3779,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -3447,18 +3810,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3472,7 +3842,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -3507,6 +3877,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -3516,6 +3887,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -3523,7 +3895,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3537,11 +3913,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3569,18 +3945,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3590,7 +3973,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -3625,6 +4008,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -3634,6 +4018,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -3641,7 +4026,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3655,7 +4044,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -3684,17 +4073,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3708,7 +4104,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -3724,6 +4120,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -3732,6 +4129,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -3739,7 +4137,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -3755,7 +4157,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -3789,8 +4191,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -3802,6 +4205,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3826,10 +4230,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -3857,17 +4260,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3883,7 +4293,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -3908,6 +4318,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3920,6 +4332,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -3931,6 +4344,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3948,7 +4362,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3961,7 +4379,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -3989,17 +4407,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4013,7 +4438,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -4045,18 +4470,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4072,7 +4504,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -4089,6 +4521,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -4098,6 +4531,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -4105,7 +4539,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4119,7 +4557,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4156,8 +4594,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -4170,6 +4609,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4194,13 +4634,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4228,18 +4667,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4249,7 +4695,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4281,18 +4727,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4306,7 +4759,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -4331,6 +4784,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4343,6 +4798,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -4354,6 +4810,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4371,7 +4828,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4384,7 +4845,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -4415,18 +4876,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4440,7 +4908,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -4476,6 +4944,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -4485,6 +4954,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -4492,7 +4962,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4506,11 +4980,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4538,18 +5012,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4559,7 +5040,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -4594,6 +5075,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -4601,12 +5084,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4620,7 +5108,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -4658,6 +5146,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -4668,6 +5157,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -4675,7 +5165,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4689,11 +5183,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4724,6 +5218,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -4731,12 +5227,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4746,7 +5247,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -4784,6 +5285,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -4794,6 +5296,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -4801,7 +5304,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4815,7 +5322,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -4850,6 +5357,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -4857,12 +5366,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4876,7 +5390,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace_async @@ -4905,17 +5419,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4929,7 +5450,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -4958,17 +5479,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4982,7 +5510,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -5014,18 +5542,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5039,7 +5574,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -5074,6 +5609,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -5083,6 +5619,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -5090,7 +5627,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5104,11 +5645,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5136,18 +5677,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5157,7 +5705,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -5192,6 +5740,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -5201,6 +5750,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -5208,7 +5758,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5222,7 +5776,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -5247,6 +5801,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5259,6 +5815,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -5270,6 +5827,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5287,7 +5845,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5300,7 +5862,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_status( @@ -5331,18 +5893,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5356,7 +5925,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -5373,6 +5942,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -5382,6 +5952,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -5389,7 +5960,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -5405,7 +5980,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -5442,8 +6017,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -5456,6 +6032,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5480,10 +6057,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -5514,18 +6090,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5541,7 +6124,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -5572,6 +6155,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5585,6 +6170,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -5597,6 +6183,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5614,7 +6201,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5627,7 +6218,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -5662,6 +6253,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -5669,12 +6262,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5690,11 +6288,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5728,6 +6326,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -5735,12 +6335,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5750,7 +6355,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -5786,6 +6391,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -5793,12 +6400,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5814,7 +6426,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -5848,6 +6460,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5862,6 +6476,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -5875,6 +6490,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5892,7 +6508,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5905,7 +6525,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -5943,6 +6563,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -5951,12 +6573,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5972,7 +6599,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -6004,6 +6631,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6018,6 +6647,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -6031,6 +6661,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6048,7 +6679,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6061,7 +6696,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def get_instance_process_thread( @@ -6101,6 +6736,8 @@ async def get_instance_process_thread( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_thread_request( resource_group_name=resource_group_name, @@ -6109,12 +6746,17 @@ async def get_instance_process_thread( thread_id=thread_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_thread.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6130,7 +6772,7 @@ async def get_instance_process_thread( return deserialized - get_instance_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} # type: ignore + get_instance_process_thread.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace_async @@ -6159,17 +6801,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6183,7 +6832,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace_async @@ -6212,17 +6861,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6236,7 +6892,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -6261,6 +6917,8 @@ def list_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6273,6 +6931,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -6284,6 +6943,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6301,7 +6961,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6314,7 +6978,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'} # type: ignore + list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics( @@ -6334,12 +6998,12 @@ def list_metrics( :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. + default. Default value is None. :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -6348,6 +7012,8 @@ def list_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6360,6 +7026,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -6373,6 +7040,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -6392,7 +7060,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6405,7 +7077,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics"} # type: ignore async def _migrate_storage_initial( self, @@ -6421,6 +7093,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -6429,6 +7102,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -6437,7 +7111,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6451,7 +7129,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -6489,8 +7167,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -6503,6 +7182,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6527,10 +7207,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -6545,6 +7224,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -6553,6 +7233,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -6560,7 +7241,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6574,7 +7259,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -6608,8 +7293,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -6621,6 +7307,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6645,10 +7332,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -6678,17 +7364,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6702,7 +7395,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -6734,18 +7427,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6761,7 +7461,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -6782,11 +7482,11 @@ async def start_web_site_network_trace( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -6799,11 +7499,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -6812,7 +7515,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6826,7 +7533,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore @distributed_trace_async @@ -6855,17 +7562,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6879,11 +7593,11 @@ async def stop_web_site_network_trace( return deserialized - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6908,17 +7622,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -6928,7 +7649,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -6949,7 +7670,7 @@ def list_perf_mon_counters( :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]'. + '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -6958,6 +7679,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6970,6 +7693,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -6982,6 +7706,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -7000,7 +7725,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7013,7 +7742,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -7041,17 +7770,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7065,7 +7801,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -7094,17 +7830,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7118,7 +7861,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -7150,18 +7893,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7175,7 +7925,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -7210,6 +7960,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -7219,6 +7970,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -7226,7 +7978,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7240,11 +7996,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7272,18 +8028,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7293,7 +8056,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -7320,6 +8083,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7332,6 +8097,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -7343,6 +8109,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7360,7 +8127,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7373,7 +8144,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -7404,18 +8175,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7431,11 +8209,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7465,18 +8243,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -7486,7 +8271,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -7518,18 +8303,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7545,7 +8337,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -7575,6 +8367,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7588,6 +8382,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -7600,6 +8395,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7617,7 +8413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7630,7 +8430,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -7664,6 +8464,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -7671,12 +8473,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7692,7 +8499,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -7720,6 +8527,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7733,6 +8542,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -7745,6 +8555,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7762,7 +8573,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7775,7 +8590,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def get_process_thread( @@ -7811,6 +8626,8 @@ async def get_process_thread( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_thread_request( resource_group_name=resource_group_name, @@ -7818,12 +8635,17 @@ async def get_process_thread( process_id=process_id, thread_id=thread_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_thread.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7839,7 +8661,7 @@ async def get_process_thread( return deserialized - get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} # type: ignore + get_process_thread.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -7864,6 +8686,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7876,6 +8700,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -7887,6 +8712,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7904,7 +8730,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7917,7 +8747,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -7948,18 +8778,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7973,7 +8810,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -8009,6 +8846,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -8018,6 +8856,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -8025,7 +8864,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8039,11 +8882,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8071,18 +8914,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8092,7 +8942,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -8126,6 +8976,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -8134,6 +8985,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -8141,7 +8993,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8155,10 +9011,10 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore - async def _recover_initial( + async def _recover_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8171,6 +9027,7 @@ async def _recover_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') @@ -8179,6 +9036,7 @@ async def _recover_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._recover_initial.metadata['url'], @@ -8186,7 +9044,11 @@ async def _recover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8196,11 +9058,11 @@ async def _recover_initial( if cls: return cls(pipeline_response, None, {}) - _recover_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover'} # type: ignore + _recover_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover"} # type: ignore @distributed_trace_async - async def begin_recover( + async def begin_recover( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8230,8 +9092,9 @@ async def begin_recover( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -8243,6 +9106,7 @@ async def begin_recover( resource_group_name=resource_group_name, name=name, recovery_entity=recovery_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -8264,13 +9128,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_recover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover'} # type: ignore + begin_recover.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8297,17 +9160,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8317,11 +9187,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8338,10 +9208,11 @@ async def restart( :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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -8354,11 +9225,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -8366,7 +9240,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8376,7 +9254,7 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore @distributed_trace @@ -8401,6 +9279,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8413,6 +9293,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -8424,6 +9305,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -8441,7 +9323,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8454,7 +9340,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -8485,18 +9371,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8512,7 +9405,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -8528,18 +9421,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -8558,7 +9458,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -8593,7 +9493,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -8605,6 +9506,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -8628,13 +9530,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8662,18 +9563,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -8683,7 +9591,7 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -8707,6 +9615,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8719,6 +9629,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -8730,6 +9641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -8747,7 +9659,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8760,7 +9676,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -8791,18 +9707,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8818,7 +9741,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -8839,6 +9762,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -8848,6 +9772,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, skip_dns_registration=skip_dns_registration, @@ -8859,7 +9784,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8877,7 +9806,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -8911,14 +9840,16 @@ async def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2016_08_01.models.Site :param skip_dns_registration: If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation. + only used for app creation. Default value is None. :type skip_dns_registration: bool :param skip_custom_domain_verification: If true, custom (non *.azurewebsites.net) domains - associated with web app are not verified. + associated with web app are not verified. Default value is None. :type skip_custom_domain_verification: bool - :param force_dns_registration: If true, web app hostname is force registered with DNS. + :param force_dns_registration: If true, web app hostname is force registered with DNS. Default + value is None. :type force_dns_registration: bool - :param ttl_in_seconds: Time to live in seconds for web app's default domain name. + :param ttl_in_seconds: Time to live in seconds for web app's default domain name. Default value + is None. :type ttl_in_seconds: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -8932,8 +9863,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -8950,6 +9882,7 @@ async def begin_create_or_update_slot( skip_custom_domain_verification=skip_custom_domain_verification, force_dns_registration=force_dns_registration, ttl_in_seconds=ttl_in_seconds, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -8974,13 +9907,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9001,13 +9933,13 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool - :param skip_dns_registration: If true, DNS registration is skipped. + :param skip_dns_registration: If true, DNS registration is skipped. Default value is None. :type skip_dns_registration: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -9020,12 +9952,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, skip_dns_registration=skip_dns_registration, @@ -9034,7 +9969,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -9044,7 +9983,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -9078,14 +10017,16 @@ async def update_slot( :type site_envelope: ~azure.mgmt.web.v2016_08_01.models.SitePatchResource :param skip_dns_registration: If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation. + only used for app creation. Default value is None. :type skip_dns_registration: bool :param skip_custom_domain_verification: If true, custom (non *.azurewebsites.net) domains - associated with web app are not verified. + associated with web app are not verified. Default value is None. :type skip_custom_domain_verification: bool - :param force_dns_registration: If true, web app hostname is force registered with DNS. + :param force_dns_registration: If true, web app hostname is force registered with DNS. Default + value is None. :type force_dns_registration: bool - :param ttl_in_seconds: Time to live in seconds for web app's default domain name. + :param ttl_in_seconds: Time to live in seconds for web app's default domain name. Default value + is None. :type ttl_in_seconds: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Site, or the result of cls(response) @@ -9098,6 +10039,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -9107,6 +10049,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, skip_dns_registration=skip_dns_registration, @@ -9118,7 +10061,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9136,7 +10083,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -9158,7 +10105,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -9171,19 +10118,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9197,11 +10151,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9233,6 +10187,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -9242,6 +10197,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -9249,7 +10205,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9259,7 +10219,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -9296,6 +10256,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -9305,6 +10266,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -9312,7 +10274,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9326,7 +10292,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -9355,6 +10321,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9368,6 +10336,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -9380,6 +10349,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9397,7 +10367,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9410,7 +10384,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def discover_restore_slot( @@ -9446,6 +10420,7 @@ async def discover_restore_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -9455,6 +10430,7 @@ async def discover_restore_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_restore_slot.metadata['url'], @@ -9462,7 +10438,11 @@ async def discover_restore_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9476,7 +10456,7 @@ async def discover_restore_slot( return deserialized - discover_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover'} # type: ignore + discover_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover"} # type: ignore @distributed_trace_async @@ -9512,6 +10492,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -9519,12 +10501,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9538,11 +10525,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9574,6 +10561,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -9581,12 +10570,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9596,7 +10590,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -9638,6 +10632,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -9648,6 +10643,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -9655,7 +10651,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9669,7 +10669,7 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore async def _restore_slot_initial( @@ -9687,6 +10687,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -9697,6 +10698,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -9704,7 +10706,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9718,7 +10724,7 @@ async def _restore_slot_initial( return deserialized - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async @@ -9759,8 +10765,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.RestoreResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -9774,6 +10781,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -9798,10 +10806,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -9829,6 +10836,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9842,6 +10851,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -9854,6 +10864,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9871,7 +10882,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9884,7 +10899,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -9919,6 +10934,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -9928,6 +10944,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -9935,7 +10952,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9949,7 +10970,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -9982,18 +11003,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10007,7 +11035,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -10042,6 +11070,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -10051,6 +11080,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -10058,7 +11088,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10072,7 +11106,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -10105,18 +11139,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10130,7 +11171,7 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -10166,6 +11207,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -10175,6 +11217,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -10182,7 +11225,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10196,11 +11243,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10229,18 +11276,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10250,7 +11304,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -10283,18 +11337,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10308,7 +11369,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace_async @@ -10344,6 +11405,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -10353,6 +11415,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -10360,7 +11423,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10374,7 +11441,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -10407,18 +11474,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10432,7 +11506,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -10465,18 +11539,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10490,7 +11571,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -10527,6 +11608,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -10536,6 +11618,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -10543,7 +11626,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10557,7 +11644,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -10593,6 +11680,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -10602,6 +11690,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -10609,7 +11698,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10623,7 +11716,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -10656,18 +11749,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10681,7 +11781,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -10697,18 +11797,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10722,7 +11829,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -10756,7 +11863,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -10768,6 +11876,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -10791,10 +11900,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -10828,6 +11936,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -10837,6 +11946,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -10844,7 +11954,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10858,7 +11972,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -10890,18 +12004,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10915,7 +12036,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -10950,18 +12071,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10975,7 +12103,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -11011,6 +12139,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -11020,6 +12149,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -11027,7 +12157,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11041,7 +12175,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -11077,6 +12211,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -11086,6 +12221,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -11093,7 +12229,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11107,7 +12247,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -11138,6 +12278,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11151,6 +12293,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -11163,6 +12306,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11180,7 +12324,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11193,7 +12341,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -11228,6 +12376,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -11235,12 +12385,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11254,11 +12409,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11290,6 +12445,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -11297,12 +12454,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -11312,7 +12474,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -11344,18 +12506,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -11371,7 +12540,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -11403,18 +12572,25 @@ async def get_web_site_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_site_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -11430,7 +12606,7 @@ async def get_web_site_container_logs_zip_slot( 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'} # type: ignore + get_web_site_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -11459,6 +12635,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11472,6 +12650,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -11484,6 +12663,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11501,7 +12681,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11514,7 +12698,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -11549,6 +12733,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -11556,12 +12742,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11577,11 +12768,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11613,6 +12804,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -11620,12 +12813,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -11635,11 +12833,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11671,6 +12869,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -11678,12 +12878,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11693,11 +12898,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11729,6 +12934,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -11736,12 +12943,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11751,7 +12963,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -11780,6 +12992,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11793,6 +13007,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -11805,6 +13020,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11822,7 +13038,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11835,7 +13055,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -11870,6 +13090,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -11877,12 +13099,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11896,7 +13123,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -11935,6 +13162,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -11945,6 +13173,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -11952,7 +13181,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11966,11 +13199,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12002,6 +13235,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -12009,12 +13244,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -12024,7 +13264,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -12061,6 +13301,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -12068,12 +13310,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12087,7 +13334,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -12116,6 +13363,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12129,6 +13378,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -12141,6 +13391,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12158,7 +13409,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12171,7 +13426,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -12206,6 +13461,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -12213,12 +13470,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12232,7 +13494,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -12271,6 +13533,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -12281,6 +13544,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -12288,7 +13552,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12302,11 +13570,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12338,6 +13606,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -12345,12 +13615,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -12360,7 +13635,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -12399,6 +13674,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -12409,6 +13685,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -12416,7 +13693,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12430,7 +13711,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -12462,18 +13743,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12487,7 +13775,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -12504,6 +13792,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -12513,6 +13802,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -12520,7 +13810,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -12536,7 +13830,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -12573,8 +13867,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -12587,6 +13882,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -12611,10 +13907,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -12645,18 +13940,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -12672,7 +13974,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -12701,6 +14003,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12714,6 +14018,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -12726,6 +14031,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12743,7 +14049,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -12756,7 +14066,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -12787,18 +14097,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12812,7 +14129,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -12848,6 +14165,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -12855,12 +14174,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -12876,7 +14200,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -12894,6 +14218,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -12904,6 +14229,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -12911,7 +14237,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -12925,7 +14255,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -12966,8 +14296,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -12981,6 +14312,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -13005,13 +14337,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13043,6 +14374,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -13050,12 +14383,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -13065,7 +14403,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -13101,6 +14439,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -13108,12 +14448,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13127,7 +14472,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -13156,6 +14501,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13169,6 +14516,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -13181,6 +14529,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13198,7 +14547,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13211,7 +14564,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -13246,6 +14599,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -13253,12 +14608,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13272,7 +14632,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -13312,6 +14672,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -13322,6 +14683,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -13329,7 +14691,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13343,11 +14709,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13379,6 +14745,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -13386,12 +14754,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13401,7 +14774,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -13439,6 +14812,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -13447,12 +14822,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13466,7 +14846,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -13507,6 +14887,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -13518,6 +14899,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -13525,7 +14907,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13539,11 +14925,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13577,6 +14963,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -13585,12 +14973,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13600,7 +14993,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -13641,6 +15034,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -13652,6 +15046,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -13659,7 +15054,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13673,7 +15072,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -13711,6 +15110,8 @@ async def list_hybrid_connection_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_hybrid_connection_keys_slot_request( resource_group_name=resource_group_name, @@ -13719,12 +15120,17 @@ async def list_hybrid_connection_keys_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13738,7 +15144,7 @@ async def list_hybrid_connection_keys_slot( 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'} # type: ignore + list_hybrid_connection_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace_async @@ -13770,18 +15176,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13795,7 +15208,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -13828,18 +15241,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13853,7 +15273,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -13889,6 +15309,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -13896,12 +15318,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13915,7 +15342,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -13954,6 +15381,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -13964,6 +15392,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -13971,7 +15400,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13985,11 +15418,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14021,6 +15454,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -14028,12 +15463,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14043,7 +15483,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -14082,6 +15522,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -14092,6 +15533,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -14099,7 +15541,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14113,7 +15559,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -14142,6 +15588,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14155,6 +15603,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -14167,6 +15616,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14184,7 +15634,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14197,7 +15651,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_status_slot( @@ -14231,6 +15685,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -14238,12 +15694,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14257,7 +15718,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -14275,6 +15736,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -14285,6 +15747,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -14292,7 +15755,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -14308,7 +15775,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -14348,8 +15815,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -14363,6 +15831,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -14387,10 +15856,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -14424,6 +15892,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -14431,12 +15901,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14452,7 +15927,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -14487,6 +15962,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14501,6 +15978,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -14514,6 +15992,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14531,7 +16010,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14544,7 +16027,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -14583,6 +16066,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -14591,12 +16076,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14612,11 +16102,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14654,6 +16144,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -14662,12 +16154,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -14677,7 +16174,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -14717,6 +16214,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -14725,12 +16224,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14746,7 +16250,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -14784,6 +16288,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14799,6 +16305,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -14813,6 +16320,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14830,7 +16338,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14843,7 +16355,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -14885,6 +16397,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -14894,12 +16408,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14915,7 +16434,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -14951,6 +16470,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14966,6 +16487,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -14980,6 +16502,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14997,7 +16520,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15010,7 +16537,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def get_instance_process_thread_slot( @@ -15054,6 +16581,8 @@ async def get_instance_process_thread_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_thread_slot_request( resource_group_name=resource_group_name, @@ -15063,12 +16592,17 @@ async def get_instance_process_thread_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_thread_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15084,7 +16618,7 @@ async def get_instance_process_thread_slot( 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}'} # type: ignore + get_instance_process_thread_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace_async @@ -15117,18 +16651,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15142,7 +16683,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace_async @@ -15175,18 +16716,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15200,7 +16748,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -15229,6 +16777,8 @@ def list_metric_definitions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15242,6 +16792,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions_slot.metadata['url'], ) request = _convert_request(request) @@ -15254,6 +16805,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15271,7 +16823,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15284,7 +16840,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} # type: ignore + list_metric_definitions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics_slot( @@ -15308,12 +16864,12 @@ def list_metrics_slot( of the production slot. :type slot: str :param details: Specify "true" to include metric details in the response. It is "false" by - default. + default. Default value is None. :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -15322,6 +16878,8 @@ def list_metrics_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15335,6 +16893,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics_slot.metadata['url'], @@ -15349,6 +16908,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -15368,7 +16928,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15381,7 +16945,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} # type: ignore + list_metrics_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status_slot( @@ -15414,18 +16978,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15439,7 +17010,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -15475,6 +17046,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -15482,12 +17055,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15503,7 +17081,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -15527,11 +17105,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -15544,12 +17122,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -15558,7 +17139,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15572,7 +17157,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore @distributed_trace_async @@ -15604,18 +17189,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15629,11 +17221,11 @@ async def stop_web_site_network_trace_slot( return deserialized - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15662,18 +17254,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15683,7 +17282,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -15707,7 +17306,7 @@ def list_perf_mon_counters_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]'. + '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -15716,6 +17315,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15729,6 +17330,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -15742,6 +17344,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -15760,7 +17363,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15773,7 +17380,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -15804,18 +17411,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15829,7 +17443,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -15862,18 +17476,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15887,7 +17508,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -15923,6 +17544,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -15930,12 +17553,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15949,7 +17577,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -15988,6 +17616,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -15998,6 +17627,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -16005,7 +17635,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16019,11 +17653,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16055,6 +17689,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -16062,12 +17698,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16077,7 +17718,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -16108,6 +17749,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16121,6 +17764,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -16133,6 +17777,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16150,7 +17795,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16163,7 +17812,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -16198,6 +17847,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -16205,12 +17856,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16226,11 +17882,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16264,6 +17920,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -16271,12 +17929,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -16286,7 +17949,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -16322,6 +17985,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -16329,12 +17994,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16350,7 +18020,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -16384,6 +18054,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16398,6 +18070,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -16411,6 +18084,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16428,7 +18102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16441,7 +18119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -16479,6 +18157,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -16487,12 +18167,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16508,7 +18193,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -16540,6 +18225,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16554,6 +18241,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -16567,6 +18255,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16584,7 +18273,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16597,7 +18290,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def get_process_thread_slot( @@ -16637,6 +18330,8 @@ async def get_process_thread_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_thread_slot_request( resource_group_name=resource_group_name, @@ -16645,12 +18340,17 @@ async def get_process_thread_slot( thread_id=thread_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_thread_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16666,7 +18366,7 @@ async def get_process_thread_slot( return deserialized - get_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'} # type: ignore + get_process_thread_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -16695,6 +18395,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16708,6 +18410,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -16720,6 +18423,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16737,7 +18441,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16750,7 +18458,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -16785,6 +18493,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -16792,12 +18502,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16811,7 +18526,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -16851,6 +18566,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -16861,6 +18577,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -16868,7 +18585,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16882,11 +18603,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16918,6 +18639,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -16925,12 +18648,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16940,7 +18668,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -16978,6 +18706,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -16987,6 +18716,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -16994,7 +18724,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17008,10 +18742,10 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore - async def _recover_slot_initial( + async def _recover_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17025,6 +18759,7 @@ async def _recover_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') @@ -17034,6 +18769,7 @@ async def _recover_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._recover_slot_initial.metadata['url'], @@ -17041,7 +18777,11 @@ async def _recover_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -17051,11 +18791,11 @@ async def _recover_slot_initial( if cls: return cls(pipeline_response, None, {}) - _recover_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover'} # type: ignore + _recover_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover"} # type: ignore @distributed_trace_async - async def begin_recover_slot( + async def begin_recover_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17088,8 +18828,9 @@ async def begin_recover_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -17102,6 +18843,7 @@ async def begin_recover_slot( name=name, slot=slot, recovery_entity=recovery_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -17123,13 +18865,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_recover_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover'} # type: ignore + begin_recover_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17160,18 +18901,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17181,11 +18929,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17206,10 +18954,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -17222,12 +18971,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -17235,7 +18987,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17245,7 +19001,7 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore @distributed_trace @@ -17274,6 +19030,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17287,6 +19045,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -17299,6 +19058,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17316,7 +19076,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17329,7 +19093,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -17364,6 +19128,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -17371,12 +19137,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17392,7 +19163,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -17409,6 +19180,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -17416,12 +19189,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -17440,7 +19218,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -17479,7 +19257,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -17492,6 +19271,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -17515,13 +19295,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17553,6 +19332,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -17560,12 +19341,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -17575,7 +19361,7 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -17607,6 +19393,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -17623,6 +19410,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -17638,6 +19426,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -17657,7 +19446,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17670,9 +19463,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17686,6 +19479,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -17695,6 +19489,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -17702,7 +19497,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -17712,11 +19511,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17749,8 +19548,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -17763,6 +19563,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -17784,10 +19585,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -17813,6 +19613,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17826,6 +19628,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -17838,6 +19641,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17855,7 +19659,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17868,7 +19676,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -17900,18 +19708,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -17932,7 +19747,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -17949,6 +19764,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -17958,6 +19774,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -17965,7 +19782,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -17986,7 +19807,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -18025,8 +19846,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -18039,6 +19861,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18063,13 +19886,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18098,18 +19920,25 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -18119,7 +19948,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -18155,6 +19984,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -18164,6 +19994,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -18171,7 +20002,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -18189,11 +20024,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18222,18 +20057,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18243,11 +20085,11 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18276,18 +20118,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18297,11 +20146,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18329,18 +20178,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18350,11 +20206,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18383,18 +20239,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18404,7 +20267,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -18433,6 +20296,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18446,6 +20311,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -18458,6 +20324,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18475,7 +20342,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18488,7 +20359,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -18523,6 +20394,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -18530,12 +20403,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18551,11 +20429,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18587,6 +20465,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -18594,12 +20474,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18609,7 +20494,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -18641,6 +20526,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18655,6 +20542,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -18668,6 +20556,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18685,7 +20574,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18698,7 +20591,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -18736,6 +20629,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -18744,12 +20639,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18765,11 +20665,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18801,6 +20701,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -18808,12 +20710,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18823,7 +20730,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -18849,7 +20756,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -18858,6 +20765,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18871,6 +20780,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -18884,6 +20794,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -18902,7 +20813,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18915,7 +20830,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -18947,18 +20862,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18972,7 +20894,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -19008,6 +20930,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -19015,12 +20939,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19034,7 +20963,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -19075,6 +21004,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -19085,6 +21015,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -19092,7 +21023,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19106,11 +21041,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19142,6 +21077,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -19149,12 +21086,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19164,7 +21106,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -19205,6 +21147,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -19215,6 +21158,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -19222,7 +21166,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19236,7 +21184,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -19275,6 +21223,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -19283,12 +21233,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19304,7 +21259,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -19346,6 +21301,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -19357,6 +21313,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -19364,7 +21321,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19378,7 +21339,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -19420,6 +21381,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -19431,6 +21393,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -19438,7 +21401,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19452,7 +21419,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -19480,6 +21447,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19493,6 +21462,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -19505,6 +21475,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19522,7 +21493,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19535,7 +21510,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -19570,6 +21545,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -19577,12 +21554,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19596,7 +21578,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -19624,6 +21606,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -19639,6 +21622,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -19653,6 +21637,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -19672,7 +21657,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19685,9 +21674,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19700,6 +21689,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -19708,6 +21698,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -19715,7 +21706,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19725,11 +21720,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19758,8 +21753,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -19771,6 +21767,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19792,10 +21789,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -19818,6 +21814,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19830,6 +21828,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -19841,6 +21840,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19858,7 +21858,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19871,7 +21875,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace_async async def get_source_control( @@ -19899,17 +21903,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -19930,7 +21941,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -19946,6 +21957,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -19954,6 +21966,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -19961,7 +21974,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -19982,7 +21999,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -20017,8 +22034,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -20030,6 +22048,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20054,13 +22073,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20085,17 +22103,24 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -20105,7 +22130,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -20137,6 +22162,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -20145,6 +22171,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -20152,7 +22179,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -20170,11 +22201,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20199,17 +22230,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20219,11 +22257,11 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20248,17 +22286,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20268,11 +22313,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20297,17 +22342,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20317,11 +22369,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20346,17 +22398,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20366,7 +22425,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -20391,6 +22450,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20403,6 +22464,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -20414,6 +22476,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20431,7 +22494,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20444,7 +22511,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -20475,18 +22542,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20502,11 +22576,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20534,18 +22608,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20555,7 +22636,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -20583,6 +22664,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20596,6 +22679,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -20608,6 +22692,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20625,7 +22710,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20638,7 +22727,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -20672,6 +22761,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -20679,12 +22770,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20700,11 +22796,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20732,18 +22828,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20753,7 +22856,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -20775,7 +22878,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -20784,6 +22887,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20796,6 +22901,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -20808,6 +22914,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -20826,7 +22933,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20839,7 +22950,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -20867,17 +22978,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20891,7 +23009,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -20923,18 +23041,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20948,7 +23073,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -20985,6 +23110,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -20994,6 +23120,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -21001,7 +23128,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21015,11 +23146,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21047,18 +23178,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21068,7 +23206,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -21105,6 +23243,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -21114,6 +23253,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -21121,7 +23261,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21135,7 +23279,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -21170,6 +23314,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -21177,12 +23323,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21198,7 +23349,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -21236,6 +23387,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -21246,6 +23398,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -21253,7 +23406,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21267,7 +23424,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -21305,6 +23462,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -21315,6 +23473,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -21322,7 +23481,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21336,7 +23499,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -21360,6 +23523,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_08_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21372,6 +23537,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -21383,6 +23549,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21400,7 +23567,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21413,7 +23584,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -21444,18 +23615,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21469,5 +23647,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/operations/_web_apps_operations.py index 420768d4dcde..671125ac16ef 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_08_01/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,29 +188,30 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -221,35 +225,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,33 +268,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -304,33 +309,33 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -346,35 +351,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -387,31 +392,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -425,35 +431,35 @@ def build_discover_restore_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -467,10 +473,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -478,21 +485,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -504,9 +511,10 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -514,16 +522,16 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -538,12 +546,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -551,23 +559,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -584,12 +592,12 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -597,23 +605,23 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -626,31 +634,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -664,35 +673,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -705,31 +714,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -743,35 +753,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -784,31 +794,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -822,35 +833,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -863,25 +874,26 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -892,31 +904,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -930,35 +943,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -971,31 +984,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1006,31 +1020,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1044,35 +1059,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1088,35 +1103,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1129,31 +1144,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1164,31 +1180,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1202,35 +1219,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1243,31 +1260,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1278,31 +1296,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1316,35 +1335,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1357,31 +1376,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1395,35 +1415,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1439,35 +1459,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1480,31 +1500,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1516,10 +1537,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1527,21 +1549,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1553,9 +1575,10 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1563,16 +1586,16 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1583,31 +1606,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1618,31 +1642,32 @@ def build_get_web_site_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1653,31 +1678,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1689,10 +1715,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1700,21 +1727,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1726,9 +1753,10 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1736,16 +1764,16 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1757,9 +1785,10 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1767,16 +1796,16 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1788,9 +1817,10 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1798,16 +1828,16 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1818,31 +1848,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1854,10 +1885,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1865,21 +1897,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1894,12 +1926,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1907,23 +1939,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1937,9 +1969,10 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1947,16 +1980,16 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1968,10 +2001,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1979,21 +2013,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2004,31 +2038,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2040,10 +2075,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2051,21 +2087,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2080,12 +2116,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2093,23 +2129,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2123,9 +2159,10 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2133,16 +2170,16 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2157,12 +2194,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2170,23 +2207,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2199,31 +2236,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2237,35 +2275,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2278,31 +2316,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2313,31 +2352,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2348,31 +2388,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2384,10 +2425,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2395,21 +2437,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2424,12 +2466,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2437,23 +2479,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2467,9 +2509,10 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2477,16 +2520,16 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2498,10 +2541,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2509,21 +2553,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2534,31 +2578,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2570,10 +2615,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2581,21 +2627,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2610,12 +2656,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2623,23 +2669,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2653,9 +2699,10 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2663,16 +2710,16 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2685,10 +2732,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2697,21 +2745,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2727,12 +2775,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2741,23 +2789,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2772,9 +2820,10 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2783,16 +2832,16 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2808,12 +2857,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2822,23 +2871,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2853,10 +2902,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2865,21 +2915,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2890,31 +2940,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2925,31 +2976,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2961,10 +3013,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2972,21 +3025,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3001,12 +3054,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3014,23 +3067,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3044,9 +3097,10 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3054,16 +3108,16 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -3078,12 +3132,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3091,23 +3145,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3120,31 +3174,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3156,10 +3211,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3167,21 +3223,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3196,12 +3252,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3209,23 +3265,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3239,10 +3295,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3250,21 +3307,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3276,10 +3333,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3287,21 +3345,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3314,10 +3372,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3326,21 +3385,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3353,9 +3412,10 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3364,16 +3424,16 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -3386,10 +3446,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3398,21 +3459,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3425,10 +3486,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3437,21 +3499,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3465,10 +3527,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3478,21 +3541,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3505,10 +3568,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3517,21 +3581,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3545,10 +3609,11 @@ def build_get_instance_process_thread_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3558,21 +3623,21 @@ def build_get_instance_process_thread_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3583,31 +3648,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3618,31 +3684,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3653,31 +3720,32 @@ def build_list_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3691,35 +3759,36 @@ def build_list_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3734,36 +3803,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3779,35 +3848,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3820,31 +3889,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3856,10 +3926,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3867,21 +3938,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3896,37 +3967,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3937,31 +4009,32 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3972,25 +4045,26 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4003,33 +4077,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4040,31 +4115,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4075,31 +4151,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4111,10 +4188,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4122,21 +4200,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4151,12 +4229,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4164,23 +4242,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4194,9 +4272,10 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4204,16 +4283,16 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4224,31 +4303,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4260,10 +4340,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4271,21 +4352,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4297,9 +4378,10 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4307,16 +4389,16 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4328,10 +4410,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4339,21 +4422,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4365,10 +4448,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4376,21 +4460,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4403,10 +4487,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4415,21 +4500,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4441,10 +4526,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4452,21 +4538,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4479,10 +4565,11 @@ def build_get_process_thread_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4491,21 +4578,21 @@ def build_get_process_thread_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4516,31 +4603,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4552,10 +4640,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4563,21 +4652,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4592,12 +4681,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4605,23 +4694,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4635,9 +4724,10 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4645,16 +4735,16 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4668,35 +4758,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4712,33 +4802,33 @@ def build_recover_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4751,25 +4841,26 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4783,29 +4874,30 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4816,31 +4908,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4852,10 +4945,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4863,21 +4957,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4889,10 +4983,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4900,21 +4995,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4926,9 +5021,10 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4936,16 +5032,16 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4956,31 +5052,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4992,10 +5089,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5003,21 +5101,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5036,12 +5134,12 @@ def build_create_or_update_slot_request_initial( ttl_in_seconds: Optional[str] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5049,31 +5147,31 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = _SERIALIZER.query("skip_dns_registration", skip_dns_registration, 'bool') + _query_parameters['skipDnsRegistration'] = _SERIALIZER.query("skip_dns_registration", skip_dns_registration, 'bool') if skip_custom_domain_verification is not None: - query_parameters['skipCustomDomainVerification'] = _SERIALIZER.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') + _query_parameters['skipCustomDomainVerification'] = _SERIALIZER.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') if force_dns_registration is not None: - query_parameters['forceDnsRegistration'] = _SERIALIZER.query("force_dns_registration", force_dns_registration, 'bool') + _query_parameters['forceDnsRegistration'] = _SERIALIZER.query("force_dns_registration", force_dns_registration, 'bool') if ttl_in_seconds is not None: - query_parameters['ttlInSeconds'] = _SERIALIZER.query("ttl_in_seconds", ttl_in_seconds, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ttlInSeconds'] = _SERIALIZER.query("ttl_in_seconds", ttl_in_seconds, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5091,9 +5189,10 @@ def build_delete_slot_request( skip_dns_registration: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5101,22 +5200,22 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = _SERIALIZER.query("skip_dns_registration", skip_dns_registration, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['skipDnsRegistration'] = _SERIALIZER.query("skip_dns_registration", skip_dns_registration, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -5135,12 +5234,12 @@ def build_update_slot_request( ttl_in_seconds: Optional[str] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5148,31 +5247,31 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = _SERIALIZER.query("skip_dns_registration", skip_dns_registration, 'bool') + _query_parameters['skipDnsRegistration'] = _SERIALIZER.query("skip_dns_registration", skip_dns_registration, 'bool') if skip_custom_domain_verification is not None: - query_parameters['skipCustomDomainVerification'] = _SERIALIZER.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') + _query_parameters['skipCustomDomainVerification'] = _SERIALIZER.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') if force_dns_registration is not None: - query_parameters['forceDnsRegistration'] = _SERIALIZER.query("force_dns_registration", force_dns_registration, 'bool') + _query_parameters['forceDnsRegistration'] = _SERIALIZER.query("force_dns_registration", force_dns_registration, 'bool') if ttl_in_seconds is not None: - query_parameters['ttlInSeconds'] = _SERIALIZER.query("ttl_in_seconds", ttl_in_seconds, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['ttlInSeconds'] = _SERIALIZER.query("ttl_in_seconds", ttl_in_seconds, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5188,10 +5287,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5199,23 +5299,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5230,11 +5330,11 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5242,22 +5342,22 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5274,12 +5374,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5287,23 +5387,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5317,10 +5417,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5328,21 +5429,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5357,12 +5458,12 @@ def build_discover_restore_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5370,23 +5471,23 @@ def build_discover_restore_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5401,10 +5502,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5413,21 +5515,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5440,9 +5542,10 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5451,16 +5554,16 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -5476,12 +5579,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5490,23 +5593,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5524,12 +5627,12 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5538,23 +5641,23 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5568,10 +5671,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5579,21 +5683,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5608,12 +5712,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5621,23 +5725,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5651,10 +5755,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5662,21 +5767,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5691,12 +5796,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5704,23 +5809,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5734,10 +5839,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5745,21 +5851,21 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5774,12 +5880,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5787,23 +5893,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5817,9 +5923,10 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5827,16 +5934,16 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -5848,10 +5955,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5859,21 +5967,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5888,12 +5996,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5901,23 +6009,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5931,10 +6039,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5942,21 +6051,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5968,10 +6077,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5979,21 +6089,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6008,12 +6118,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6021,23 +6131,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6054,12 +6164,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6067,23 +6177,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6097,10 +6207,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6108,21 +6219,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6134,10 +6245,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6145,21 +6257,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6174,12 +6286,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6187,23 +6299,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6217,10 +6329,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6228,21 +6341,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6254,10 +6367,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6265,21 +6379,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6294,12 +6408,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6307,23 +6421,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6340,12 +6454,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6353,23 +6467,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6383,10 +6497,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6394,21 +6509,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6421,10 +6536,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6433,21 +6549,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6460,9 +6576,10 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6471,16 +6588,16 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -6492,10 +6609,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6503,21 +6621,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6529,10 +6647,11 @@ def build_get_web_site_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6540,21 +6659,21 @@ def build_get_web_site_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6566,10 +6685,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6577,21 +6697,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6604,10 +6724,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6616,21 +6737,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6643,9 +6764,10 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6654,16 +6776,16 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -6676,9 +6798,10 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6687,16 +6810,16 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -6709,9 +6832,10 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6720,16 +6844,16 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -6741,10 +6865,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6752,21 +6877,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6779,10 +6904,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6791,21 +6917,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6821,12 +6947,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6835,23 +6961,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6866,9 +6992,10 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6877,16 +7004,16 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -6899,10 +7026,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6911,21 +7039,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6937,10 +7065,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6948,21 +7077,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6975,10 +7104,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6987,21 +7117,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7017,12 +7147,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7031,23 +7161,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7062,9 +7192,10 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7073,16 +7204,16 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7098,12 +7229,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7112,23 +7243,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7142,10 +7273,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7153,21 +7285,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7182,12 +7314,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7195,23 +7327,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7225,10 +7357,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7236,21 +7369,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7262,10 +7395,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7273,21 +7407,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7299,10 +7433,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7310,21 +7445,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7337,10 +7472,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7349,21 +7485,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7379,12 +7515,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7393,23 +7529,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7424,9 +7560,10 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7435,16 +7572,16 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7457,10 +7594,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7469,21 +7607,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7495,10 +7633,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7506,21 +7645,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7533,10 +7672,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7545,21 +7685,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7575,12 +7715,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7589,23 +7729,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7620,9 +7760,10 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7631,16 +7772,16 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7654,10 +7795,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7667,21 +7809,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7698,12 +7840,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7713,23 +7855,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7745,9 +7887,10 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7757,16 +7900,16 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7783,12 +7926,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7798,23 +7941,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7830,10 +7973,11 @@ def build_list_hybrid_connection_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7843,21 +7987,21 @@ def build_list_hybrid_connection_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7869,10 +8013,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7880,21 +8025,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7906,10 +8051,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7917,21 +8063,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7944,10 +8090,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7956,21 +8103,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7986,12 +8133,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8000,23 +8147,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8031,9 +8178,10 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8042,16 +8190,16 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -8067,12 +8215,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8081,23 +8229,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8111,10 +8259,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8122,21 +8271,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8149,10 +8298,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8161,21 +8311,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8191,12 +8341,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8205,23 +8355,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8236,10 +8386,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8248,21 +8399,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8275,10 +8426,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8287,21 +8439,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8315,10 +8467,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8328,21 +8481,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8356,9 +8509,10 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8368,16 +8522,16 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -8391,10 +8545,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8404,21 +8559,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8432,10 +8587,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8445,21 +8601,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8474,10 +8630,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8488,21 +8645,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8516,10 +8673,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8529,21 +8687,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8558,10 +8716,11 @@ def build_get_instance_process_thread_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8572,21 +8731,21 @@ def build_get_instance_process_thread_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8598,10 +8757,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8609,21 +8769,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8635,10 +8795,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8646,21 +8807,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8672,10 +8833,11 @@ def build_list_metric_definitions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8683,21 +8845,21 @@ def build_list_metric_definitions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8712,10 +8874,11 @@ def build_list_metrics_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8723,25 +8886,25 @@ def build_list_metrics_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8753,10 +8916,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8764,21 +8928,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8791,10 +8955,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8803,21 +8968,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8833,10 +8998,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8844,27 +9010,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8876,10 +9042,11 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8887,21 +9054,21 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8913,9 +9080,10 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8923,16 +9091,16 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -8946,10 +9114,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8957,23 +9126,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8985,10 +9154,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8996,21 +9166,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9022,10 +9192,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9033,21 +9204,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9060,10 +9231,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9072,21 +9244,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9102,12 +9274,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9116,23 +9288,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9147,9 +9319,10 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9158,16 +9331,16 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9179,10 +9352,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9190,21 +9364,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9217,10 +9391,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9229,21 +9404,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9256,9 +9431,10 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9267,16 +9443,16 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9289,10 +9465,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9301,21 +9478,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9328,10 +9505,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9340,21 +9518,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9368,10 +9546,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9381,21 +9560,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9408,10 +9587,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9420,21 +9600,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9448,10 +9628,11 @@ def build_get_process_thread_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9461,21 +9642,21 @@ def build_get_process_thread_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9487,10 +9668,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9498,21 +9680,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9525,10 +9707,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9537,21 +9720,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9567,12 +9750,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9581,23 +9764,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9612,9 +9795,10 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9623,16 +9807,16 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9647,12 +9831,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9660,23 +9844,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9693,11 +9877,11 @@ def build_recover_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9705,22 +9889,22 @@ def build_recover_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9734,9 +9918,10 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9744,16 +9929,16 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9768,9 +9953,10 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9778,20 +9964,20 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9803,10 +9989,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9814,21 +10001,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9841,10 +10028,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9853,21 +10041,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9880,10 +10068,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9892,21 +10081,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9919,9 +10108,10 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9930,16 +10120,16 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9954,12 +10144,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9967,23 +10157,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10000,11 +10190,11 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10012,22 +10202,22 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10041,10 +10231,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10052,21 +10243,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10078,10 +10269,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10089,21 +10281,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10118,12 +10310,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10131,23 +10323,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10161,9 +10353,10 @@ def build_delete_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10171,16 +10364,16 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10195,12 +10388,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10208,23 +10401,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10238,9 +10431,10 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10248,16 +10442,16 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10269,9 +10463,10 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10279,16 +10474,16 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10300,9 +10495,10 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10310,16 +10506,16 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10331,9 +10527,10 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10341,16 +10538,16 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10362,10 +10559,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10373,21 +10571,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10400,10 +10598,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10412,21 +10611,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10439,9 +10638,10 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10450,16 +10650,16 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10472,10 +10672,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10484,21 +10685,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10512,10 +10713,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10525,21 +10727,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10552,9 +10754,10 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10563,16 +10766,16 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10586,10 +10789,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10597,23 +10801,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10625,10 +10829,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10636,21 +10841,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10663,10 +10868,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10675,21 +10881,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10705,12 +10911,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10719,23 +10925,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10750,9 +10956,10 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10761,16 +10968,16 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10786,12 +10993,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10800,23 +11007,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10832,10 +11039,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10845,21 +11053,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10876,12 +11084,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10891,23 +11099,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10926,12 +11134,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10941,23 +11149,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10971,10 +11179,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10982,21 +11191,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11009,10 +11218,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11021,21 +11231,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11049,35 +11259,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11093,33 +11303,33 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11132,31 +11342,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11167,31 +11378,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11205,35 +11417,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11246,25 +11458,26 @@ def build_delete_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11278,35 +11491,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11319,25 +11532,26 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11348,25 +11562,26 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11377,25 +11592,26 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11406,25 +11622,26 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11435,31 +11652,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11471,10 +11689,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11482,21 +11701,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11508,9 +11727,10 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11518,16 +11738,16 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11539,10 +11759,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11550,21 +11771,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11577,10 +11798,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11589,21 +11811,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11615,9 +11837,10 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11625,16 +11848,16 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11647,33 +11870,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11684,31 +11908,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11720,10 +11945,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11731,21 +11957,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11760,12 +11986,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11773,23 +11999,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11803,9 +12029,10 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11813,16 +12040,16 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11837,12 +12064,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11850,23 +12077,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11881,10 +12108,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11893,21 +12121,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11923,12 +12151,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11937,23 +12165,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11971,12 +12199,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11985,23 +12213,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12014,31 +12242,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12050,10 +12279,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-08-01" + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12061,25 +12291,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -12115,6 +12345,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12125,6 +12357,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -12134,6 +12367,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12151,7 +12385,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12164,7 +12402,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -12187,6 +12425,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12198,6 +12438,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -12209,6 +12450,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -12227,7 +12469,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12240,7 +12486,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -12268,17 +12514,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -12294,7 +12547,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -12310,6 +12563,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -12318,6 +12572,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -12325,7 +12580,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -12343,7 +12602,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -12379,8 +12638,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -12392,6 +12652,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -12416,13 +12677,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12438,10 +12698,10 @@ def delete( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -12454,11 +12714,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -12466,7 +12729,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -12476,7 +12743,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -12511,6 +12778,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -12519,6 +12787,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -12526,7 +12795,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -12544,7 +12817,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -12563,7 +12836,7 @@ def analyze_custom_hostname( :type resource_group_name: str :param name: Name of web app. :type name: str - :param host_name: Custom hostname. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -12576,18 +12849,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12601,11 +12881,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12633,6 +12913,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -12641,6 +12922,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -12648,7 +12930,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12658,7 +12944,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -12691,6 +12977,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12699,6 +12986,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -12706,7 +12994,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12720,7 +13012,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -12744,6 +13036,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12756,6 +13050,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -12767,6 +13062,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12784,7 +13080,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12797,7 +13097,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def discover_restore( @@ -12829,6 +13129,7 @@ def discover_restore( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -12837,6 +13138,7 @@ def discover_restore( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_restore.metadata['url'], @@ -12844,7 +13146,11 @@ def discover_restore( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12858,7 +13164,7 @@ def discover_restore( return deserialized - discover_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover'} # type: ignore + discover_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover"} # type: ignore @distributed_trace @@ -12890,18 +13196,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12915,11 +13228,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12947,18 +13260,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -12968,7 +13288,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -13007,6 +13327,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -13016,6 +13337,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -13023,7 +13345,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13037,7 +13363,7 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore def _restore_initial( @@ -13054,6 +13380,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -13063,6 +13390,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -13070,7 +13398,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13084,7 +13416,7 @@ def _restore_initial( return deserialized - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace @@ -13121,8 +13453,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.RestoreResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -13135,6 +13468,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -13159,10 +13493,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations( @@ -13186,6 +13519,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13198,6 +13533,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -13209,6 +13545,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13226,7 +13563,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13239,7 +13580,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -13270,6 +13611,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -13278,6 +13620,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -13285,7 +13628,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13299,7 +13646,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -13328,17 +13675,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13352,7 +13706,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -13384,6 +13738,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -13392,6 +13747,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -13399,7 +13755,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13413,7 +13773,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -13442,17 +13802,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13466,7 +13833,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -13498,6 +13865,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -13506,6 +13874,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -13513,7 +13882,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13527,11 +13900,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13556,17 +13929,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13576,7 +13956,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -13605,17 +13985,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13629,7 +14016,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -13661,6 +14048,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -13669,6 +14057,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -13676,7 +14065,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13690,7 +14083,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -13719,17 +14112,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13743,7 +14143,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -13772,17 +14172,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13796,7 +14203,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -13829,6 +14236,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -13837,6 +14245,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -13844,7 +14253,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13858,7 +14271,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -13890,6 +14303,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -13898,6 +14312,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -13905,7 +14320,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13919,7 +14338,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -13948,17 +14367,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13972,7 +14398,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -13987,17 +14413,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14011,7 +14444,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -14041,7 +14474,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -14052,6 +14486,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -14075,10 +14510,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -14109,6 +14543,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -14117,6 +14552,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -14124,7 +14560,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14138,7 +14578,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -14167,17 +14607,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14191,7 +14638,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -14220,17 +14667,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14244,7 +14698,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -14278,6 +14732,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -14286,6 +14741,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -14293,7 +14749,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14307,7 +14767,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -14338,17 +14798,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14362,7 +14829,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -14394,6 +14861,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14402,6 +14870,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -14409,7 +14878,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14423,7 +14896,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -14455,6 +14928,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14463,6 +14937,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -14470,7 +14945,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14484,7 +14963,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -14511,6 +14990,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14523,6 +15004,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -14534,6 +15016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14551,7 +15034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14564,7 +15051,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -14595,18 +15082,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14620,11 +15114,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14652,18 +15146,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -14673,7 +15174,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -14702,17 +15203,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14728,7 +15236,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -14757,17 +15265,24 @@ def get_web_site_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_site_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14783,7 +15298,7 @@ def get_web_site_container_logs_zip( return deserialized - get_web_site_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_web_site_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -14808,6 +15323,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14820,6 +15337,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -14831,6 +15349,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14848,7 +15367,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14861,7 +15384,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -14892,18 +15415,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14919,11 +15449,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14951,18 +15481,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14972,11 +15509,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15004,18 +15541,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15025,11 +15569,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15057,18 +15601,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15078,7 +15629,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -15102,6 +15653,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15114,6 +15667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -15125,6 +15679,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15142,7 +15697,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15155,7 +15714,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -15186,18 +15745,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15211,7 +15777,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -15246,6 +15812,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -15255,6 +15822,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -15262,7 +15830,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15276,11 +15848,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15308,18 +15880,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15329,7 +15908,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -15362,18 +15941,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15387,7 +15973,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -15411,6 +15997,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15423,6 +16011,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -15434,6 +16023,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15451,7 +16041,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15464,7 +16058,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -15495,18 +16089,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15520,7 +16121,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -15555,6 +16156,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15564,6 +16166,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -15571,7 +16174,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15585,11 +16192,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15617,18 +16224,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15638,7 +16252,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -15673,6 +16287,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15682,6 +16297,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -15689,7 +16305,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15703,7 +16323,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -15732,17 +16352,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15756,7 +16383,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -15772,6 +16399,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -15780,6 +16408,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -15787,7 +16416,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -15803,7 +16436,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -15837,8 +16470,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -15850,6 +16484,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15874,10 +16509,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -15905,17 +16539,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15931,7 +16572,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -15956,6 +16597,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15968,6 +16611,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -15979,6 +16623,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15996,7 +16641,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16009,7 +16658,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -16037,17 +16686,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16061,7 +16717,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -16093,18 +16749,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16120,7 +16783,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -16137,6 +16800,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -16146,6 +16810,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -16153,7 +16818,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -16167,7 +16836,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -16204,8 +16873,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -16218,6 +16888,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16242,13 +16913,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16276,18 +16946,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -16297,7 +16974,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -16329,18 +17006,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16354,7 +17038,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -16379,6 +17063,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16391,6 +17077,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -16402,6 +17089,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16419,7 +17107,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16432,7 +17124,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -16463,18 +17155,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16488,7 +17187,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -16524,6 +17223,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -16533,6 +17233,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -16540,7 +17241,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16554,11 +17259,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16586,18 +17291,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16607,7 +17319,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -16642,6 +17354,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -16649,12 +17363,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16668,7 +17387,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -16706,6 +17425,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -16716,6 +17436,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -16723,7 +17444,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16737,11 +17462,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16772,6 +17497,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -16779,12 +17506,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16794,7 +17526,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -16832,6 +17564,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -16842,6 +17575,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -16849,7 +17583,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16863,7 +17601,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -16898,6 +17636,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -16905,12 +17645,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16924,7 +17669,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -16953,17 +17698,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16977,7 +17729,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -17006,17 +17758,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17030,7 +17789,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -17062,18 +17821,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17087,7 +17853,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -17122,6 +17888,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -17131,6 +17898,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -17138,7 +17906,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17152,11 +17924,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17184,18 +17956,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17205,7 +17984,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -17240,6 +18019,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -17249,6 +18029,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -17256,7 +18037,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17270,7 +18055,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -17295,6 +18080,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17307,6 +18094,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -17318,6 +18106,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17335,7 +18124,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17348,7 +18141,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_ms_deploy_status( @@ -17379,18 +18172,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17404,7 +18204,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -17421,6 +18221,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -17430,6 +18231,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -17437,7 +18239,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -17453,7 +18259,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -17490,8 +18296,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -17504,6 +18311,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -17528,10 +18336,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -17562,18 +18369,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17589,7 +18403,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -17619,6 +18433,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17632,6 +18448,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -17644,6 +18461,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17661,7 +18479,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17674,7 +18496,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -17709,6 +18531,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -17716,12 +18540,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17737,11 +18566,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17775,6 +18604,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -17782,12 +18613,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -17797,7 +18633,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -17833,6 +18669,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -17840,12 +18678,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17861,7 +18704,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -17895,6 +18738,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17909,6 +18754,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -17922,6 +18768,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17939,7 +18786,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17952,7 +18803,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -17990,6 +18841,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -17998,12 +18851,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18019,7 +18877,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -18051,6 +18909,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18065,6 +18925,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -18078,6 +18939,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18095,7 +18957,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18108,7 +18974,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def get_instance_process_thread( @@ -18148,6 +19014,8 @@ def get_instance_process_thread( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_thread_request( resource_group_name=resource_group_name, @@ -18156,12 +19024,17 @@ def get_instance_process_thread( thread_id=thread_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_thread.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18177,7 +19050,7 @@ def get_instance_process_thread( return deserialized - get_instance_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} # type: ignore + get_instance_process_thread.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -18206,17 +19079,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18230,7 +19110,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -18259,17 +19139,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18283,7 +19170,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -18308,6 +19195,8 @@ def list_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18320,6 +19209,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -18331,6 +19221,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18348,7 +19239,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18361,7 +19256,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'} # type: ignore + list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics( @@ -18381,12 +19276,12 @@ def list_metrics( :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. + default. Default value is None. :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -18395,6 +19290,8 @@ def list_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18407,6 +19304,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -18420,6 +19318,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -18439,7 +19338,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18452,7 +19355,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics"} # type: ignore def _migrate_storage_initial( self, @@ -18468,6 +19371,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -18476,6 +19380,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -18484,7 +19389,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18498,7 +19407,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -18536,8 +19445,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -18550,6 +19460,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18574,10 +19485,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -18592,6 +19502,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -18600,6 +19511,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -18607,7 +19519,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18621,7 +19537,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -18654,8 +19570,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -18667,6 +19584,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18691,10 +19609,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -18724,17 +19641,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18748,7 +19672,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -18780,18 +19704,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18807,7 +19738,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -18828,11 +19759,11 @@ def start_web_site_network_trace( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -18845,11 +19776,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18858,7 +19792,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18872,7 +19810,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore @distributed_trace @@ -18901,17 +19839,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18925,11 +19870,11 @@ def stop_web_site_network_trace( return deserialized - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18954,17 +19899,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18974,7 +19926,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -18995,7 +19947,7 @@ def list_perf_mon_counters( :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]'. + '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -19004,6 +19956,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19016,6 +19970,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -19028,6 +19983,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -19046,7 +20002,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19059,7 +20019,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -19087,17 +20047,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19111,7 +20078,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -19140,17 +20107,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19164,7 +20138,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -19196,18 +20170,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19221,7 +20202,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -19256,6 +20237,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -19265,6 +20247,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -19272,7 +20255,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19286,11 +20273,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19318,18 +20305,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19339,7 +20333,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -19365,6 +20359,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19377,6 +20373,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -19388,6 +20385,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19405,7 +20403,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19418,7 +20420,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -19449,18 +20451,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19476,11 +20485,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19510,18 +20519,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19531,7 +20547,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -19563,18 +20579,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19590,7 +20613,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -19620,6 +20643,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19633,6 +20658,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -19645,6 +20671,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19662,7 +20689,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19675,7 +20706,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -19709,6 +20740,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -19716,12 +20749,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19737,7 +20775,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -19765,6 +20803,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19778,6 +20818,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -19790,6 +20831,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19807,7 +20849,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19820,7 +20866,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def get_process_thread( @@ -19856,6 +20902,8 @@ def get_process_thread( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_thread_request( resource_group_name=resource_group_name, @@ -19863,12 +20911,17 @@ def get_process_thread( process_id=process_id, thread_id=thread_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_thread.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19884,7 +20937,7 @@ def get_process_thread( return deserialized - get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} # type: ignore + get_process_thread.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -19909,6 +20962,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19921,6 +20976,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -19932,6 +20988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19949,7 +21006,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19962,7 +21023,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -19993,18 +21054,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20018,7 +21086,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -20054,6 +21122,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -20063,6 +21132,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -20070,7 +21140,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20084,11 +21158,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20116,18 +21190,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20137,7 +21218,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -20171,6 +21252,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -20179,6 +21261,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -20186,7 +21269,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20200,10 +21287,10 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore - def _recover_initial( + def _recover_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20216,6 +21303,7 @@ def _recover_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') @@ -20224,6 +21312,7 @@ def _recover_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._recover_initial.metadata['url'], @@ -20231,7 +21320,11 @@ def _recover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20241,11 +21334,11 @@ def _recover_initial( if cls: return cls(pipeline_response, None, {}) - _recover_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover'} # type: ignore + _recover_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover"} # type: ignore @distributed_trace - def begin_recover( + def begin_recover( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20275,8 +21368,9 @@ def begin_recover( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -20288,6 +21382,7 @@ def begin_recover( resource_group_name=resource_group_name, name=name, recovery_entity=recovery_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20309,13 +21404,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_recover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover'} # type: ignore + begin_recover.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20342,17 +21436,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20362,11 +21463,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20383,10 +21484,11 @@ def restart( :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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -20399,11 +21501,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -20411,7 +21516,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20421,7 +21530,7 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore @distributed_trace @@ -20446,6 +21555,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20458,6 +21569,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -20469,6 +21581,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20486,7 +21599,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20499,7 +21616,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -20530,18 +21647,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20557,7 +21681,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -20573,18 +21697,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -20603,7 +21734,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -20637,7 +21768,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -20649,6 +21781,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -20672,13 +21805,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20706,18 +21838,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20727,7 +21866,7 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -20750,6 +21889,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20762,6 +21903,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -20773,6 +21915,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20790,7 +21933,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20803,7 +21950,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -20834,18 +21981,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20861,7 +22015,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -20882,6 +22036,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -20891,6 +22046,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, skip_dns_registration=skip_dns_registration, @@ -20902,7 +22058,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20920,7 +22080,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -20954,14 +22114,16 @@ def begin_create_or_update_slot( :type site_envelope: ~azure.mgmt.web.v2016_08_01.models.Site :param skip_dns_registration: If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation. + only used for app creation. Default value is None. :type skip_dns_registration: bool :param skip_custom_domain_verification: If true, custom (non *.azurewebsites.net) domains - associated with web app are not verified. + associated with web app are not verified. Default value is None. :type skip_custom_domain_verification: bool - :param force_dns_registration: If true, web app hostname is force registered with DNS. + :param force_dns_registration: If true, web app hostname is force registered with DNS. Default + value is None. :type force_dns_registration: bool - :param ttl_in_seconds: Time to live in seconds for web app's default domain name. + :param ttl_in_seconds: Time to live in seconds for web app's default domain name. Default value + is None. :type ttl_in_seconds: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -20975,8 +22137,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -20993,6 +22156,7 @@ def begin_create_or_update_slot( skip_custom_domain_verification=skip_custom_domain_verification, force_dns_registration=force_dns_registration, ttl_in_seconds=ttl_in_seconds, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21017,13 +22181,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21044,13 +22207,13 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool - :param skip_dns_registration: If true, DNS registration is skipped. + :param skip_dns_registration: If true, DNS registration is skipped. Default value is None. :type skip_dns_registration: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -21063,12 +22226,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, skip_dns_registration=skip_dns_registration, @@ -21077,7 +22243,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -21087,7 +22257,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -21121,14 +22291,16 @@ def update_slot( :type site_envelope: ~azure.mgmt.web.v2016_08_01.models.SitePatchResource :param skip_dns_registration: If true web app hostname is not registered with DNS on creation. This parameter is - only used for app creation. + only used for app creation. Default value is None. :type skip_dns_registration: bool :param skip_custom_domain_verification: If true, custom (non *.azurewebsites.net) domains - associated with web app are not verified. + associated with web app are not verified. Default value is None. :type skip_custom_domain_verification: bool - :param force_dns_registration: If true, web app hostname is force registered with DNS. + :param force_dns_registration: If true, web app hostname is force registered with DNS. Default + value is None. :type force_dns_registration: bool - :param ttl_in_seconds: Time to live in seconds for web app's default domain name. + :param ttl_in_seconds: Time to live in seconds for web app's default domain name. Default value + is None. :type ttl_in_seconds: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Site, or the result of cls(response) @@ -21141,6 +22313,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -21150,6 +22323,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, skip_dns_registration=skip_dns_registration, @@ -21161,7 +22335,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21179,7 +22357,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -21201,7 +22379,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -21214,19 +22392,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21240,11 +22425,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21276,6 +22461,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -21285,6 +22471,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -21292,7 +22479,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21302,7 +22493,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -21339,6 +22530,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -21348,6 +22540,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -21355,7 +22548,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21369,7 +22566,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -21397,6 +22594,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21410,6 +22609,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -21422,6 +22622,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21439,7 +22640,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21452,7 +22657,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def discover_restore_slot( @@ -21488,6 +22693,7 @@ def discover_restore_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -21497,6 +22703,7 @@ def discover_restore_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_restore_slot.metadata['url'], @@ -21504,7 +22711,11 @@ def discover_restore_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21518,7 +22729,7 @@ def discover_restore_slot( return deserialized - discover_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover'} # type: ignore + discover_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover"} # type: ignore @distributed_trace @@ -21554,6 +22765,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -21561,12 +22774,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21580,11 +22798,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21616,6 +22834,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -21623,12 +22843,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21638,7 +22863,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -21680,6 +22905,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -21690,6 +22916,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -21697,7 +22924,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21711,7 +22942,7 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore def _restore_slot_initial( @@ -21729,6 +22960,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -21739,6 +22971,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -21746,7 +22979,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21760,7 +22997,7 @@ def _restore_slot_initial( return deserialized - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace @@ -21801,8 +23038,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.RestoreResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RestoreResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -21816,6 +23054,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21840,10 +23079,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -21871,6 +23109,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21884,6 +23124,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -21896,6 +23137,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21913,7 +23155,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21926,7 +23172,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -21961,6 +23207,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -21970,6 +23217,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -21977,7 +23225,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21991,7 +23243,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -22024,18 +23276,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22049,7 +23308,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -22084,6 +23343,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -22093,6 +23353,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -22100,7 +23361,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22114,7 +23379,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -22147,18 +23412,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22172,7 +23444,7 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace @@ -22208,6 +23480,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -22217,6 +23490,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -22224,7 +23498,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22238,11 +23516,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22271,18 +23549,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22292,7 +23577,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -22325,18 +23610,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22350,7 +23642,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -22386,6 +23678,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -22395,6 +23688,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -22402,7 +23696,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22416,7 +23714,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -22449,18 +23747,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22474,7 +23779,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -22507,18 +23812,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22532,7 +23844,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -22569,6 +23881,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -22578,6 +23891,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -22585,7 +23899,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22599,7 +23917,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -22635,6 +23953,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -22644,6 +23963,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -22651,7 +23971,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22665,7 +23989,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -22698,18 +24022,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22723,7 +24054,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -22739,18 +24070,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22764,7 +24102,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -22798,7 +24136,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -22810,6 +24149,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -22833,10 +24173,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -22870,6 +24209,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -22879,6 +24219,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -22886,7 +24227,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22900,7 +24245,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -22932,18 +24277,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22957,7 +24309,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -22992,18 +24344,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23017,7 +24376,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -23053,6 +24412,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -23062,6 +24422,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -23069,7 +24430,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23083,7 +24448,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -23119,6 +24484,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -23128,6 +24494,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -23135,7 +24502,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23149,7 +24520,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -23180,6 +24551,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23193,6 +24566,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -23205,6 +24579,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23222,7 +24597,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23235,7 +24614,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -23270,6 +24649,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -23277,12 +24658,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23296,11 +24682,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23332,6 +24718,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -23339,12 +24727,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -23354,7 +24747,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -23386,18 +24779,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23413,7 +24813,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -23445,18 +24845,25 @@ def get_web_site_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_site_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23472,7 +24879,7 @@ def get_web_site_container_logs_zip_slot( 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'} # type: ignore + get_web_site_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -23501,6 +24908,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23514,6 +24923,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -23526,6 +24936,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23543,7 +24954,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23556,7 +24971,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -23591,6 +25006,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -23598,12 +25015,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23619,11 +25041,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23655,6 +25077,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -23662,12 +25086,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23677,11 +25106,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23713,6 +25142,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -23720,12 +25151,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23735,11 +25171,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23771,6 +25207,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -23778,12 +25216,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23793,7 +25236,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -23821,6 +25264,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23834,6 +25279,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -23846,6 +25292,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23863,7 +25310,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23876,7 +25327,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -23911,6 +25362,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -23918,12 +25371,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23937,7 +25395,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -23976,6 +25434,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -23986,6 +25445,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -23993,7 +25453,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24007,11 +25471,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24043,6 +25507,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -24050,12 +25516,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24065,7 +25536,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -24102,6 +25573,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -24109,12 +25582,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24128,7 +25606,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -24156,6 +25634,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24169,6 +25649,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -24181,6 +25662,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24198,7 +25680,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24211,7 +25697,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -24246,6 +25732,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -24253,12 +25741,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24272,7 +25765,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -24311,6 +25804,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -24321,6 +25815,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -24328,7 +25823,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24342,11 +25841,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24378,6 +25877,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -24385,12 +25886,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24400,7 +25906,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -24439,6 +25945,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -24449,6 +25956,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -24456,7 +25964,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24470,7 +25982,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -24502,18 +26014,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24527,7 +26046,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -24544,6 +26063,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -24553,6 +26073,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -24560,7 +26081,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -24576,7 +26101,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -24613,8 +26138,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -24627,6 +26153,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24651,10 +26178,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -24685,18 +26211,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24712,7 +26245,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -24741,6 +26274,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24754,6 +26289,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -24766,6 +26302,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24783,7 +26320,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24796,7 +26337,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -24827,18 +26368,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24852,7 +26400,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -24888,6 +26436,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -24895,12 +26445,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24916,7 +26471,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -24934,6 +26489,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -24944,6 +26500,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -24951,7 +26508,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -24965,7 +26526,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -25006,8 +26567,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -25021,6 +26583,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25045,13 +26608,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25083,6 +26645,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -25090,12 +26654,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -25105,7 +26674,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -25141,6 +26710,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -25148,12 +26719,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25167,7 +26743,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -25196,6 +26772,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25209,6 +26787,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -25221,6 +26800,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25238,7 +26818,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25251,7 +26835,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -25286,6 +26870,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -25293,12 +26879,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25312,7 +26903,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -25352,6 +26943,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -25362,6 +26954,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -25369,7 +26962,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25383,11 +26980,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25419,6 +27016,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -25426,12 +27025,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -25441,7 +27045,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -25479,6 +27083,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -25487,12 +27093,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25506,7 +27117,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -25547,6 +27158,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -25558,6 +27170,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -25565,7 +27178,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25579,11 +27196,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25617,6 +27234,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -25625,12 +27244,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25640,7 +27264,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -25681,6 +27305,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -25692,6 +27317,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -25699,7 +27325,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25713,7 +27343,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -25751,6 +27381,8 @@ def list_hybrid_connection_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_hybrid_connection_keys_slot_request( resource_group_name=resource_group_name, @@ -25759,12 +27391,17 @@ def list_hybrid_connection_keys_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25778,7 +27415,7 @@ def list_hybrid_connection_keys_slot( 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'} # type: ignore + list_hybrid_connection_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -25810,18 +27447,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25835,7 +27479,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -25868,18 +27512,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25893,7 +27544,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -25929,6 +27580,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -25936,12 +27589,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25955,7 +27613,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -25994,6 +27652,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -26004,6 +27663,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -26011,7 +27671,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26025,11 +27689,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26061,6 +27725,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -26068,12 +27734,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26083,7 +27754,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -26122,6 +27793,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -26132,6 +27804,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -26139,7 +27812,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26153,7 +27830,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -26182,6 +27859,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26195,6 +27874,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -26207,6 +27887,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26224,7 +27905,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26237,7 +27922,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_ms_deploy_status_slot( @@ -26271,6 +27956,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -26278,12 +27965,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26297,7 +27989,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -26315,6 +28007,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -26325,6 +28018,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -26332,7 +28026,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -26348,7 +28046,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -26388,8 +28086,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -26403,6 +28102,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26427,10 +28127,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -26464,6 +28163,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -26471,12 +28172,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26492,7 +28198,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -26526,6 +28232,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26540,6 +28248,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -26553,6 +28262,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26570,7 +28280,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26583,7 +28297,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -26622,6 +28336,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -26630,12 +28346,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26651,11 +28372,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26693,6 +28414,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -26701,12 +28424,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -26716,7 +28444,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -26756,6 +28484,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -26764,12 +28494,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26785,7 +28520,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -26823,6 +28558,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26838,6 +28575,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -26852,6 +28590,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26869,7 +28608,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26882,7 +28625,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -26924,6 +28667,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -26933,12 +28678,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26954,7 +28704,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -26990,6 +28740,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27005,6 +28757,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -27019,6 +28772,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27036,7 +28790,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -27049,7 +28807,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def get_instance_process_thread_slot( @@ -27093,6 +28851,8 @@ def get_instance_process_thread_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_instance_process_thread_slot_request( resource_group_name=resource_group_name, @@ -27102,12 +28862,17 @@ def get_instance_process_thread_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_thread_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -27123,7 +28888,7 @@ def get_instance_process_thread_slot( 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}'} # type: ignore + get_instance_process_thread_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -27156,18 +28921,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27181,7 +28953,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -27214,18 +28986,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27239,7 +29018,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -27268,6 +29047,8 @@ def list_metric_definitions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27281,6 +29062,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions_slot.metadata['url'], ) request = _convert_request(request) @@ -27293,6 +29075,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27310,7 +29093,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27323,7 +29110,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} # type: ignore + list_metric_definitions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics_slot( @@ -27347,12 +29134,12 @@ def list_metrics_slot( of the production slot. :type slot: str :param details: Specify "true" to include metric details in the response. It is "false" by - default. + default. Default value is None. :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -27361,6 +29148,8 @@ def list_metrics_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27374,6 +29163,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics_slot.metadata['url'], @@ -27388,6 +29178,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -27407,7 +29198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27420,7 +29215,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} # type: ignore + list_metrics_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics"} # type: ignore @distributed_trace def get_migrate_my_sql_status_slot( @@ -27453,18 +29248,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27478,7 +29280,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -27514,6 +29316,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -27521,12 +29325,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -27542,7 +29351,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -27566,11 +29375,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -27583,12 +29392,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -27597,7 +29409,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27611,7 +29427,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore @distributed_trace @@ -27643,18 +29459,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27668,11 +29491,11 @@ def stop_web_site_network_trace_slot( return deserialized - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27701,18 +29524,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -27722,7 +29552,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -27746,7 +29576,7 @@ def list_perf_mon_counters_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]'. + '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -27755,6 +29585,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27768,6 +29600,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -27781,6 +29614,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -27799,7 +29633,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27812,7 +29650,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -27843,18 +29681,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27868,7 +29713,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -27901,18 +29746,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27926,7 +29778,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -27962,6 +29814,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -27969,12 +29823,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27988,7 +29847,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -28027,6 +29886,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -28037,6 +29897,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -28044,7 +29905,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28058,11 +29923,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28094,6 +29959,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -28101,12 +29968,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28116,7 +29988,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -28146,6 +30018,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28159,6 +30033,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -28171,6 +30046,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28188,7 +30064,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28201,7 +30081,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -28236,6 +30116,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -28243,12 +30125,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28264,11 +30151,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28302,6 +30189,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -28309,12 +30198,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -28324,7 +30218,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -28360,6 +30254,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -28367,12 +30263,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28388,7 +30289,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -28422,6 +30323,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28436,6 +30339,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -28449,6 +30353,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28466,7 +30371,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28479,7 +30388,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -28517,6 +30426,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -28525,12 +30436,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28546,7 +30462,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -28578,6 +30494,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28592,6 +30510,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -28605,6 +30524,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28622,7 +30542,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28635,7 +30559,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def get_process_thread_slot( @@ -28675,6 +30599,8 @@ def get_process_thread_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_process_thread_slot_request( resource_group_name=resource_group_name, @@ -28683,12 +30609,17 @@ def get_process_thread_slot( thread_id=thread_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_thread_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28704,7 +30635,7 @@ def get_process_thread_slot( return deserialized - get_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'} # type: ignore + get_process_thread_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -28733,6 +30664,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28746,6 +30679,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -28758,6 +30692,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28775,7 +30710,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28788,7 +30727,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -28823,6 +30762,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -28830,12 +30771,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28849,7 +30795,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -28889,6 +30835,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -28899,6 +30846,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -28906,7 +30854,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28920,11 +30872,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28956,6 +30908,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -28963,12 +30917,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28978,7 +30937,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -29016,6 +30975,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -29025,6 +30985,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -29032,7 +30993,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29046,10 +31011,10 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore - def _recover_slot_initial( + def _recover_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29063,6 +31028,7 @@ def _recover_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') @@ -29072,6 +31038,7 @@ def _recover_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._recover_slot_initial.metadata['url'], @@ -29079,7 +31046,11 @@ def _recover_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -29089,11 +31060,11 @@ def _recover_slot_initial( if cls: return cls(pipeline_response, None, {}) - _recover_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover'} # type: ignore + _recover_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover"} # type: ignore @distributed_trace - def begin_recover_slot( + def begin_recover_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29126,8 +31097,9 @@ def begin_recover_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -29140,6 +31112,7 @@ def begin_recover_slot( name=name, slot=slot, recovery_entity=recovery_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -29161,13 +31134,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_recover_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover'} # type: ignore + begin_recover_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29198,18 +31170,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29219,11 +31198,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29244,10 +31223,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -29260,12 +31240,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -29273,7 +31256,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29283,7 +31270,7 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore @distributed_trace @@ -29312,6 +31299,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29325,6 +31314,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -29337,6 +31327,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29354,7 +31345,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29367,7 +31362,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -29402,6 +31397,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -29409,12 +31406,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29430,7 +31432,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -29447,6 +31449,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -29454,12 +31458,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -29478,7 +31487,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -29516,7 +31525,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -29529,6 +31539,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -29552,13 +31563,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29590,6 +31600,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -29597,12 +31609,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -29612,7 +31629,7 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -29644,6 +31661,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -29660,6 +31678,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -29675,6 +31694,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -29694,7 +31714,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29707,9 +31731,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29723,6 +31747,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -29732,6 +31757,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -29739,7 +31765,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -29749,11 +31779,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29786,8 +31816,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -29800,6 +31831,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -29821,10 +31853,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -29849,6 +31880,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29862,6 +31895,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -29874,6 +31908,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29891,7 +31926,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29904,7 +31943,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def get_source_control_slot( @@ -29936,18 +31975,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -29968,7 +32014,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -29985,6 +32031,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -29994,6 +32041,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -30001,7 +32049,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -30022,7 +32074,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -30060,8 +32112,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -30074,6 +32127,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -30098,13 +32152,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30133,18 +32186,25 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -30154,7 +32214,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -30190,6 +32250,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -30199,6 +32260,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -30206,7 +32268,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -30224,11 +32290,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30257,18 +32323,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30278,11 +32351,11 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30311,18 +32384,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30332,11 +32412,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30364,18 +32444,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30385,11 +32472,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30418,18 +32505,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30439,7 +32533,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -30468,6 +32562,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30481,6 +32577,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -30493,6 +32590,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30510,7 +32608,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30523,7 +32625,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -30558,6 +32660,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -30565,12 +32669,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30586,11 +32695,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30622,6 +32731,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -30629,12 +32740,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30644,7 +32760,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -30676,6 +32792,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30690,6 +32808,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -30703,6 +32822,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30720,7 +32840,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30733,7 +32857,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -30771,6 +32895,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -30779,12 +32905,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30800,11 +32931,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30836,6 +32967,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -30843,12 +32976,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30858,7 +32996,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -30884,7 +33022,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -30893,6 +33031,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30906,6 +33046,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -30919,6 +33060,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -30937,7 +33079,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30950,7 +33096,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -30982,18 +33128,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31007,7 +33160,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -31043,6 +33196,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -31050,12 +33205,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31069,7 +33229,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -31110,6 +33270,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -31120,6 +33281,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -31127,7 +33289,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31141,11 +33307,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31177,6 +33343,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -31184,12 +33352,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31199,7 +33372,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -31240,6 +33413,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -31250,6 +33424,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -31257,7 +33432,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31271,7 +33450,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -31310,6 +33489,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -31318,12 +33499,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31339,7 +33525,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -31381,6 +33567,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -31392,6 +33579,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -31399,7 +33587,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31413,7 +33605,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -31455,6 +33647,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -31466,6 +33659,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -31473,7 +33667,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31487,7 +33685,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -31514,6 +33712,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31527,6 +33727,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -31539,6 +33740,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31556,7 +33758,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31569,7 +33775,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -31604,6 +33810,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -31611,12 +33819,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31630,7 +33843,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -31658,6 +33871,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -31673,6 +33887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -31687,6 +33902,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -31706,7 +33922,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31719,9 +33939,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31734,6 +33954,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -31742,6 +33963,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -31749,7 +33971,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -31759,11 +33985,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31792,8 +34018,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -31805,6 +34032,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -31826,10 +34054,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -31851,6 +34078,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31863,6 +34092,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -31874,6 +34104,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31891,7 +34122,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31904,7 +34139,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def get_source_control( @@ -31932,17 +34167,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -31963,7 +34205,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -31979,6 +34221,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -31987,6 +34230,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -31994,7 +34238,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -32015,7 +34263,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -32049,8 +34297,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_08_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -32062,6 +34311,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -32086,13 +34336,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32117,17 +34366,24 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -32137,7 +34393,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -32169,6 +34425,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -32177,6 +34434,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -32184,7 +34442,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -32202,11 +34464,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32231,17 +34493,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32251,11 +34520,11 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32280,17 +34549,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32300,11 +34576,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32329,17 +34605,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32349,11 +34632,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32378,17 +34661,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32398,7 +34688,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -32423,6 +34713,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32435,6 +34727,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -32446,6 +34739,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32463,7 +34757,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32476,7 +34774,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -32507,18 +34805,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32534,11 +34839,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32566,18 +34871,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -32587,7 +34899,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -32615,6 +34927,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32628,6 +34942,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -32640,6 +34955,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32657,7 +34973,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32670,7 +34990,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -32704,6 +35024,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -32711,12 +35033,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32732,11 +35059,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32764,18 +35091,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32785,7 +35119,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -32807,7 +35141,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -32816,6 +35150,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32828,6 +35164,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -32840,6 +35177,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -32858,7 +35196,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32871,7 +35213,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -32899,17 +35241,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32923,7 +35272,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -32955,18 +35304,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32980,7 +35336,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -33017,6 +35373,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -33026,6 +35383,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -33033,7 +35391,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33047,11 +35409,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33079,18 +35441,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33100,7 +35469,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -33137,6 +35506,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -33146,6 +35516,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -33153,7 +35524,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33167,7 +35542,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -33202,6 +35577,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -33209,12 +35586,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33230,7 +35612,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -33268,6 +35650,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -33278,6 +35661,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -33285,7 +35669,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33299,7 +35687,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -33337,6 +35725,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -33347,6 +35736,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -33354,7 +35744,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33368,7 +35762,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -33391,6 +35785,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_08_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33403,6 +35799,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -33414,6 +35811,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33431,7 +35829,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33444,7 +35846,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -33475,18 +35877,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-08-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33500,5 +35909,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_configuration.py index 157f9ae249db..9bec395a673c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2016-09-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2016-09-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_metadata.json index 3c6d2582c52f..189bb041b088 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_web_site_management_client.py index 87ab8695ca70..24dab0145618 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -34,8 +35,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2016-09-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -60,7 +64,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_configuration.py index 09a32745b57b..4e9a14aad4a5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2016-09-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2016-09-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_web_site_management_client.py index 506bc7f23dbe..daf00331b994 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -34,8 +35,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2016-09-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_environments_operations.py index 120fb9bc80ff..47efa12ab790 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -134,6 +141,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +154,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -155,6 +165,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +183,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -213,17 +228,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -237,7 +259,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -253,6 +275,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -261,6 +284,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -268,7 +292,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -287,7 +315,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -323,8 +351,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -336,6 +365,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -360,12 +390,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -378,18 +407,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204, 400, 404, 409]: @@ -399,11 +435,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -433,7 +469,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -445,6 +482,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -465,10 +503,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -500,6 +537,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -508,6 +546,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -515,7 +554,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -534,7 +577,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -559,6 +602,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -571,6 +616,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -582,6 +628,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -599,7 +646,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +663,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def list_vips( @@ -640,17 +691,24 @@ async def list_vips( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_vips_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vips.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -664,7 +722,7 @@ async def list_vips( return deserialized - list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + list_vips.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore @distributed_trace_async @@ -693,17 +751,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -717,7 +782,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -749,18 +814,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -774,7 +846,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace_async @@ -803,17 +875,24 @@ async def list_metric_definitions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_metric_definitions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -827,7 +906,7 @@ async def list_metric_definitions( return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'} # type: ignore + list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions"} # type: ignore @distributed_trace @@ -853,7 +932,7 @@ def list_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -862,6 +941,8 @@ def list_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -874,6 +955,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -887,6 +969,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -906,7 +989,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -919,7 +1006,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -943,6 +1030,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -955,6 +1044,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -966,6 +1056,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -983,7 +1074,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -996,7 +1091,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1024,17 +1119,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1048,7 +1150,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1064,6 +1166,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1072,6 +1175,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1079,7 +1183,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -1098,7 +1206,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1133,8 +1241,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1146,6 +1255,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1170,10 +1280,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1204,6 +1313,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1212,6 +1322,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1219,7 +1330,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -1238,7 +1353,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1268,6 +1383,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1281,6 +1398,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1293,6 +1411,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1310,7 +1429,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1323,7 +1446,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_instance_metrics( @@ -1354,6 +1477,8 @@ def list_multi_role_pool_instance_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1367,6 +1492,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, template_url=self.list_multi_role_pool_instance_metrics.metadata['url'], ) @@ -1380,6 +1506,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, template_url=next_link, ) @@ -1398,7 +1525,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1411,7 +1542,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'} # type: ignore + list_multi_role_pool_instance_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1435,6 +1566,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1447,6 +1580,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1458,6 +1592,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1475,7 +1610,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1488,7 +1627,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metrics( @@ -1510,11 +1649,11 @@ def list_multi_role_metrics( :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. + :param start_time: Beginning time of the metrics query. Default value is None. :type start_time: str - :param end_time: End time of the metrics query. + :param end_time: End time of the metrics query. Default value is None. :type end_time: str - :param time_grain: Time granularity of the metrics query. + :param time_grain: Time granularity of the metrics query. Default value is None. :type time_grain: str :param details: Specify :code:`true` to include instance details. The default is :code:`false`. @@ -1522,7 +1661,7 @@ def list_multi_role_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -1531,6 +1670,8 @@ def list_multi_role_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1543,6 +1684,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1559,6 +1701,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1581,7 +1724,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1594,7 +1741,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'} # type: ignore + list_multi_role_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1617,6 +1764,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1629,6 +1778,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1640,6 +1790,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1657,7 +1808,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1670,7 +1825,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1693,6 +1848,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1705,6 +1862,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1716,6 +1874,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1733,7 +1892,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1746,7 +1909,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -1774,17 +1937,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1798,11 +1968,11 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1827,17 +1997,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 400, 404, 409]: @@ -1847,7 +2024,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -1862,17 +2039,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1890,7 +2074,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -1923,6 +2107,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1935,6 +2121,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -1946,6 +2133,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1963,7 +2151,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1973,7 +2165,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -1984,6 +2176,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1993,8 +2186,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2010,10 +2202,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2038,6 +2229,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2050,6 +2243,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2061,6 +2255,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2078,7 +2273,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2091,7 +2290,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2109,7 +2308,8 @@ def list_web_apps( :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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2117,6 +2317,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2129,6 +2331,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2141,6 +2344,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2159,7 +2363,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2172,7 +2380,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2186,17 +2394,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2214,7 +2429,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2247,6 +2462,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2259,6 +2476,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2270,6 +2488,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2287,7 +2506,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2297,7 +2520,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2308,6 +2531,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2317,8 +2541,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2334,10 +2557,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2359,7 +2581,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2368,6 +2590,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2380,6 +2604,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2392,6 +2617,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2410,7 +2636,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2423,7 +2653,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -2447,6 +2677,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2459,6 +2691,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -2470,6 +2703,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2487,7 +2721,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2500,7 +2738,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -2531,18 +2769,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2556,7 +2801,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -2573,6 +2818,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2582,6 +2828,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -2589,7 +2836,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -2608,7 +2859,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -2646,8 +2897,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2660,6 +2912,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2684,10 +2937,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -2721,6 +2973,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2730,6 +2983,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -2737,7 +2991,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -2756,7 +3014,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -2787,6 +3045,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2801,6 +3061,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2814,6 +3075,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2831,7 +3093,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2844,7 +3110,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_instance_metrics( @@ -2875,7 +3141,7 @@ def list_worker_pool_instance_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -2884,6 +3150,8 @@ def list_worker_pool_instance_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2898,6 +3166,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_worker_pool_instance_metrics.metadata['url'], @@ -2913,6 +3182,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -2932,7 +3202,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2945,7 +3219,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'} # type: ignore + list_worker_pool_instance_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -2972,6 +3246,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2985,6 +3261,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2997,6 +3274,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3014,7 +3292,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3027,7 +3309,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metrics( @@ -3055,7 +3337,7 @@ def list_web_worker_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -3064,6 +3346,8 @@ def list_web_worker_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3077,6 +3361,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_web_worker_metrics.metadata['url'], @@ -3091,6 +3376,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -3110,7 +3396,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3123,7 +3413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'} # type: ignore + list_web_worker_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -3149,6 +3439,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3162,6 +3454,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3174,6 +3467,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3191,7 +3485,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3204,7 +3502,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3230,6 +3528,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3243,6 +3543,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3255,6 +3556,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3272,7 +3574,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3285,4 +3591,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_plans_operations.py index 8cb8b9c72fb4..52b8a236770d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -120,7 +127,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -141,6 +148,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -152,6 +161,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -162,6 +172,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -179,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +207,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -220,17 +235,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -246,7 +268,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -262,6 +284,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -270,6 +293,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -277,7 +301,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -298,7 +326,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -332,8 +360,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -345,6 +374,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -369,13 +399,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -400,17 +429,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -420,7 +456,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -452,6 +488,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -460,6 +497,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -467,7 +505,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -485,7 +527,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -514,17 +556,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -538,7 +587,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -573,6 +622,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -580,12 +631,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -599,11 +655,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -634,6 +690,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -641,12 +699,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -656,7 +719,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -691,6 +754,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -698,12 +763,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -717,7 +787,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -747,6 +817,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -761,6 +833,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -774,6 +847,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -791,7 +865,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -804,7 +882,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -832,17 +910,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -856,7 +941,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -881,6 +966,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -893,6 +980,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -904,6 +992,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -921,7 +1010,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -934,7 +1027,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace def list_metric_defintions( @@ -958,6 +1051,8 @@ def list_metric_defintions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -970,6 +1065,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_defintions.metadata['url'], ) request = _convert_request(request) @@ -981,6 +1077,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -998,7 +1095,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1011,7 +1112,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metric_defintions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'} # type: ignore + list_metric_defintions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics( @@ -1036,7 +1137,7 @@ def list_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -1045,6 +1146,8 @@ def list_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1057,6 +1160,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -1070,6 +1174,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -1089,7 +1194,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1102,10 +1211,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1135,18 +1244,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1156,7 +1272,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1179,12 +1295,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1192,6 +1309,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1204,6 +1323,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1218,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1238,7 +1359,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1376,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1279,17 +1404,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1303,7 +1435,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1323,7 +1455,8 @@ def list_usages( :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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1332,6 +1465,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2016_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1344,6 +1479,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1356,6 +1492,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1374,7 +1511,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1528,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1415,17 +1556,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1439,7 +1587,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1471,18 +1619,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1498,7 +1653,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1533,6 +1688,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1540,12 +1697,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1559,7 +1721,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1597,6 +1759,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1607,6 +1770,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1614,7 +1778,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1628,7 +1796,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1660,18 +1828,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1685,7 +1860,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1720,6 +1895,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1727,12 +1904,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1748,7 +1930,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1786,6 +1968,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1796,6 +1979,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1803,7 +1987,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1819,11 +2007,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1854,6 +2042,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1861,12 +2051,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1876,7 +2071,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1914,6 +2109,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1924,6 +2120,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1931,7 +2128,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1947,11 +2148,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1979,18 +2180,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2000,5 +2208,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_environments_operations.py index 14f194db60e0..ce2814c78a6d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,27 +183,28 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -214,35 +218,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -255,31 +259,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -290,31 +295,32 @@ def build_list_vips_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -325,31 +331,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -361,10 +368,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -372,21 +380,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -397,31 +405,32 @@ def build_list_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -435,35 +444,36 @@ def build_list_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -474,31 +484,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -509,31 +520,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -547,35 +559,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -591,35 +603,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -633,10 +645,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -644,21 +657,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -672,10 +685,11 @@ def build_list_multi_role_pool_instance_metrics_request( details: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -683,23 +697,23 @@ def build_list_multi_role_pool_instance_metrics_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -710,31 +724,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -751,41 +766,42 @@ def build_list_multi_role_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'str') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'str') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'str') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'str') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str') if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -796,31 +812,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -831,31 +848,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -866,31 +884,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -901,25 +920,26 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -930,31 +950,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -965,31 +986,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1002,33 +1024,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1039,31 +1062,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1076,33 +1100,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1113,31 +1138,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1149,10 +1175,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1160,21 +1187,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1189,12 +1216,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1202,23 +1229,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1235,12 +1262,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1248,23 +1275,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1279,10 +1306,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1291,21 +1319,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1321,10 +1349,11 @@ def build_list_worker_pool_instance_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1333,25 +1362,25 @@ def build_list_worker_pool_instance_metrics_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1363,10 +1392,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1374,21 +1404,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1403,10 +1433,11 @@ def build_list_web_worker_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1414,25 +1445,25 @@ def build_list_web_worker_metrics_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1444,10 +1475,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1455,21 +1487,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1481,10 +1513,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1492,25 +1525,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1548,6 +1581,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1558,6 +1593,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1567,6 +1603,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1584,7 +1621,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1597,7 +1638,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1618,6 +1659,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1629,6 +1672,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1639,6 +1683,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1656,7 +1701,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1669,7 +1718,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1697,17 +1746,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1721,7 +1777,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1737,6 +1793,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1745,6 +1802,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1752,7 +1810,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -1771,7 +1833,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1807,8 +1869,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_09_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1820,6 +1883,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1844,12 +1908,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1862,18 +1925,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204, 400, 404, 409]: @@ -1883,11 +1953,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1917,7 +1987,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1929,6 +2000,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1949,10 +2021,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -1984,6 +2055,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -1992,6 +2064,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1999,7 +2072,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -2018,7 +2095,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -2043,6 +2120,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2055,6 +2134,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -2066,6 +2146,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2083,7 +2164,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2096,7 +2181,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def list_vips( @@ -2124,17 +2209,24 @@ def list_vips( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_vips_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vips.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2148,7 +2240,7 @@ def list_vips( return deserialized - list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + list_vips.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore @distributed_trace @@ -2177,17 +2269,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2201,7 +2300,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2233,18 +2332,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2258,7 +2364,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2287,17 +2393,24 @@ def list_metric_definitions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_metric_definitions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2311,7 +2424,7 @@ def list_metric_definitions( return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'} # type: ignore + list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions"} # type: ignore @distributed_trace @@ -2337,7 +2450,7 @@ def list_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -2346,6 +2459,8 @@ def list_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2358,6 +2473,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -2371,6 +2487,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -2390,7 +2507,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2403,7 +2524,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2426,6 +2547,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2438,6 +2561,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2449,6 +2573,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2466,7 +2591,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2479,7 +2608,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2507,17 +2636,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2531,7 +2667,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2547,6 +2683,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2555,6 +2692,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2562,7 +2700,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -2581,7 +2723,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2615,8 +2757,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2628,6 +2771,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2652,10 +2796,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -2686,6 +2829,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2694,6 +2838,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -2701,7 +2846,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -2720,7 +2869,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2750,6 +2899,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2763,6 +2914,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2775,6 +2927,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2792,7 +2945,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2805,7 +2962,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_instance_metrics( @@ -2836,6 +2993,8 @@ def list_multi_role_pool_instance_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2849,6 +3008,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, template_url=self.list_multi_role_pool_instance_metrics.metadata['url'], ) @@ -2862,6 +3022,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, template_url=next_link, ) @@ -2880,7 +3041,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2893,7 +3058,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'} # type: ignore + list_multi_role_pool_instance_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -2917,6 +3082,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2929,6 +3096,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2940,6 +3108,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2957,7 +3126,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2970,7 +3143,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metrics( @@ -2992,11 +3165,11 @@ def list_multi_role_metrics( :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. + :param start_time: Beginning time of the metrics query. Default value is None. :type start_time: str - :param end_time: End time of the metrics query. + :param end_time: End time of the metrics query. Default value is None. :type end_time: str - :param time_grain: Time granularity of the metrics query. + :param time_grain: Time granularity of the metrics query. Default value is None. :type time_grain: str :param details: Specify :code:`true` to include instance details. The default is :code:`false`. @@ -3004,7 +3177,7 @@ def list_multi_role_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -3013,6 +3186,8 @@ def list_multi_role_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3025,6 +3200,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -3041,6 +3217,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -3063,7 +3240,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3076,7 +3257,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'} # type: ignore + list_multi_role_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -3098,6 +3279,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3110,6 +3293,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3121,6 +3305,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3138,7 +3323,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3151,7 +3340,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -3173,6 +3362,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3185,6 +3376,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3196,6 +3388,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3213,7 +3406,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3226,7 +3423,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3254,17 +3451,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3278,11 +3482,11 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3307,17 +3511,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 400, 404, 409]: @@ -3327,7 +3538,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -3342,17 +3553,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3370,7 +3588,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3403,6 +3621,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3415,6 +3635,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -3426,6 +3647,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3443,7 +3665,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3453,7 +3679,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3464,6 +3690,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3473,8 +3700,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3490,10 +3716,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3518,6 +3743,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3530,6 +3757,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -3541,6 +3769,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3558,7 +3787,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3571,7 +3804,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -3589,13 +3822,16 @@ def list_web_apps( :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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3608,6 +3844,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -3620,6 +3857,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -3638,7 +3876,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3651,7 +3893,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -3665,17 +3907,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3693,7 +3942,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -3726,6 +3975,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3738,6 +3989,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -3749,6 +4001,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3766,7 +4019,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3776,7 +4033,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3787,6 +4044,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3796,8 +4054,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3813,10 +4070,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -3838,7 +4094,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -3847,6 +4103,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3859,6 +4117,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -3871,6 +4130,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -3889,7 +4149,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3902,7 +4166,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -3925,6 +4189,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3937,6 +4203,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -3948,6 +4215,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3965,7 +4233,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3978,7 +4250,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -4009,18 +4281,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4034,7 +4313,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -4051,6 +4330,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4060,6 +4340,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -4067,7 +4348,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -4086,7 +4371,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4123,8 +4408,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_09_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4137,6 +4423,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4161,10 +4448,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4198,6 +4484,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4207,6 +4494,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4214,7 +4502,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -4233,7 +4525,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4264,6 +4556,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4278,6 +4572,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4291,6 +4586,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4308,7 +4604,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4321,7 +4621,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_instance_metrics( @@ -4352,7 +4652,7 @@ def list_worker_pool_instance_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -4361,6 +4661,8 @@ def list_worker_pool_instance_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4375,6 +4677,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_worker_pool_instance_metrics.metadata['url'], @@ -4390,6 +4693,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -4409,7 +4713,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4422,7 +4730,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'} # type: ignore + list_worker_pool_instance_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -4449,6 +4757,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4462,6 +4772,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4474,6 +4785,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4491,7 +4803,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4504,7 +4820,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metrics( @@ -4532,7 +4848,7 @@ def list_web_worker_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -4541,6 +4857,8 @@ def list_web_worker_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4554,6 +4872,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_web_worker_metrics.metadata['url'], @@ -4568,6 +4887,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -4587,7 +4907,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4600,7 +4924,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'} # type: ignore + list_web_worker_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -4625,6 +4949,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4638,6 +4964,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -4650,6 +4977,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4667,7 +4995,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4680,7 +5012,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -4705,6 +5037,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4718,6 +5052,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -4730,6 +5065,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4747,7 +5083,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4760,4 +5100,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_plans_operations.py index 4b4c5a44deec..acd969939a81 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,25 +185,26 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -214,35 +218,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -255,31 +259,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -292,10 +297,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -304,21 +310,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,9 +337,10 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -342,16 +349,16 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -364,10 +371,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -376,21 +384,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -403,10 +411,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -415,21 +424,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -440,31 +449,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -475,31 +485,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -510,31 +521,32 @@ def build_list_metric_defintions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -548,35 +560,36 @@ def build_list_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -589,27 +602,28 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -624,37 +638,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -665,31 +680,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -702,33 +718,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -739,31 +756,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -775,10 +793,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -786,21 +805,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -813,10 +832,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -825,21 +845,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -855,12 +875,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -869,23 +889,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -899,10 +919,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -910,21 +931,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -937,10 +958,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -949,21 +971,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -979,12 +1001,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -993,23 +1015,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1024,9 +1046,10 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1035,16 +1058,16 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1060,12 +1083,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2016-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1074,23 +1097,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1104,9 +1127,10 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2016-09-01" + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1114,20 +1138,20 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1170,6 +1194,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1180,6 +1206,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1190,6 +1217,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1208,7 +1236,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1221,7 +1253,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1242,6 +1274,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1253,6 +1287,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1263,6 +1298,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1280,7 +1316,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1293,7 +1333,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1321,17 +1361,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1347,7 +1394,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1363,6 +1410,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1371,6 +1419,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1378,7 +1427,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1399,7 +1452,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1433,8 +1486,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2016_09_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1446,6 +1500,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1470,13 +1525,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1501,17 +1555,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1521,7 +1582,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1553,6 +1614,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1561,6 +1623,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1568,7 +1631,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1586,7 +1653,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1615,17 +1682,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1639,7 +1713,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1674,6 +1748,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1681,12 +1757,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1700,11 +1781,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1735,6 +1816,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1742,12 +1825,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1757,7 +1845,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1792,6 +1880,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1799,12 +1889,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1818,7 +1913,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1847,6 +1942,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1861,6 +1958,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1874,6 +1972,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1891,7 +1990,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1904,7 +2007,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1932,17 +2035,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1956,7 +2066,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1981,6 +2091,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1993,6 +2105,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -2004,6 +2117,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2021,7 +2135,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2034,7 +2152,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace def list_metric_defintions( @@ -2058,6 +2176,8 @@ def list_metric_defintions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2070,6 +2190,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_defintions.metadata['url'], ) request = _convert_request(request) @@ -2081,6 +2202,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2098,7 +2220,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2111,7 +2237,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metric_defintions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'} # type: ignore + list_metric_defintions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics( @@ -2136,7 +2262,7 @@ def list_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -2145,6 +2271,8 @@ def list_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2157,6 +2285,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -2170,6 +2299,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -2189,7 +2319,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2202,10 +2336,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2235,18 +2369,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2256,7 +2397,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2279,18 +2420,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2303,6 +2447,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2317,6 +2462,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2337,7 +2483,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2350,7 +2500,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2378,17 +2528,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2402,7 +2559,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2422,7 +2579,8 @@ def list_usages( :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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2431,6 +2589,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2016_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2443,6 +2603,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2455,6 +2616,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2473,7 +2635,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2486,7 +2652,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2514,17 +2680,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2538,7 +2711,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2570,18 +2743,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2597,7 +2777,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2632,6 +2812,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2639,12 +2821,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2658,7 +2845,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2696,6 +2883,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2706,6 +2894,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2713,7 +2902,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2727,7 +2920,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2759,18 +2952,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2784,7 +2984,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2819,6 +3019,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2826,12 +3028,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2847,7 +3054,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2885,6 +3092,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2895,6 +3103,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2902,7 +3111,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2918,11 +3131,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2953,6 +3166,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2960,12 +3175,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2975,7 +3195,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -3013,6 +3233,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -3023,6 +3244,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -3030,7 +3252,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -3046,11 +3272,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3078,18 +3304,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2016-09-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3099,5 +3332,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_configuration.py index 196dc2722f69..ad128e7e6911 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2018-02-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2018-02-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_metadata.json index 1ceac626c42c..6f3dcb39f60d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -179,24 +179,24 @@ "list_billing_meters" : { "sync": { "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.BillingMeterCollection\"]\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "billing_location, os_type" }, "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2018_02_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, @@ -215,12 +215,12 @@ "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" }, @@ -274,12 +274,12 @@ }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" @@ -310,12 +310,12 @@ }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2018_02_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_web_site_management_client.py index f8ba20177385..503fc56cc44c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -62,8 +63,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2018-02-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -100,7 +104,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_configuration.py index 727baaf59c7a..cbfc53a057dd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2018-02-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2018-02-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_web_site_management_client.py index 2ee8184b4e41..ce6329b57119 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -62,8 +63,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2018-02-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_certificate_orders_operations.py index 7001b0256ded..d70c2fb03344 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,10 +121,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any @@ -140,12 +147,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -153,7 +162,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -163,7 +176,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -185,6 +198,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -196,6 +211,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -206,6 +222,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -223,7 +240,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -237,7 +258,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -265,17 +286,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -290,7 +318,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -306,6 +334,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -314,6 +343,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -321,7 +351,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -339,7 +373,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -375,8 +409,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -388,6 +423,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -412,13 +448,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -443,17 +478,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -463,7 +505,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -496,6 +538,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -504,6 +547,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -511,7 +555,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -530,7 +578,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -555,6 +603,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -567,6 +617,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -578,6 +629,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -595,7 +647,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -609,7 +665,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -640,18 +696,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -666,7 +729,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -683,6 +746,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -692,6 +756,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -699,7 +764,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -717,7 +786,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -755,8 +824,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -769,6 +839,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -793,13 +864,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -827,18 +897,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -848,7 +925,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -884,6 +961,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -893,6 +971,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -900,7 +979,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -919,11 +1002,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -952,6 +1035,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -960,6 +1044,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -967,7 +1052,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -977,11 +1066,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1010,6 +1099,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1018,6 +1108,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1025,7 +1116,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1035,11 +1130,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1064,17 +1159,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1084,11 +1186,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1116,6 +1218,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1124,6 +1227,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1131,7 +1235,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1141,7 +1249,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1173,6 +1281,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1181,6 +1290,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1188,7 +1298,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1203,11 +1317,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1232,17 +1346,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1252,7 +1373,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1281,17 +1402,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1306,7 +1434,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1335,17 +1463,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1360,5 +1495,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_environments_operations.py index f9f8acf3eb1d..fb867417aa31 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -290,7 +318,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -326,8 +354,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -339,6 +368,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -363,12 +393,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -381,18 +410,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204, 400, 404, 409]: @@ -402,11 +438,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -436,7 +472,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -448,6 +485,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -468,10 +506,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -503,6 +540,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -511,6 +549,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -518,7 +557,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -537,7 +580,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -562,6 +605,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -574,6 +619,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -585,6 +631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -602,7 +649,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -616,7 +667,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def list_vips( @@ -644,17 +695,24 @@ async def list_vips( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_vips_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vips.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,7 +727,7 @@ async def list_vips( return deserialized - list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + list_vips.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore async def _change_vnet_initial( @@ -685,6 +743,7 @@ async def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -693,6 +752,7 @@ async def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -700,7 +760,11 @@ async def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -718,7 +782,7 @@ async def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -754,6 +818,7 @@ async def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -769,6 +834,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -783,6 +849,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -802,7 +869,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -813,7 +884,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -825,6 +896,7 @@ async def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -835,8 +907,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -852,10 +923,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -884,17 +954,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -909,7 +986,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -941,18 +1018,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -967,7 +1051,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -992,6 +1076,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1004,6 +1090,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1015,6 +1102,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1032,7 +1120,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1046,7 +1138,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace_async async def list_metric_definitions( @@ -1074,17 +1166,24 @@ async def list_metric_definitions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_metric_definitions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1099,7 +1198,7 @@ async def list_metric_definitions( return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'} # type: ignore + list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions"} # type: ignore @distributed_trace @@ -1125,7 +1224,7 @@ def list_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -1134,6 +1233,8 @@ def list_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1146,6 +1247,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -1159,6 +1261,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -1178,7 +1281,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1192,7 +1299,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -1216,6 +1323,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1228,6 +1337,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -1239,6 +1349,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1256,7 +1367,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1270,7 +1385,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1298,17 +1413,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1323,7 +1445,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1339,6 +1461,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1347,6 +1470,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1354,7 +1478,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -1373,7 +1501,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1408,8 +1536,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1421,6 +1550,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1445,10 +1575,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1479,6 +1608,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1487,6 +1617,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1494,7 +1625,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -1513,7 +1648,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1543,6 +1678,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1556,6 +1693,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1568,6 +1706,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1585,7 +1724,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1599,7 +1742,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_instance_metrics( @@ -1630,6 +1773,8 @@ def list_multi_role_pool_instance_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1643,6 +1788,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, template_url=self.list_multi_role_pool_instance_metrics.metadata['url'], ) @@ -1656,6 +1802,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, template_url=next_link, ) @@ -1674,7 +1821,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1688,7 +1839,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'} # type: ignore + list_multi_role_pool_instance_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1712,6 +1863,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1724,6 +1877,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1735,6 +1889,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1752,7 +1907,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1766,7 +1925,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metrics( @@ -1788,11 +1947,11 @@ def list_multi_role_metrics( :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. + :param start_time: Beginning time of the metrics query. Default value is None. :type start_time: str - :param end_time: End time of the metrics query. + :param end_time: End time of the metrics query. Default value is None. :type end_time: str - :param time_grain: Time granularity of the metrics query. + :param time_grain: Time granularity of the metrics query. Default value is None. :type time_grain: str :param details: Specify :code:`true` to include instance details. The default is :code:`false`. @@ -1800,7 +1959,7 @@ def list_multi_role_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -1809,6 +1968,8 @@ def list_multi_role_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1821,6 +1982,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1837,6 +1999,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1859,7 +2022,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1873,7 +2040,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'} # type: ignore + list_multi_role_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1896,6 +2063,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1908,6 +2077,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1919,6 +2089,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1936,7 +2107,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1950,7 +2125,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1973,6 +2148,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1985,6 +2162,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1996,6 +2174,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2013,7 +2192,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2027,7 +2210,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -2055,17 +2238,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2080,7 +2270,7 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -2105,6 +2295,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2117,6 +2309,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2128,6 +2321,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2145,7 +2339,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2159,10 +2357,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2187,17 +2385,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 400, 404, 409]: @@ -2207,7 +2412,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -2222,17 +2427,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2250,7 +2462,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -2283,6 +2495,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2295,6 +2509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -2306,6 +2521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2323,7 +2539,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2334,7 +2554,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2345,6 +2565,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2354,8 +2575,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2371,10 +2591,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2399,6 +2618,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2411,6 +2632,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2422,6 +2644,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2439,7 +2662,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2453,7 +2680,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2471,7 +2698,8 @@ def list_web_apps( :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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2479,6 +2707,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2491,6 +2721,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2503,6 +2734,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2521,7 +2753,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2535,7 +2771,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2549,17 +2785,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2577,7 +2820,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2610,6 +2853,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2622,6 +2867,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2633,6 +2879,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2650,7 +2897,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2661,7 +2912,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2672,6 +2923,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2681,8 +2933,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2698,10 +2949,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2723,7 +2973,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2732,6 +2982,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2744,6 +2996,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2756,6 +3009,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2774,7 +3028,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2788,7 +3046,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -2812,6 +3070,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2824,6 +3084,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -2835,6 +3096,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2852,7 +3114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2866,7 +3132,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -2897,18 +3163,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2923,7 +3196,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -2940,6 +3213,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2949,6 +3223,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -2956,7 +3231,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -2975,7 +3254,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -3013,8 +3292,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3027,6 +3307,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3051,10 +3332,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -3088,6 +3368,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3097,6 +3378,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -3104,7 +3386,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -3123,7 +3409,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -3154,6 +3440,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3168,6 +3456,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3181,6 +3470,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3198,7 +3488,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3212,7 +3506,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_instance_metrics( @@ -3243,7 +3537,7 @@ def list_worker_pool_instance_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -3252,6 +3546,8 @@ def list_worker_pool_instance_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3266,6 +3562,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_worker_pool_instance_metrics.metadata['url'], @@ -3281,6 +3578,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -3300,7 +3598,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3314,7 +3616,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'} # type: ignore + list_worker_pool_instance_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -3341,6 +3643,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3354,6 +3658,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3366,6 +3671,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3383,7 +3689,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3397,7 +3707,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metrics( @@ -3425,7 +3735,7 @@ def list_web_worker_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -3434,6 +3744,8 @@ def list_web_worker_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3447,6 +3759,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_web_worker_metrics.metadata['url'], @@ -3461,6 +3774,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -3480,7 +3794,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3494,7 +3812,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'} # type: ignore + list_web_worker_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -3520,6 +3838,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3533,6 +3853,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3545,6 +3866,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3562,7 +3884,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3576,7 +3902,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3602,6 +3928,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3615,6 +3943,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3627,6 +3956,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3644,7 +3974,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3658,4 +3992,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_plans_operations.py index 75c0f60d81bb..6f9cf10c44f7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -142,6 +149,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -153,6 +162,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -163,6 +173,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -180,7 +191,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +209,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -222,17 +237,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -248,7 +270,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -264,6 +286,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -272,6 +295,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -279,7 +303,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -300,7 +328,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -334,8 +362,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -347,6 +376,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -371,13 +401,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -402,17 +431,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -422,7 +458,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -454,6 +490,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -462,6 +499,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -469,7 +507,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -488,7 +530,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -517,17 +559,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -542,7 +591,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -577,6 +626,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -584,12 +635,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -604,11 +660,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -639,6 +695,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -646,12 +704,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -661,7 +724,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -696,6 +759,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -703,12 +768,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -723,7 +793,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -753,6 +823,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -767,6 +839,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -780,6 +853,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -797,7 +871,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -811,7 +889,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -839,17 +917,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,7 +949,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -889,6 +974,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -901,6 +988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -912,6 +1000,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -929,7 +1018,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -943,7 +1036,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace def list_metric_defintions( @@ -967,6 +1060,8 @@ def list_metric_defintions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -979,6 +1074,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_defintions.metadata['url'], ) request = _convert_request(request) @@ -990,6 +1086,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1007,7 +1104,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1021,7 +1122,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metric_defintions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'} # type: ignore + list_metric_defintions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics( @@ -1046,7 +1147,7 @@ def list_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -1055,6 +1156,8 @@ def list_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1067,6 +1170,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -1080,6 +1184,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -1099,7 +1204,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1113,10 +1222,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1146,18 +1255,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1167,7 +1283,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1190,12 +1306,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1203,6 +1320,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1215,6 +1334,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1229,6 +1349,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1249,7 +1370,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1263,7 +1388,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1291,17 +1416,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1316,7 +1448,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1336,7 +1468,8 @@ def list_usages( :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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1345,6 +1478,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1357,6 +1492,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1369,6 +1505,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1387,7 +1524,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1401,7 +1542,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1429,17 +1570,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1454,7 +1602,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1486,18 +1634,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1513,7 +1668,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1548,6 +1703,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1555,12 +1712,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1575,7 +1737,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1613,6 +1775,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1623,6 +1786,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1630,7 +1794,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1645,7 +1813,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1677,18 +1845,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1703,7 +1878,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1738,6 +1913,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1745,12 +1922,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1766,7 +1948,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1804,6 +1986,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1814,6 +1997,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1821,7 +2005,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1837,11 +2025,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1872,6 +2060,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1879,12 +2069,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1894,7 +2089,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1932,6 +2127,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1942,6 +2138,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1949,7 +2146,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1965,11 +2166,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1997,18 +2198,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2018,5 +2226,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificate_registration_provider_operations.py index 1e8a881116b8..4fb219a9f76c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificates_operations.py index efb26e78c02e..2f17d4affe36 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -133,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -213,17 +228,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +260,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -270,6 +292,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -278,6 +301,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -285,7 +309,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,11 +328,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -329,17 +357,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -349,7 +384,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -381,6 +416,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -389,6 +425,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -396,7 +433,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -411,5 +452,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_deleted_web_apps_operations.py index e9e40a23e647..c85ae91cd8ee 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -133,6 +140,8 @@ def list_by_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace_async async def get_deleted_web_app_by_location( @@ -213,17 +228,24 @@ async def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,5 +260,5 @@ async def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_diagnostics_operations.py index 3774bbd71060..45d72f250489 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -146,11 +153,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -163,12 +170,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -177,7 +187,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +206,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -217,6 +231,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -229,6 +245,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -240,6 +257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,7 +293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -294,11 +316,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -311,12 +333,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -325,7 +350,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,7 +369,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -365,6 +394,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -377,6 +408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -388,6 +420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -405,7 +438,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -419,7 +456,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -450,18 +487,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -476,7 +520,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -504,6 +548,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -517,6 +563,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -529,6 +576,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -546,7 +594,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -560,7 +612,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -594,6 +646,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -601,12 +655,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +680,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -648,11 +707,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -665,6 +724,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -672,6 +733,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -680,7 +742,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -695,7 +761,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -723,6 +789,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +804,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -748,6 +817,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -765,7 +835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -779,7 +853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -809,6 +883,8 @@ def get_site_detector( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -823,6 +899,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) @@ -836,6 +913,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -853,7 +931,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -867,7 +949,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async async def execute_site_detector( @@ -893,11 +975,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -910,6 +992,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -917,6 +1001,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -925,7 +1010,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -940,7 +1029,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -968,6 +1057,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -981,6 +1072,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -993,6 +1085,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1010,7 +1103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1024,7 +1121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1050,11 +1147,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1067,6 +1164,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1074,6 +1173,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1082,7 +1182,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1097,7 +1201,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1125,6 +1229,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1138,6 +1244,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1150,6 +1257,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1167,7 +1275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1181,7 +1293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1215,6 +1327,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1222,12 +1336,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1242,7 +1361,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1273,6 +1392,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1287,6 +1408,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1300,6 +1422,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1317,7 +1440,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1331,7 +1458,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1368,6 +1495,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1376,12 +1505,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1396,7 +1530,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1426,11 +1560,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1443,6 +1577,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1451,6 +1587,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1459,7 +1596,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1474,7 +1615,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1505,6 +1646,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1519,6 +1662,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1532,6 +1676,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1549,7 +1694,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1563,7 +1712,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -1596,6 +1745,8 @@ def get_site_detector_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1611,6 +1762,7 @@ def prepare_request(next_link=None): detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) @@ -1625,6 +1777,7 @@ def prepare_request(next_link=None): detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1642,7 +1795,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1656,7 +1813,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async async def execute_site_detector_slot( @@ -1685,11 +1842,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1702,6 +1859,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1710,6 +1869,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1718,7 +1878,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1733,5 +1897,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domain_registration_provider_operations.py index 063f76e95a8c..72f30ffc7a6a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domains_operations.py index 4ea82c539d34..f1c0ced43d2b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -99,7 +104,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -117,6 +122,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -127,6 +134,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -136,6 +144,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -153,7 +162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -167,7 +180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -189,15 +202,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +232,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -234,6 +254,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -247,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -259,6 +281,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -278,7 +301,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -292,7 +319,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -312,6 +339,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -323,6 +352,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -333,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -350,7 +381,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -364,7 +399,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -392,17 +427,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +459,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -433,6 +475,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -441,6 +484,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -448,7 +492,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -466,7 +514,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -500,8 +548,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -513,6 +562,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -537,13 +587,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -572,18 +621,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -593,7 +649,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -625,6 +681,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -633,6 +690,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -640,7 +698,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -659,7 +721,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -684,6 +746,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -696,6 +760,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -707,6 +772,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -724,7 +790,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -738,7 +808,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -769,18 +839,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -795,7 +872,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -832,6 +909,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -841,6 +919,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -848,7 +927,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -863,11 +946,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -895,18 +978,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -916,7 +1006,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -953,6 +1043,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -962,6 +1053,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -969,7 +1061,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -984,11 +1080,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1013,17 +1109,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204, 400, 500]: @@ -1033,5 +1136,5 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_provider_operations.py index d35f48949dd6..cb48b2a2438e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -56,7 +54,7 @@ def get_available_stacks( Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2018_02_01.models.Enum4 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -115,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -135,6 +141,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +152,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -152,6 +161,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -169,7 +179,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -183,7 +197,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -195,7 +209,7 @@ def get_available_stacks_on_prem( Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2018_02_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -204,6 +218,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -214,6 +230,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -224,6 +241,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -242,7 +260,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -256,4 +278,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_recommendations_operations.py index c45a2ccbf3b5..811ad212cb34 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,7 +61,7 @@ def list( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -125,10 +132,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: @@ -147,15 +154,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -165,11 +179,11 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any @@ -191,16 +205,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -210,7 +231,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -235,7 +256,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -244,6 +265,8 @@ def list_history_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -256,6 +279,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -269,6 +293,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -288,7 +313,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -302,7 +331,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -325,7 +354,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -334,6 +363,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -346,6 +377,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -359,6 +391,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -378,7 +411,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -392,10 +429,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_hosting_environment( + async def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -423,18 +460,25 @@ async def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -444,11 +488,11 @@ async def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_hosting_environment( + async def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -476,18 +520,25 @@ async def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -497,7 +548,7 @@ async def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -521,10 +572,10 @@ async def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -537,12 +588,15 @@ async def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -550,7 +604,11 @@ async def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -565,11 +623,11 @@ async def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_hosting_environment( + async def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -600,19 +658,26 @@ async def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -622,7 +687,7 @@ async def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -647,7 +712,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -656,6 +721,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -668,6 +735,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -681,6 +749,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -700,7 +769,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -714,7 +787,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -737,7 +810,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -746,6 +819,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -758,6 +833,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -771,6 +847,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -790,7 +867,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -804,10 +885,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -832,17 +913,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -852,11 +940,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -881,17 +969,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -901,7 +996,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -925,10 +1020,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -941,12 +1036,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -954,7 +1052,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -969,11 +1071,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1001,18 +1103,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1022,5 +1131,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_resource_health_metadata_operations.py index 3988857efb8e..63a6d337b9c1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -133,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -209,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -221,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -232,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -249,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -263,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -291,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -316,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -344,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -357,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -369,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -386,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -400,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -431,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -457,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_top_level_domains_operations.py index 43458384d12b..dad63f801615 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -137,16 +144,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -161,7 +175,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -186,6 +200,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -200,6 +215,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -213,6 +229,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -232,7 +249,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -246,4 +267,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_apps_operations.py index 4608b8b490f0..7ed50f97e4d0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -137,6 +144,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -148,6 +157,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -159,6 +169,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -245,7 +267,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -261,6 +283,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -269,6 +292,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -276,7 +300,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -294,7 +322,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -330,8 +358,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -343,6 +372,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -367,13 +397,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -389,10 +418,10 @@ async def delete( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -405,11 +434,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -417,7 +449,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -427,7 +463,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -462,6 +498,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -470,6 +507,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -477,7 +515,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -496,7 +538,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -515,7 +557,7 @@ async def analyze_custom_hostname( :type resource_group_name: str :param name: Name of web app. :type name: str - :param host_name: Custom hostname. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -528,18 +570,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -554,11 +603,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -586,6 +635,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -594,6 +644,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -601,7 +652,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -611,7 +666,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -644,6 +699,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -652,6 +708,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -659,7 +716,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +735,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -699,6 +760,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -711,6 +774,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -722,6 +786,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -739,7 +804,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -753,7 +822,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def get_backup_status( @@ -784,18 +853,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -810,11 +886,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -842,18 +918,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -863,7 +946,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -902,6 +985,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -911,6 +995,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -918,7 +1003,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -933,10 +1022,10 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - async def _restore_initial( + async def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -950,6 +1039,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -959,6 +1049,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -966,7 +1057,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -976,11 +1071,11 @@ async def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore( + async def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1012,8 +1107,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1026,6 +1122,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1047,10 +1144,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations( @@ -1074,6 +1170,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1086,6 +1184,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1097,6 +1196,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1114,7 +1214,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1128,7 +1232,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1159,6 +1263,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1167,6 +1272,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1174,7 +1280,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1189,7 +1299,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1218,17 +1328,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1243,7 +1360,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1275,6 +1392,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1283,6 +1401,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1290,7 +1409,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1305,7 +1428,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1334,17 +1457,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1359,7 +1489,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1392,6 +1522,7 @@ async def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -1400,6 +1531,7 @@ async def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -1407,7 +1539,11 @@ async def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1422,7 +1558,7 @@ async def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -1451,17 +1587,24 @@ async def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1476,7 +1619,7 @@ async def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -1508,6 +1651,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -1516,6 +1660,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -1523,7 +1668,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1538,11 +1687,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1567,17 +1716,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1587,7 +1743,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -1616,17 +1772,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1641,7 +1804,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace_async @@ -1673,6 +1836,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -1681,6 +1845,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -1688,7 +1853,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1703,7 +1872,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -1732,17 +1901,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1757,7 +1933,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -1786,17 +1962,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1811,7 +1994,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -1844,6 +2027,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -1852,6 +2036,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -1859,7 +2044,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1874,7 +2063,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -1906,6 +2095,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -1914,6 +2104,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -1921,7 +2112,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1936,7 +2131,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -1965,17 +2160,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1990,7 +2192,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -2005,17 +2207,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2029,7 +2238,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -2059,7 +2268,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2070,6 +2280,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2093,10 +2304,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2127,6 +2337,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2135,6 +2346,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2142,7 +2354,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2157,7 +2373,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2186,17 +2402,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2211,7 +2434,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2240,17 +2463,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2265,7 +2495,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2299,6 +2529,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -2307,6 +2538,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -2314,7 +2546,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2329,7 +2565,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2360,17 +2596,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2385,7 +2628,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2417,6 +2660,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2425,6 +2669,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -2432,7 +2677,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2447,7 +2696,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2479,6 +2728,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2487,6 +2737,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -2494,7 +2745,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2509,7 +2764,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -2536,6 +2791,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2548,6 +2805,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -2559,6 +2817,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2576,7 +2835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2590,7 +2853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -2621,18 +2884,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2647,11 +2917,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2679,18 +2949,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2700,7 +2977,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -2729,17 +3006,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -2755,7 +3039,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -2784,17 +3068,24 @@ async def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -2810,7 +3101,7 @@ async def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -2835,6 +3126,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2847,6 +3140,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -2858,6 +3152,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2875,7 +3170,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2889,7 +3188,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -2920,18 +3219,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2947,11 +3253,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2979,18 +3285,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3000,11 +3313,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3032,18 +3345,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3053,11 +3373,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3085,18 +3405,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3106,7 +3433,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3131,6 +3458,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3143,6 +3472,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3154,6 +3484,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3171,7 +3502,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3185,7 +3520,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3216,18 +3551,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3242,7 +3584,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3277,6 +3619,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -3286,6 +3629,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -3293,7 +3637,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3308,11 +3656,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3340,18 +3688,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3361,7 +3716,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3394,18 +3749,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3420,7 +3782,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -3455,6 +3817,7 @@ async def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -3463,6 +3826,7 @@ async def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -3470,7 +3834,11 @@ async def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3485,7 +3853,7 @@ async def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -3510,6 +3878,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3522,6 +3892,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -3533,6 +3904,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3550,7 +3922,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3564,7 +3940,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -3595,18 +3971,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3621,7 +4004,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -3656,6 +4039,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -3665,6 +4049,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -3672,7 +4057,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3687,11 +4076,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3719,18 +4108,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3740,7 +4136,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -3775,6 +4171,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -3784,6 +4181,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -3791,7 +4189,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3806,7 +4208,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -3835,17 +4237,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3860,7 +4269,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -3876,6 +4285,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -3884,6 +4294,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -3891,7 +4302,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -3907,7 +4322,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -3941,8 +4356,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -3954,6 +4370,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3978,10 +4395,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -4009,17 +4425,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4035,7 +4458,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -4060,6 +4483,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4072,6 +4497,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -4083,6 +4509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4100,7 +4527,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4113,7 +4544,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -4141,17 +4572,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4166,7 +4604,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -4198,18 +4636,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4225,7 +4670,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -4242,6 +4687,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -4251,6 +4697,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -4258,7 +4705,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4272,7 +4723,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4309,8 +4760,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -4323,6 +4775,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4347,13 +4800,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4381,18 +4833,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4402,7 +4861,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4440,6 +4899,7 @@ async def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -4450,6 +4910,7 @@ async def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -4457,7 +4918,11 @@ async def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -4476,11 +4941,11 @@ async def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret( + async def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4511,6 +4976,8 @@ async def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -4518,12 +4985,17 @@ async def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4533,7 +5005,7 @@ async def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -4565,18 +5037,25 @@ async def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4591,7 +5070,7 @@ async def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -4623,18 +5102,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4649,7 +5135,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -4678,17 +5164,24 @@ async def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4703,11 +5196,11 @@ async def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status( + async def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4732,17 +5225,24 @@ async def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -4753,11 +5253,11 @@ async def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions( + async def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4782,17 +5282,24 @@ async def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -4802,7 +5309,7 @@ async def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace_async @@ -4840,6 +5347,7 @@ async def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -4850,6 +5358,7 @@ async def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -4857,7 +5366,11 @@ async def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -4876,11 +5389,11 @@ async def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret( + async def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4911,6 +5424,8 @@ async def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -4918,12 +5433,17 @@ async def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4934,7 +5454,7 @@ async def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -4959,6 +5479,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4971,6 +5493,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -4982,6 +5505,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4999,7 +5523,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5013,7 +5541,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -5044,18 +5572,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5070,7 +5605,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5106,6 +5641,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -5115,6 +5651,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -5122,7 +5659,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5137,11 +5678,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5169,18 +5710,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5190,7 +5738,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5225,6 +5773,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5232,12 +5782,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5252,7 +5807,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5290,6 +5845,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -5300,6 +5856,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -5307,7 +5864,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5322,11 +5883,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5357,6 +5918,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5364,12 +5927,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5379,7 +5947,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5417,6 +5985,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -5427,6 +5996,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -5434,7 +6004,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5449,7 +6023,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5484,6 +6058,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -5491,12 +6067,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5511,7 +6092,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace_async @@ -5540,17 +6121,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5565,7 +6153,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -5594,17 +6182,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5619,7 +6214,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -5651,18 +6246,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5677,7 +6279,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -5712,6 +6314,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -5721,6 +6324,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -5728,7 +6332,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5743,11 +6351,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5775,18 +6383,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5796,7 +6411,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -5831,6 +6446,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -5840,6 +6456,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -5847,7 +6464,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5862,7 +6483,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -5887,6 +6508,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5899,6 +6522,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -5910,6 +6534,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5927,7 +6552,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5941,7 +6570,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_status( @@ -5972,18 +6601,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5998,7 +6634,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -6015,6 +6651,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -6024,6 +6661,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -6031,7 +6669,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -6047,7 +6689,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -6084,8 +6726,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -6098,6 +6741,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6122,10 +6766,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -6156,18 +6799,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6183,7 +6833,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -6214,6 +6864,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6227,6 +6879,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -6239,6 +6892,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6256,7 +6910,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6269,7 +6927,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -6304,6 +6962,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -6311,12 +6971,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6332,11 +6997,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6370,6 +7035,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -6377,12 +7044,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -6392,7 +7064,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -6428,6 +7100,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -6435,12 +7109,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6456,7 +7135,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -6490,6 +7169,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6504,6 +7185,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -6517,6 +7199,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6534,7 +7217,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6547,7 +7234,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -6585,6 +7272,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -6593,12 +7282,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6614,7 +7308,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -6646,6 +7340,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6660,6 +7356,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -6673,6 +7370,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6690,7 +7388,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6703,7 +7405,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def get_instance_process_thread( @@ -6743,6 +7445,8 @@ async def get_instance_process_thread( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_thread_request( resource_group_name=resource_group_name, @@ -6751,12 +7455,17 @@ async def get_instance_process_thread( thread_id=thread_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_thread.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6772,7 +7481,7 @@ async def get_instance_process_thread( return deserialized - get_instance_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} # type: ignore + get_instance_process_thread.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace_async @@ -6801,17 +7510,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6826,7 +7542,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace_async @@ -6855,17 +7571,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6880,7 +7603,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -6905,6 +7628,8 @@ def list_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6917,6 +7642,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -6928,6 +7654,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6945,7 +7672,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6959,7 +7690,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'} # type: ignore + list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics( @@ -6979,12 +7710,12 @@ def list_metrics( :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. + default. Default value is None. :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -6993,6 +7724,8 @@ def list_metrics( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7005,6 +7738,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -7018,6 +7752,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -7037,7 +7772,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7051,7 +7790,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics"} # type: ignore async def _migrate_storage_initial( self, @@ -7067,6 +7806,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -7075,6 +7815,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -7083,7 +7824,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7097,7 +7842,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -7135,8 +7880,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -7149,6 +7895,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7173,10 +7920,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -7191,6 +7937,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -7199,6 +7946,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -7206,7 +7954,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7220,7 +7972,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -7254,8 +8006,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -7267,6 +8020,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7291,10 +8045,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -7324,17 +8077,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7349,7 +8109,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -7378,17 +8138,24 @@ async def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7403,7 +8170,7 @@ async def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7441,6 +8208,7 @@ async def create_or_update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -7449,6 +8217,7 @@ async def create_or_update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection.metadata['url'], @@ -7456,7 +8225,11 @@ async def create_or_update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7471,11 +8244,11 @@ async def create_or_update_swift_virtual_network_connection( return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network( + async def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7500,17 +8273,24 @@ async def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7520,7 +8300,7 @@ async def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7558,6 +8338,7 @@ async def update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -7566,6 +8347,7 @@ async def update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection.metadata['url'], @@ -7573,7 +8355,11 @@ async def update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7588,7 +8374,7 @@ async def update_swift_virtual_network_connection( return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7620,18 +8406,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7647,7 +8440,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -7679,18 +8472,25 @@ async def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -7709,7 +8509,7 @@ async def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -7730,11 +8530,11 @@ async def start_web_site_network_trace( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -7747,11 +8547,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -7760,7 +8563,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7775,7 +8582,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_initial( @@ -7793,11 +8600,14 @@ async def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -7806,7 +8616,11 @@ async def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -7824,7 +8638,7 @@ async def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -7845,11 +8659,11 @@ async def begin_start_web_site_network_trace_operation( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -7865,7 +8679,8 @@ async def begin_start_web_site_network_trace_operation( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -7879,6 +8694,7 @@ async def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -7902,13 +8718,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace( + async def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7933,17 +8748,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -7953,7 +8775,7 @@ async def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -7985,18 +8807,25 @@ async def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8011,7 +8840,7 @@ async def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -8043,18 +8872,25 @@ async def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8073,7 +8909,7 @@ async def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8105,18 +8941,25 @@ async def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8131,11 +8974,11 @@ async def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8160,17 +9003,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8180,7 +9030,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -8201,7 +9051,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -8210,6 +9060,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8222,6 +9074,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -8234,6 +9087,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -8252,7 +9106,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8266,7 +9124,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -8294,17 +9152,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8319,7 +9184,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -8348,17 +9213,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8373,7 +9245,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -8405,18 +9277,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8431,7 +9310,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8466,6 +9345,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -8475,6 +9355,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -8482,7 +9363,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8497,11 +9382,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8529,18 +9414,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8550,7 +9442,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8585,6 +9477,7 @@ async def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -8594,6 +9487,7 @@ async def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -8601,7 +9495,11 @@ async def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8616,7 +9514,7 @@ async def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8647,17 +9545,24 @@ async def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8672,7 +9577,7 @@ async def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -8706,6 +9611,7 @@ async def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -8714,6 +9620,7 @@ async def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -8721,7 +9628,11 @@ async def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8736,7 +9647,7 @@ async def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -8763,6 +9674,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8775,6 +9688,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -8786,6 +9700,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -8803,7 +9718,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8816,7 +9735,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -8847,18 +9766,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8874,11 +9800,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8908,18 +9834,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -8929,7 +9862,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -8961,18 +9894,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8988,7 +9928,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -9018,6 +9958,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9031,6 +9973,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -9043,6 +9986,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9060,7 +10004,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9073,7 +10021,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -9107,6 +10055,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -9114,12 +10064,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9135,7 +10090,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -9163,6 +10118,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9176,6 +10133,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -9188,6 +10146,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9205,7 +10164,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9218,7 +10181,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def get_process_thread( @@ -9254,6 +10217,8 @@ async def get_process_thread( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_thread_request( resource_group_name=resource_group_name, @@ -9261,12 +10226,17 @@ async def get_process_thread( process_id=process_id, thread_id=thread_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_thread.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9282,7 +10252,7 @@ async def get_process_thread( return deserialized - get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} # type: ignore + get_process_thread.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -9307,6 +10277,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9319,6 +10291,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -9330,6 +10303,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9347,7 +10321,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9361,7 +10339,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -9392,18 +10370,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9418,7 +10403,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -9454,6 +10439,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -9463,6 +10449,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -9470,7 +10457,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9485,11 +10476,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9517,18 +10508,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -9538,7 +10536,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -9572,6 +10570,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -9580,6 +10579,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -9587,7 +10587,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9602,11 +10606,11 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9633,17 +10637,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9653,11 +10664,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9674,10 +10685,11 @@ async def restart( :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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -9690,11 +10702,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -9702,7 +10717,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9712,10 +10731,10 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - async def _restore_from_backup_blob_initial( + async def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9728,6 +10747,7 @@ async def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -9736,6 +10756,7 @@ async def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -9743,7 +10764,11 @@ async def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9753,11 +10778,11 @@ async def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob( + async def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9786,8 +10811,9 @@ async def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -9799,6 +10825,7 @@ async def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -9820,12 +10847,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_initial( + async def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9838,6 +10864,7 @@ async def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -9846,6 +10873,7 @@ async def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -9853,7 +10881,11 @@ async def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9863,11 +10895,11 @@ async def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app( + async def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9896,8 +10928,9 @@ async def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -9909,6 +10942,7 @@ async def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -9930,12 +10964,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_initial( + async def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9948,6 +10981,7 @@ async def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -9956,6 +10990,7 @@ async def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -9963,7 +10998,11 @@ async def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9973,11 +11012,11 @@ async def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot( + async def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10007,8 +11046,9 @@ async def begin_restore_snapshot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10020,6 +11060,7 @@ async def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10041,10 +11082,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -10068,6 +11108,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10080,6 +11122,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -10091,6 +11134,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10108,7 +11152,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10121,7 +11169,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -10152,18 +11200,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10179,7 +11234,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -10195,18 +11250,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -10225,7 +11287,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -10260,7 +11322,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -10272,6 +11335,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -10295,13 +11359,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10329,18 +11392,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -10350,7 +11420,7 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -10374,6 +11444,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10386,6 +11458,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -10397,6 +11470,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10414,7 +11488,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10428,7 +11506,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -10459,18 +11537,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10486,7 +11571,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -10503,6 +11588,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -10512,6 +11598,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -10519,7 +11606,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10537,7 +11628,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -10577,8 +11668,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -10591,6 +11683,7 @@ async def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10615,13 +11708,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10641,11 +11733,11 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -10658,12 +11750,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -10671,7 +11766,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -10681,7 +11780,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -10720,6 +11819,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -10729,6 +11829,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -10736,7 +11837,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10755,7 +11860,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -10777,7 +11882,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -10790,19 +11895,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10817,11 +11929,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10853,6 +11965,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -10862,6 +11975,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -10869,7 +11983,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10879,7 +11997,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -10916,6 +12034,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -10925,6 +12044,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -10932,7 +12052,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10947,7 +12071,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -10976,6 +12100,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10989,6 +12115,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -11001,6 +12128,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11018,7 +12146,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11032,7 +12164,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def get_backup_status_slot( @@ -11067,6 +12199,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -11074,12 +12208,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11094,11 +12233,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11130,6 +12269,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -11137,12 +12278,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11152,7 +12298,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -11194,6 +12340,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11204,6 +12351,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -11211,7 +12359,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11226,10 +12378,10 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - async def _restore_slot_initial( + async def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11244,6 +12396,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -11254,6 +12407,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -11261,7 +12415,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11271,11 +12429,11 @@ async def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore_slot( + async def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11311,8 +12469,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -11326,6 +12485,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11347,10 +12507,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -11378,6 +12537,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11391,6 +12552,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -11403,6 +12565,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11420,7 +12583,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11434,7 +12601,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -11469,6 +12636,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -11478,6 +12646,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -11485,7 +12654,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11500,7 +12673,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -11533,18 +12706,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11559,7 +12739,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -11594,6 +12774,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -11603,6 +12784,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -11610,7 +12792,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11625,7 +12811,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -11658,18 +12844,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11684,7 +12877,7 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -11721,6 +12914,7 @@ async def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -11730,6 +12924,7 @@ async def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -11737,7 +12932,11 @@ async def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11752,7 +12951,7 @@ async def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -11785,18 +12984,25 @@ async def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11811,7 +13017,7 @@ async def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -11847,6 +13053,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11856,6 +13063,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -11863,7 +13071,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11878,11 +13090,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11911,18 +13123,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11932,7 +13151,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -11965,18 +13184,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11991,7 +13217,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace_async @@ -12027,6 +13253,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -12036,6 +13263,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -12043,7 +13271,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12058,7 +13290,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -12091,18 +13323,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12117,7 +13356,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -12150,18 +13389,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12176,7 +13422,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -12213,6 +13459,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -12222,6 +13469,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -12229,7 +13477,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12244,7 +13496,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -12280,6 +13532,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -12289,6 +13542,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -12296,7 +13550,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12311,7 +13569,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -12344,18 +13602,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12370,7 +13635,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -12386,18 +13651,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12411,7 +13683,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -12445,7 +13717,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -12457,6 +13730,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -12480,10 +13754,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -12517,6 +13790,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -12526,6 +13800,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -12533,7 +13808,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12548,7 +13827,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -12580,18 +13859,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12606,7 +13892,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -12641,18 +13927,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12667,7 +13960,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -12703,6 +13996,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -12712,6 +14006,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -12719,7 +14014,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12734,7 +14033,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -12770,6 +14069,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -12779,6 +14079,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -12786,7 +14087,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12801,7 +14106,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -12832,6 +14137,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12845,6 +14152,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -12857,6 +14165,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12874,7 +14183,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12888,7 +14201,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -12923,6 +14236,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -12930,12 +14245,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12950,11 +14270,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12986,6 +14306,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -12993,12 +14315,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -13008,7 +14335,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -13040,18 +14367,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13067,7 +14401,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -13099,18 +14433,25 @@ async def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13126,7 +14467,7 @@ async def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -13155,6 +14496,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13168,6 +14511,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -13180,6 +14524,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13197,7 +14542,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13211,7 +14560,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -13246,6 +14595,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13253,12 +14604,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13274,11 +14630,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13310,6 +14666,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13317,12 +14675,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13332,11 +14695,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13368,6 +14731,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13375,12 +14740,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13390,11 +14760,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13426,6 +14796,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13433,12 +14805,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13448,7 +14825,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -13477,6 +14854,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13490,6 +14869,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -13502,6 +14882,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13519,7 +14900,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13533,7 +14918,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -13568,6 +14953,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -13575,12 +14962,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13595,7 +14987,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -13634,6 +15026,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -13644,6 +15037,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -13651,7 +15045,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13666,11 +15064,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13702,6 +15100,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -13709,12 +15109,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13724,7 +15129,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -13761,6 +15166,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -13768,12 +15175,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13788,7 +15200,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -13827,6 +15239,7 @@ async def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -13836,6 +15249,7 @@ async def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -13843,7 +15257,11 @@ async def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13858,7 +15276,7 @@ async def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -13887,6 +15305,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13900,6 +15320,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -13912,6 +15333,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13929,7 +15351,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13943,7 +15369,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -13978,6 +15404,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -13985,12 +15413,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14005,7 +15438,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14044,6 +15477,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -14054,6 +15488,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -14061,7 +15496,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14076,11 +15515,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14112,6 +15551,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -14119,12 +15560,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14134,7 +15580,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14173,6 +15619,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -14183,6 +15630,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -14190,7 +15638,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14205,7 +15657,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14237,18 +15689,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14263,7 +15722,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -14280,6 +15739,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -14289,6 +15749,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -14296,7 +15757,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -14312,7 +15777,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -14349,8 +15814,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -14363,6 +15829,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -14387,10 +15854,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -14421,18 +15887,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14448,7 +15921,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -14476,6 +15949,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14489,6 +15964,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -14501,6 +15977,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14518,7 +15995,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14531,7 +16012,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -14562,18 +16043,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14588,7 +16076,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -14623,6 +16111,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -14630,12 +16120,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14651,7 +16146,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -14669,6 +16164,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -14679,6 +16175,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -14686,7 +16183,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -14700,7 +16201,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -14740,8 +16241,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -14755,6 +16257,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -14779,13 +16282,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14816,6 +16318,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -14823,12 +16327,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -14838,7 +16347,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -14879,6 +16388,7 @@ async def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -14890,6 +16400,7 @@ async def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -14897,7 +16408,11 @@ async def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -14916,11 +16431,11 @@ async def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret_slot( + async def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14954,6 +16469,8 @@ async def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -14962,12 +16479,17 @@ async def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -14977,7 +16499,7 @@ async def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -15012,6 +16534,8 @@ async def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -15019,12 +16543,17 @@ async def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15039,7 +16568,7 @@ async def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -15074,6 +16603,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -15081,12 +16612,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15101,7 +16637,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -15133,18 +16669,25 @@ async def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15159,11 +16702,11 @@ async def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status_slot( + async def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15191,18 +16734,25 @@ async def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -15213,11 +16763,11 @@ async def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions_slot( + async def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15245,18 +16795,25 @@ async def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -15267,7 +16824,7 @@ async def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace_async @@ -15308,6 +16865,7 @@ async def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -15319,6 +16877,7 @@ async def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -15326,7 +16885,11 @@ async def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -15345,11 +16908,11 @@ async def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret_slot( + async def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15383,6 +16946,8 @@ async def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -15391,12 +16956,17 @@ async def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15407,7 +16977,7 @@ async def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -15436,6 +17006,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15449,6 +17021,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -15461,6 +17034,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15478,7 +17052,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15492,7 +17070,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -15527,6 +17105,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -15534,12 +17114,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15554,7 +17139,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -15594,6 +17179,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -15604,6 +17190,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -15611,7 +17198,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15626,11 +17217,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15662,6 +17253,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -15669,12 +17262,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15684,7 +17282,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -15722,6 +17320,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -15730,12 +17330,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15750,7 +17355,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -15791,6 +17396,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -15802,6 +17408,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -15809,7 +17416,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15824,11 +17435,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15862,6 +17473,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -15870,12 +17483,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15885,7 +17503,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -15926,6 +17544,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -15937,6 +17556,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -15944,7 +17564,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15959,7 +17583,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -15997,6 +17621,8 @@ async def list_hybrid_connection_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connection_keys_slot_request( resource_group_name=resource_group_name, @@ -16005,12 +17631,17 @@ async def list_hybrid_connection_keys_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16025,7 +17656,7 @@ async def list_hybrid_connection_keys_slot( 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'} # type: ignore + list_hybrid_connection_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace_async @@ -16057,18 +17688,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16083,7 +17721,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -16116,18 +17754,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16142,7 +17787,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -16178,6 +17823,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -16185,12 +17832,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16205,7 +17857,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -16244,6 +17896,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -16254,6 +17907,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -16261,7 +17915,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16276,11 +17934,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16312,6 +17970,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -16319,12 +17979,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16334,7 +17999,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -16373,6 +18038,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -16383,6 +18049,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -16390,7 +18057,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16405,7 +18076,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -16434,6 +18105,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16447,6 +18120,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -16459,6 +18133,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16476,7 +18151,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16490,7 +18169,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_status_slot( @@ -16524,6 +18203,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -16531,12 +18212,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16551,7 +18237,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -16569,6 +18255,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -16579,6 +18266,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -16586,7 +18274,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -16602,7 +18294,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -16642,8 +18334,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -16657,6 +18350,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16681,10 +18375,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -16718,6 +18411,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -16725,12 +18420,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16746,7 +18446,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -16781,6 +18481,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16795,6 +18497,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -16808,6 +18511,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16825,7 +18529,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16838,7 +18546,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -16877,6 +18585,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -16885,12 +18595,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16906,11 +18621,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16948,6 +18663,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -16956,12 +18673,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -16971,7 +18693,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -17011,6 +18733,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -17019,12 +18743,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17040,7 +18769,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -17078,6 +18807,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17093,6 +18824,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -17107,6 +18839,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17124,7 +18857,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17137,7 +18874,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -17179,6 +18916,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -17188,12 +18927,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17209,7 +18953,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -17245,6 +18989,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17260,6 +19006,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -17274,6 +19021,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17291,7 +19039,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17304,7 +19056,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def get_instance_process_thread_slot( @@ -17348,6 +19100,8 @@ async def get_instance_process_thread_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_thread_slot_request( resource_group_name=resource_group_name, @@ -17357,12 +19111,17 @@ async def get_instance_process_thread_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_thread_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17378,7 +19137,7 @@ async def get_instance_process_thread_slot( 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}'} # type: ignore + get_instance_process_thread_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace_async @@ -17411,18 +19170,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17437,7 +19203,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace_async @@ -17469,18 +19235,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17495,7 +19268,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -17524,6 +19297,8 @@ def list_metric_definitions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17537,6 +19312,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions_slot.metadata['url'], ) request = _convert_request(request) @@ -17549,6 +19325,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17566,7 +19343,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17580,7 +19361,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} # type: ignore + list_metric_definitions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics_slot( @@ -17604,12 +19385,12 @@ def list_metrics_slot( of the production slot. :type slot: str :param details: Specify "true" to include metric details in the response. It is "false" by - default. + default. Default value is None. :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -17618,6 +19399,8 @@ def list_metrics_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17631,6 +19414,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics_slot.metadata['url'], @@ -17645,6 +19429,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -17664,7 +19449,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17678,7 +19467,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} # type: ignore + list_metrics_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status_slot( @@ -17711,18 +19500,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17737,7 +19533,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -17770,18 +19566,25 @@ async def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17796,7 +19599,7 @@ async def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -17838,6 +19641,7 @@ async def create_or_update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -17847,6 +19651,7 @@ async def create_or_update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_slot.metadata['url'], @@ -17854,7 +19659,11 @@ async def create_or_update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17869,11 +19678,11 @@ async def create_or_update_swift_virtual_network_connection_slot( 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'} # type: ignore + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network_slot( + async def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17902,18 +19711,25 @@ async def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17923,7 +19739,7 @@ async def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -17965,6 +19781,7 @@ async def update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -17974,6 +19791,7 @@ async def update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_slot.metadata['url'], @@ -17981,7 +19799,11 @@ async def update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17996,7 +19818,7 @@ async def update_swift_virtual_network_connection_slot( return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18032,6 +19854,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -18039,12 +19863,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18060,7 +19889,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -18096,6 +19925,8 @@ async def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -18103,12 +19934,17 @@ async def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18127,7 +19963,7 @@ async def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -18151,11 +19987,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -18168,12 +20004,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18182,7 +20021,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18197,7 +20040,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_slot_initial( @@ -18216,12 +20059,15 @@ async def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18230,7 +20076,11 @@ async def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18248,7 +20098,7 @@ async def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -18272,11 +20122,11 @@ async def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -18292,7 +20142,8 @@ async def begin_start_web_site_network_trace_operation_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -18307,6 +20158,7 @@ async def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -18330,13 +20182,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace_slot( + async def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18364,18 +20215,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18385,7 +20243,7 @@ async def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -18421,6 +20279,8 @@ async def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -18428,12 +20288,17 @@ async def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18448,7 +20313,7 @@ async def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -18484,6 +20349,8 @@ async def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -18491,12 +20358,17 @@ async def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18515,7 +20387,7 @@ async def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -18551,6 +20423,8 @@ async def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -18558,12 +20432,17 @@ async def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18578,11 +20457,11 @@ async def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18611,18 +20490,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18632,7 +20518,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -18656,7 +20542,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -18665,6 +20551,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18678,6 +20566,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -18691,6 +20580,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -18709,7 +20599,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18723,7 +20617,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -18754,18 +20648,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18780,7 +20681,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -18813,18 +20714,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18839,7 +20747,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -18875,6 +20783,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -18882,12 +20792,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18902,7 +20817,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -18941,6 +20856,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -18951,6 +20867,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -18958,7 +20875,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18973,11 +20894,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19009,6 +20930,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -19016,12 +20939,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19031,7 +20959,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19070,6 +20998,7 @@ async def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -19080,6 +21009,7 @@ async def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -19087,7 +21017,11 @@ async def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19102,7 +21036,7 @@ async def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19136,18 +21070,25 @@ async def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19162,7 +21103,7 @@ async def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -19199,6 +21140,7 @@ async def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -19208,6 +21150,7 @@ async def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -19215,7 +21158,11 @@ async def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19230,7 +21177,7 @@ async def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -19261,6 +21208,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19274,6 +21223,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -19286,6 +21236,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19303,7 +21254,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19316,7 +21271,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -19351,6 +21306,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -19358,12 +21315,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19379,11 +21341,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19417,6 +21379,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -19424,12 +21388,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19439,7 +21408,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -19475,6 +21444,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -19482,12 +21453,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19503,7 +21479,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -19537,6 +21513,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19551,6 +21529,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -19564,6 +21543,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19581,7 +21561,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19594,7 +21578,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -19632,6 +21616,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -19640,12 +21626,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19661,7 +21652,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -19693,6 +21684,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19707,6 +21700,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -19720,6 +21714,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19737,7 +21732,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19750,7 +21749,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def get_process_thread_slot( @@ -19790,6 +21789,8 @@ async def get_process_thread_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_thread_slot_request( resource_group_name=resource_group_name, @@ -19798,12 +21799,17 @@ async def get_process_thread_slot( thread_id=thread_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_thread_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19819,7 +21825,7 @@ async def get_process_thread_slot( return deserialized - get_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'} # type: ignore + get_process_thread_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -19848,6 +21854,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19861,6 +21869,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -19873,6 +21882,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19890,7 +21900,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19904,7 +21918,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -19939,6 +21953,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -19946,12 +21962,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19966,7 +21987,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -20006,6 +22027,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -20016,6 +22038,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -20023,7 +22046,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20038,11 +22065,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20074,6 +22101,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -20081,12 +22110,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20096,7 +22130,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -20134,6 +22168,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -20143,6 +22178,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -20150,7 +22186,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20165,11 +22205,11 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20200,18 +22240,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20221,11 +22268,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20246,10 +22293,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -20262,12 +22310,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -20275,7 +22326,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20285,10 +22340,10 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - async def _restore_from_backup_blob_slot_initial( + async def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20302,6 +22357,7 @@ async def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -20311,6 +22367,7 @@ async def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -20318,7 +22375,11 @@ async def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20328,11 +22389,11 @@ async def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob_slot( + async def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20365,8 +22426,9 @@ async def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -20379,6 +22441,7 @@ async def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20400,12 +22463,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_slot_initial( + async def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20419,6 +22481,7 @@ async def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -20428,6 +22491,7 @@ async def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -20435,7 +22499,11 @@ async def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20445,11 +22513,11 @@ async def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app_slot( + async def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20481,8 +22549,9 @@ async def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -20495,6 +22564,7 @@ async def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20516,12 +22586,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_slot_initial( + async def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20535,6 +22604,7 @@ async def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -20544,6 +22614,7 @@ async def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -20551,7 +22622,11 @@ async def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20561,11 +22636,11 @@ async def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot_slot( + async def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20598,8 +22673,9 @@ async def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -20612,6 +22688,7 @@ async def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20633,10 +22710,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -20664,6 +22740,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20677,6 +22755,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -20689,6 +22768,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20706,7 +22786,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20719,7 +22803,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -20754,6 +22838,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -20761,12 +22847,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20782,7 +22873,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -20799,6 +22890,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -20806,12 +22899,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -20830,7 +22928,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -20869,7 +22967,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -20882,6 +22981,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -20905,13 +23005,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20943,6 +23042,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -20950,12 +23051,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20965,7 +23071,7 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -20997,6 +23103,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -21013,6 +23120,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -21028,6 +23136,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -21047,7 +23156,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21061,9 +23174,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21077,6 +23190,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -21086,6 +23200,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -21093,7 +23208,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21103,11 +23222,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21140,8 +23259,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21154,6 +23274,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21175,10 +23296,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -21204,6 +23324,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21217,6 +23339,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -21229,6 +23352,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21246,7 +23370,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21260,7 +23388,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -21286,6 +23414,8 @@ def list_snapshots_from_dr_secondary_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21299,6 +23429,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -21311,6 +23442,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21328,7 +23460,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21342,7 +23478,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -21374,18 +23510,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -21407,7 +23550,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -21424,6 +23567,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -21433,6 +23577,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -21440,7 +23585,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -21461,7 +23610,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -21500,8 +23649,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -21514,6 +23664,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21538,13 +23689,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21573,18 +23723,25 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -21594,7 +23751,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -21630,6 +23787,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -21639,6 +23797,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -21646,7 +23805,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -21668,11 +23831,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21701,18 +23864,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21722,7 +23892,7 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore async def _start_network_trace_slot_initial( @@ -21741,12 +23911,15 @@ async def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -21755,7 +23928,11 @@ async def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21773,7 +23950,7 @@ async def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -21797,11 +23974,11 @@ async def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -21817,7 +23994,8 @@ async def begin_start_network_trace_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -21832,6 +24010,7 @@ async def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -21855,13 +24034,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21890,18 +24068,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21911,11 +24096,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace_slot( + async def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21943,18 +24128,25 @@ async def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -21964,11 +24156,11 @@ async def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21996,18 +24188,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22017,11 +24216,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22049,18 +24248,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -22070,7 +24276,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -22099,6 +24305,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22112,6 +24320,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -22124,6 +24333,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22141,7 +24351,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22155,7 +24369,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -22190,6 +24404,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -22197,12 +24413,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22218,11 +24439,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22254,6 +24475,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -22261,12 +24484,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22276,7 +24504,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -22308,6 +24536,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22322,6 +24552,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -22335,6 +24566,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22352,7 +24584,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22365,7 +24601,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -22403,6 +24639,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -22411,12 +24649,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22432,11 +24675,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22468,6 +24711,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -22475,12 +24720,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22490,7 +24740,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -22516,7 +24766,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -22525,6 +24775,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22538,6 +24790,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -22551,6 +24804,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -22569,7 +24823,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22583,7 +24841,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -22615,18 +24873,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22641,7 +24906,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -22677,6 +24942,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -22684,12 +24951,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22704,7 +24976,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -22745,6 +25017,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -22755,6 +25028,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -22762,7 +25036,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22777,11 +25055,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22813,6 +25091,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -22820,12 +25100,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22835,7 +25120,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -22876,6 +25161,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -22886,6 +25172,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -22893,7 +25180,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22908,7 +25199,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -22947,6 +25238,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -22955,12 +25248,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22976,7 +25274,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -23018,6 +25316,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -23029,6 +25328,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -23036,7 +25336,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23051,7 +25355,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -23093,6 +25397,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -23104,6 +25409,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -23111,7 +25417,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23126,7 +25436,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -23154,6 +25464,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23167,6 +25479,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -23179,6 +25492,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23196,7 +25510,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23210,7 +25528,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -23245,6 +25563,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -23252,12 +25572,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23272,7 +25597,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -23300,6 +25625,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -23315,6 +25641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -23329,6 +25656,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -23348,7 +25676,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23362,9 +25694,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23377,6 +25709,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -23385,6 +25718,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -23392,7 +25726,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23402,11 +25740,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23435,8 +25773,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -23448,6 +25787,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23469,10 +25809,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -23495,6 +25834,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23507,6 +25848,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -23518,6 +25860,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23535,7 +25878,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23549,7 +25896,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -23572,6 +25919,8 @@ def list_snapshots_from_dr_secondary( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23584,6 +25933,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -23595,6 +25945,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23612,7 +25963,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23626,7 +25981,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control( @@ -23654,17 +26009,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23686,7 +26048,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -23702,6 +26064,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23710,6 +26073,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -23717,7 +26081,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23738,7 +26106,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23773,8 +26141,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -23786,6 +26155,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23810,13 +26180,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23841,17 +26210,24 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -23861,7 +26237,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23893,6 +26269,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23901,6 +26278,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -23908,7 +26286,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23930,11 +26312,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23959,17 +26341,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23979,7 +26368,7 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore async def _start_network_trace_initial( @@ -23997,11 +26386,14 @@ async def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -24010,7 +26402,11 @@ async def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24028,7 +26424,7 @@ async def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -24049,11 +26445,11 @@ async def begin_start_network_trace( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -24069,7 +26465,8 @@ async def begin_start_network_trace( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -24083,6 +26480,7 @@ async def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -24106,13 +26504,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24137,17 +26534,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24157,11 +26561,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace( + async def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24186,17 +26590,24 @@ async def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24206,11 +26617,11 @@ async def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24235,17 +26646,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24255,11 +26673,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24284,17 +26702,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -24304,7 +26729,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -24329,6 +26754,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24341,6 +26768,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -24352,6 +26780,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24369,7 +26798,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24383,7 +26816,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -24414,18 +26847,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24441,11 +26881,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24473,18 +26913,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24494,7 +26941,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -24522,6 +26969,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24535,6 +26984,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -24547,6 +26997,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24564,7 +27015,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24577,7 +27032,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -24611,6 +27066,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -24618,12 +27075,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24639,11 +27101,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24671,18 +27133,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24692,7 +27161,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -24714,7 +27183,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -24723,6 +27192,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24735,6 +27206,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -24747,6 +27219,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24765,7 +27238,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24779,7 +27256,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -24807,17 +27284,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24832,7 +27316,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -24864,18 +27348,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24890,7 +27381,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24927,6 +27418,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -24936,6 +27428,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -24943,7 +27436,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24958,11 +27455,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24990,18 +27487,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25011,7 +27515,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25048,6 +27552,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -25057,6 +27562,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -25064,7 +27570,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25079,7 +27589,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25114,6 +27624,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -25121,12 +27633,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25142,7 +27659,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25180,6 +27697,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25190,6 +27708,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -25197,7 +27716,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25212,7 +27735,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25250,6 +27773,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25260,6 +27784,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -25267,7 +27792,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25282,7 +27811,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -25306,6 +27835,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25318,6 +27849,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -25329,6 +27861,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25346,7 +27879,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25360,7 +27897,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -25391,18 +27928,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25417,5 +27961,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_site_management_client_operations.py index 455707e9b068..1d24575ea725 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -68,7 +74,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -94,11 +100,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -106,7 +114,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +133,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -140,6 +152,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -149,6 +163,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -157,6 +172,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -174,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -188,7 +208,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -213,15 +233,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -236,7 +263,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -265,12 +292,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -278,7 +307,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -293,7 +326,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -307,9 +340,9 @@ def list_billing_meters( Gets a list of meters for a given location. - :param billing_location: Azure Location of billable resource. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -318,6 +351,8 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -328,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -339,6 +375,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -358,7 +395,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -372,7 +413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace_async async def check_name_availability( @@ -390,7 +431,7 @@ async def check_name_availability( :type name: str :param type: Resource type used for verification. :type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -403,6 +444,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -410,6 +452,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -417,7 +460,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -432,7 +479,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace_async @@ -455,15 +502,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -478,7 +532,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -494,16 +548,16 @@ def list_geo_regions( Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -511,6 +565,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -521,6 +577,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -534,6 +591,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -555,7 +613,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -569,7 +631,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -590,6 +652,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -603,6 +666,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -615,6 +679,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -634,7 +699,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -648,7 +717,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -666,6 +735,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_02_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -676,6 +747,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -685,6 +757,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -702,7 +775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -716,7 +793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -738,15 +815,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -761,7 +845,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -789,12 +873,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -802,7 +888,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -817,11 +907,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -846,6 +936,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -853,6 +944,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -860,7 +952,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -870,7 +966,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -899,6 +995,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -906,6 +1003,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -913,7 +1011,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -928,7 +1030,7 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async @@ -958,6 +1060,7 @@ async def validate_container_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_container_settings_request, 'ValidateContainerSettingsRequest') @@ -965,6 +1068,7 @@ async def validate_container_settings( request = build_validate_container_settings_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_container_settings.metadata['url'], @@ -972,7 +1076,11 @@ async def validate_container_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -987,11 +1095,11 @@ async def validate_container_settings( return deserialized - validate_container_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validateContainerSettings'} # type: ignore + validate_container_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validateContainerSettings"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1016,6 +1124,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1023,6 +1132,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1030,7 +1140,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1040,5 +1154,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py index cffce8169d9a..10e0a5df0b52 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,31 +68,31 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -103,30 +104,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,31 +139,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -175,35 +178,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -216,25 +219,26 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -289,31 +293,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -325,10 +330,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -336,21 +342,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -365,12 +371,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -378,23 +384,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -408,9 +414,10 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -418,16 +425,16 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -442,12 +449,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -455,23 +462,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -487,33 +494,33 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -529,33 +536,33 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -568,25 +575,26 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -600,33 +608,33 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -642,35 +650,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -683,25 +691,26 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -712,31 +721,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -747,35 +757,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -813,6 +824,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -823,6 +836,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -832,6 +846,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -849,7 +864,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -863,10 +882,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any @@ -889,12 +908,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -902,7 +923,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -912,7 +937,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -934,6 +959,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -945,6 +972,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -955,6 +983,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -972,7 +1001,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -986,7 +1019,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1014,17 +1047,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1039,7 +1079,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1055,6 +1095,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1063,6 +1104,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1070,7 +1112,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1088,7 +1134,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1124,8 +1170,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1137,6 +1184,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1161,13 +1209,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1192,17 +1239,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1212,7 +1266,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1245,6 +1299,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1253,6 +1308,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1260,7 +1316,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1279,7 +1339,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1304,6 +1364,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1316,6 +1378,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1327,6 +1390,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1344,7 +1408,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1358,7 +1426,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1389,18 +1457,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1415,7 +1490,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1432,6 +1507,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1441,6 +1517,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1448,7 +1525,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1466,7 +1547,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1504,8 +1585,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1518,6 +1600,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1542,13 +1625,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1576,18 +1658,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1597,7 +1686,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1633,6 +1722,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1642,6 +1732,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1649,7 +1740,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1668,11 +1763,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1701,6 +1796,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1709,6 +1805,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1716,7 +1813,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1726,11 +1827,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1759,6 +1860,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1767,6 +1869,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1774,7 +1877,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1784,11 +1891,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1813,17 +1920,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1833,11 +1947,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1865,6 +1979,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1873,6 +1988,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1880,7 +1996,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1890,7 +2010,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1922,6 +2042,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1930,6 +2051,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1937,7 +2059,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1952,11 +2078,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1981,17 +2107,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2001,7 +2134,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2030,17 +2163,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2055,7 +2195,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2084,17 +2224,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2109,5 +2256,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_environments_operations.py index 25810c9ce0b2..06be8288d097 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,27 +183,28 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -214,35 +218,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -255,31 +259,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -290,31 +295,32 @@ def build_list_vips_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -328,35 +334,35 @@ def build_change_vnet_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -369,31 +375,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -405,10 +412,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -416,21 +424,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -441,31 +449,32 @@ def build_get_inbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,31 +485,32 @@ def build_list_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -514,35 +524,36 @@ def build_list_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -553,31 +564,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -588,31 +600,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -626,35 +639,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -670,35 +683,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -712,10 +725,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -723,21 +737,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -751,10 +765,11 @@ def build_list_multi_role_pool_instance_metrics_request( details: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -762,23 +777,23 @@ def build_list_multi_role_pool_instance_metrics_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -789,31 +804,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -830,41 +846,42 @@ def build_list_multi_role_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'str') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'str') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'str') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'str') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str') if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -875,31 +892,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -910,31 +928,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -945,31 +964,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -980,31 +1000,32 @@ def build_get_outbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1015,25 +1036,26 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1044,31 +1066,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1079,31 +1102,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1116,33 +1140,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1153,31 +1178,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1190,33 +1216,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1227,31 +1254,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1263,10 +1291,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1274,21 +1303,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1303,12 +1332,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1316,23 +1345,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1349,12 +1378,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1362,23 +1391,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1393,10 +1422,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1405,21 +1435,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1435,10 +1465,11 @@ def build_list_worker_pool_instance_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1447,25 +1478,25 @@ def build_list_worker_pool_instance_metrics_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1477,10 +1508,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1488,21 +1520,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1517,10 +1549,11 @@ def build_list_web_worker_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1528,25 +1561,25 @@ def build_list_web_worker_metrics_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1558,10 +1591,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1569,21 +1603,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1595,10 +1629,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1606,25 +1641,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1662,6 +1697,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1672,6 +1709,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1681,6 +1719,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1698,7 +1737,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1712,7 +1755,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1733,6 +1776,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1744,6 +1789,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1754,6 +1800,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1771,7 +1818,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1785,7 +1836,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1813,17 +1864,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1838,7 +1896,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1854,6 +1912,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1862,6 +1921,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1869,7 +1929,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -1888,7 +1952,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1924,8 +1988,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1937,6 +2002,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1961,12 +2027,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1979,18 +2044,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204, 400, 404, 409]: @@ -2000,11 +2072,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2034,7 +2106,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2046,6 +2119,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2066,10 +2140,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -2101,6 +2174,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -2109,6 +2183,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -2116,7 +2191,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -2135,7 +2214,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -2160,6 +2239,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2172,6 +2253,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -2183,6 +2265,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2200,7 +2283,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2214,7 +2301,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def list_vips( @@ -2242,17 +2329,24 @@ def list_vips( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_vips_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vips.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2267,7 +2361,7 @@ def list_vips( return deserialized - list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + list_vips.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore def _change_vnet_initial( @@ -2283,6 +2377,7 @@ def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -2291,6 +2386,7 @@ def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -2298,7 +2394,11 @@ def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2316,7 +2416,7 @@ def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2352,6 +2452,7 @@ def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -2367,6 +2468,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -2381,6 +2483,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -2400,7 +2503,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2411,7 +2518,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2423,6 +2530,7 @@ def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2433,8 +2541,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -2450,10 +2557,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2482,17 +2588,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2507,7 +2620,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2539,18 +2652,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2565,7 +2685,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2590,6 +2710,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2602,6 +2724,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2613,6 +2736,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2630,7 +2754,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2644,7 +2772,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_metric_definitions( @@ -2672,17 +2800,24 @@ def list_metric_definitions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_metric_definitions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2697,7 +2832,7 @@ def list_metric_definitions( return deserialized - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions'} # type: ignore + list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions"} # type: ignore @distributed_trace @@ -2723,7 +2858,7 @@ def list_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -2732,6 +2867,8 @@ def list_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2744,6 +2881,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -2757,6 +2895,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -2776,7 +2915,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2790,7 +2933,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2813,6 +2956,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2825,6 +2970,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2836,6 +2982,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2853,7 +3000,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2867,7 +3018,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2895,17 +3046,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2920,7 +3078,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2936,6 +3094,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2944,6 +3103,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2951,7 +3111,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -2970,7 +3134,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -3004,8 +3168,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3017,6 +3182,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3041,10 +3207,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -3075,6 +3240,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -3083,6 +3249,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -3090,7 +3257,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -3109,7 +3280,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -3139,6 +3310,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3152,6 +3325,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3164,6 +3338,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3181,7 +3356,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3195,7 +3374,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_instance_metrics( @@ -3226,6 +3405,8 @@ def list_multi_role_pool_instance_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3239,6 +3420,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, template_url=self.list_multi_role_pool_instance_metrics.metadata['url'], ) @@ -3252,6 +3434,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, template_url=next_link, ) @@ -3270,7 +3453,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3284,7 +3471,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics'} # type: ignore + list_multi_role_pool_instance_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metrics"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -3308,6 +3495,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3320,6 +3509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3331,6 +3521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3348,7 +3539,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3362,7 +3557,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metrics( @@ -3384,11 +3579,11 @@ def list_multi_role_metrics( :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. + :param start_time: Beginning time of the metrics query. Default value is None. :type start_time: str - :param end_time: End time of the metrics query. + :param end_time: End time of the metrics query. Default value is None. :type end_time: str - :param time_grain: Time granularity of the metrics query. + :param time_grain: Time granularity of the metrics query. Default value is None. :type time_grain: str :param details: Specify :code:`true` to include instance details. The default is :code:`false`. @@ -3396,7 +3591,7 @@ def list_multi_role_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -3405,6 +3600,8 @@ def list_multi_role_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3417,6 +3614,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -3433,6 +3631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -3455,7 +3654,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3469,7 +3672,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics'} # type: ignore + list_multi_role_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -3491,6 +3694,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3503,6 +3708,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3514,6 +3720,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3531,7 +3738,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3545,7 +3756,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -3567,6 +3778,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3579,6 +3792,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3590,6 +3804,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3607,7 +3822,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3621,7 +3840,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3649,17 +3868,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3674,7 +3900,7 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -3699,6 +3925,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3711,6 +3939,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -3722,6 +3951,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3739,7 +3969,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3753,10 +3987,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3781,17 +4015,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 400, 404, 409]: @@ -3801,7 +4042,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -3816,17 +4057,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3844,7 +4092,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3877,6 +4125,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3889,6 +4139,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -3900,6 +4151,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3917,7 +4169,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3928,7 +4184,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3939,6 +4195,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3948,8 +4205,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3965,10 +4221,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3993,6 +4248,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4005,6 +4262,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -4016,6 +4274,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4033,7 +4292,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4047,7 +4310,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -4065,13 +4328,16 @@ def list_web_apps( :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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4084,6 +4350,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -4096,6 +4363,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -4114,7 +4382,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4128,7 +4400,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -4142,17 +4414,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4170,7 +4449,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4203,6 +4482,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4215,6 +4496,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -4226,6 +4508,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4243,7 +4526,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4254,7 +4541,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4265,6 +4552,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4274,8 +4562,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4291,10 +4578,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4316,7 +4602,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -4325,6 +4611,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4337,6 +4625,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -4349,6 +4638,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -4367,7 +4657,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4381,7 +4675,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -4404,6 +4698,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4416,6 +4712,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -4427,6 +4724,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4444,7 +4742,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4458,7 +4760,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -4489,18 +4791,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4515,7 +4824,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -4532,6 +4841,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4541,6 +4851,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -4548,7 +4859,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -4567,7 +4882,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4604,8 +4919,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4618,6 +4934,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4642,10 +4959,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4679,6 +4995,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4688,6 +5005,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4695,7 +5013,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 400, 404, 409]: @@ -4714,7 +5036,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4745,6 +5067,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4759,6 +5083,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4772,6 +5097,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4789,7 +5115,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4803,7 +5133,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_instance_metrics( @@ -4834,7 +5164,7 @@ def list_worker_pool_instance_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -4843,6 +5173,8 @@ def list_worker_pool_instance_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4857,6 +5189,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_worker_pool_instance_metrics.metadata['url'], @@ -4872,6 +5205,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -4891,7 +5225,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4905,7 +5243,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics'} # type: ignore + list_worker_pool_instance_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metrics"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -4932,6 +5270,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4945,6 +5285,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4957,6 +5298,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4974,7 +5316,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4988,7 +5334,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metrics( @@ -5016,7 +5362,7 @@ def list_web_worker_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -5025,6 +5371,8 @@ def list_web_worker_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5038,6 +5386,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_web_worker_metrics.metadata['url'], @@ -5052,6 +5401,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -5071,7 +5421,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5085,7 +5439,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics'} # type: ignore + list_web_worker_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -5110,6 +5464,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5123,6 +5479,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -5135,6 +5492,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5152,7 +5510,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5166,7 +5528,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -5191,6 +5553,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5204,6 +5568,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -5216,6 +5581,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5233,7 +5599,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5247,4 +5617,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_plans_operations.py index 5da3b2300149..0f026858fe28 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,25 +185,26 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -214,35 +218,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -255,31 +259,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -292,10 +297,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -304,21 +310,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,9 +337,10 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -342,16 +349,16 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -364,10 +371,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -376,21 +384,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -403,10 +411,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -415,21 +424,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -440,31 +449,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -475,31 +485,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -510,31 +521,32 @@ def build_list_metric_defintions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -548,35 +560,36 @@ def build_list_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -589,27 +602,28 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -624,37 +638,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -665,31 +680,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -702,33 +718,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -739,31 +756,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -775,10 +793,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -786,21 +805,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -813,10 +832,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -825,21 +845,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -855,12 +875,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -869,23 +889,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -899,10 +919,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -910,21 +931,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -937,10 +958,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -949,21 +971,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -979,12 +1001,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -993,23 +1015,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1024,9 +1046,10 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1035,16 +1058,16 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1060,12 +1083,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1074,23 +1097,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1104,9 +1127,10 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1114,20 +1138,20 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1170,6 +1194,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1180,6 +1206,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1190,6 +1217,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1208,7 +1236,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1222,7 +1254,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1243,6 +1275,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1254,6 +1288,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1264,6 +1299,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1281,7 +1317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1295,7 +1335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1323,17 +1363,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1349,7 +1396,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1365,6 +1412,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1373,6 +1421,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1380,7 +1429,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1401,7 +1454,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1435,8 +1488,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1448,6 +1502,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1472,13 +1527,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1503,17 +1557,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1523,7 +1584,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1555,6 +1616,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1563,6 +1625,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1570,7 +1633,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1589,7 +1656,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1618,17 +1685,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1643,7 +1717,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1678,6 +1752,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1685,12 +1761,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1705,11 +1786,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1740,6 +1821,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1747,12 +1830,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1762,7 +1850,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1797,6 +1885,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1804,12 +1894,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1824,7 +1919,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1853,6 +1948,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1867,6 +1964,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1880,6 +1978,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1897,7 +1996,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1911,7 +2014,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1939,17 +2042,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1964,7 +2074,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1989,6 +2099,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2001,6 +2113,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -2012,6 +2125,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2029,7 +2143,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2043,7 +2161,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace def list_metric_defintions( @@ -2067,6 +2185,8 @@ def list_metric_defintions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2079,6 +2199,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_defintions.metadata['url'], ) request = _convert_request(request) @@ -2090,6 +2211,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2107,7 +2229,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2121,7 +2247,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metric_defintions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions'} # type: ignore + list_metric_defintions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics( @@ -2146,7 +2272,7 @@ def list_metrics( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -2155,6 +2281,8 @@ def list_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2167,6 +2295,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -2180,6 +2309,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -2199,7 +2329,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2213,10 +2347,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2246,18 +2380,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2267,7 +2408,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2290,18 +2431,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2314,6 +2458,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2328,6 +2473,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2348,7 +2494,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2362,7 +2512,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2390,17 +2540,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2415,7 +2572,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2435,7 +2592,8 @@ def list_usages( :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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2444,6 +2602,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2456,6 +2616,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2468,6 +2629,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2486,7 +2648,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2500,7 +2666,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2528,17 +2694,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2553,7 +2726,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2585,18 +2758,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2612,7 +2792,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2647,6 +2827,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2654,12 +2836,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2674,7 +2861,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2712,6 +2899,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2722,6 +2910,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2729,7 +2918,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2744,7 +2937,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2776,18 +2969,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2802,7 +3002,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2837,6 +3037,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2844,12 +3046,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2865,7 +3072,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2903,6 +3110,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2913,6 +3121,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2920,7 +3129,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2936,11 +3149,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2971,6 +3184,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2978,12 +3193,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2993,7 +3213,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -3031,6 +3251,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -3041,6 +3262,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -3048,7 +3270,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -3064,11 +3290,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3096,18 +3322,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3117,5 +3350,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificate_registration_provider_operations.py index b6a49223221d..941aa410b36d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificates_operations.py index 33cc167ff2d0..c56ab5b821d8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -135,35 +138,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,25 +179,26 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -208,35 +212,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -279,6 +283,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -289,6 +295,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -298,6 +305,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -315,7 +323,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -329,7 +341,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -349,6 +361,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +374,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -370,6 +385,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -387,7 +403,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -401,7 +421,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -429,17 +449,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -454,7 +481,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -486,6 +513,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -494,6 +522,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -501,7 +530,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -516,11 +549,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -545,17 +578,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -565,7 +605,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -597,6 +637,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -605,6 +646,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -612,7 +654,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -627,5 +673,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_deleted_web_apps_operations.py index 34a460d777a4..3180f00a2c3f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_get_deleted_web_app_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -162,6 +165,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -172,6 +177,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -181,6 +187,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -198,7 +205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -233,6 +244,8 @@ def list_by_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -244,6 +257,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -254,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -271,7 +286,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -285,7 +304,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace def get_deleted_web_app_by_location( @@ -313,17 +332,24 @@ def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,5 +364,5 @@ def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_diagnostics_operations.py index 00ec9d64672d..bbca0f38f01a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1057,11 +1087,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1074,12 +1104,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1088,7 +1121,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1103,7 +1140,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1128,6 +1165,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1140,6 +1179,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1151,6 +1191,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1168,7 +1209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1182,7 +1227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1205,11 +1250,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1222,12 +1267,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1236,7 +1284,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1303,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1276,6 +1328,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1288,6 +1342,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1299,6 +1354,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1316,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1330,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1361,18 +1421,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1454,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1415,6 +1482,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1428,6 +1497,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1440,6 +1510,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1457,7 +1528,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,7 +1546,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1505,6 +1580,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1512,12 +1589,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1614,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1559,11 +1641,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1576,6 +1658,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1583,6 +1667,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1591,7 +1676,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1695,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1634,6 +1723,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1647,6 +1738,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1751,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1769,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1787,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1720,6 +1817,8 @@ def get_site_detector( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1734,6 +1833,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) @@ -1747,6 +1847,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1764,7 +1865,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1778,7 +1883,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace def execute_site_detector( @@ -1804,11 +1909,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1821,6 +1926,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1828,6 +1935,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1836,7 +1944,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1851,7 +1963,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1879,6 +1991,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1892,6 +2006,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1904,6 +2019,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1921,7 +2037,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1935,7 +2055,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1961,11 +2081,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1978,6 +2098,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1985,6 +2107,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1993,7 +2116,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2008,7 +2135,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2036,6 +2163,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2049,6 +2178,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2061,6 +2191,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2078,7 +2209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2092,7 +2227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2126,6 +2261,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2133,12 +2270,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2153,7 +2295,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2184,6 +2326,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2198,6 +2342,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2211,6 +2356,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2228,7 +2374,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2242,7 +2392,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2279,6 +2429,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2287,12 +2439,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2307,7 +2464,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2337,11 +2494,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2354,6 +2511,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2362,6 +2521,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2370,7 +2530,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2385,7 +2549,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2416,6 +2580,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2430,6 +2596,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2443,6 +2610,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2460,7 +2628,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2474,7 +2646,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2507,6 +2679,8 @@ def get_site_detector_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2522,6 +2696,7 @@ def prepare_request(next_link=None): detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) @@ -2536,6 +2711,7 @@ def prepare_request(next_link=None): detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2553,7 +2729,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2567,7 +2747,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace def execute_site_detector_slot( @@ -2596,11 +2776,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2613,6 +2793,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2621,6 +2803,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2629,7 +2812,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2644,5 +2831,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domain_registration_provider_operations.py index b701c13e943a..640070953894 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py index f79c45c96fef..65c0b1550918 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,27 +295,28 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -325,35 +330,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -366,31 +371,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -402,10 +408,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -413,21 +420,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -442,12 +449,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -455,23 +462,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,9 +492,10 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -495,16 +503,16 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -519,12 +527,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -532,23 +540,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -561,25 +569,26 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -628,12 +637,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -641,7 +652,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -656,7 +671,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -673,6 +688,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -683,6 +700,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -692,6 +710,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -709,7 +728,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -723,7 +746,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -745,15 +768,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -768,7 +798,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -790,6 +820,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -803,6 +834,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -815,6 +847,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -834,7 +867,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -848,7 +885,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -867,6 +904,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -878,6 +917,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -888,6 +928,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -905,7 +946,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -919,7 +964,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -947,17 +992,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -972,7 +1024,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -988,6 +1040,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -996,6 +1049,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1003,7 +1057,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1021,7 +1079,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1054,8 +1112,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1067,6 +1126,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1091,13 +1151,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1126,18 +1185,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1147,7 +1213,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1179,6 +1245,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1187,6 +1254,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1194,7 +1262,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1213,7 +1285,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1238,6 +1310,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1250,6 +1324,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1261,6 +1336,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1278,7 +1354,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1292,7 +1372,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1323,18 +1403,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1349,7 +1436,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1386,6 +1473,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1395,6 +1483,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1402,7 +1491,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1417,11 +1510,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1449,18 +1542,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1470,7 +1570,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1507,6 +1607,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1516,6 +1617,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1523,7 +1625,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1538,11 +1644,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1567,17 +1673,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204, 400, 500]: @@ -1587,5 +1700,5 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_provider_operations.py index 5d0402577120..f4a3b9876ca3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum4"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,24 +59,25 @@ def build_get_available_stacks_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -86,31 +88,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum5"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -146,7 +149,7 @@ def get_available_stacks( Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2018_02_01.models.Enum4 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -155,6 +158,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +169,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -173,6 +179,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -191,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -205,7 +216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -224,6 +235,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -233,6 +246,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -241,6 +255,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -258,7 +273,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -272,7 +291,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -284,7 +303,7 @@ def get_available_stacks_on_prem( Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2018_02_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -293,6 +312,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -303,6 +324,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -313,6 +335,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -331,7 +354,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -345,4 +372,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_recommendations_operations.py index bf45ce9df8c3..257aeb5f75c7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,23 +69,24 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -94,24 +96,25 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -125,35 +128,36 @@ def build_list_history_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,35 +171,36 @@ def build_list_recommended_rules_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -208,26 +213,27 @@ def build_disable_all_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -240,26 +246,27 @@ def build_reset_all_filters_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -274,10 +281,11 @@ def build_get_rule_details_by_hosting_environment_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), @@ -285,25 +293,25 @@ def build_get_rule_details_by_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -317,9 +325,10 @@ def build_disable_recommendation_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -327,17 +336,17 @@ def build_disable_recommendation_for_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -351,35 +360,36 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -393,35 +403,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -432,25 +443,26 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -461,25 +473,26 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -494,10 +507,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -505,25 +519,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -535,9 +549,10 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -545,16 +560,16 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -596,7 +611,7 @@ def list( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -605,6 +620,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -615,6 +632,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -626,6 +644,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -645,7 +664,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -659,10 +682,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: @@ -681,15 +704,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -699,11 +729,11 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any @@ -725,16 +755,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -744,7 +781,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -769,7 +806,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -778,6 +815,8 @@ def list_history_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -790,6 +829,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -803,6 +843,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -822,7 +863,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -836,7 +881,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -859,7 +904,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -868,6 +913,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -880,6 +927,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -893,6 +941,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -912,7 +961,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -926,10 +979,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_hosting_environment( + def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -957,18 +1010,25 @@ def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -978,11 +1038,11 @@ def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_hosting_environment( + def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1010,18 +1070,25 @@ def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1031,7 +1098,7 @@ def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1055,10 +1122,10 @@ def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1071,12 +1138,15 @@ def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -1084,7 +1154,11 @@ def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1099,11 +1173,11 @@ def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_hosting_environment( + def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1134,19 +1208,26 @@ def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1156,7 +1237,7 @@ def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -1181,7 +1262,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1190,6 +1271,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1202,6 +1285,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -1215,6 +1299,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -1234,7 +1319,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1248,7 +1337,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -1271,7 +1360,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1280,6 +1369,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1292,6 +1383,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -1305,6 +1397,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -1324,7 +1417,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1338,10 +1435,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1366,17 +1463,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1386,11 +1490,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1415,17 +1519,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1435,7 +1546,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1459,10 +1570,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1475,12 +1586,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -1488,7 +1602,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1503,11 +1621,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1535,18 +1653,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1556,5 +1681,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_resource_health_metadata_operations.py index 3c1cdbe70a31..397407db4bd6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -342,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -353,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -363,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -380,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -394,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -418,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -430,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -441,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -458,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -472,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -500,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -525,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -553,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -566,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -578,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -595,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -609,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -640,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -666,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_top_level_domains_operations.py index 147201d33216..e06b57c12e69 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -220,7 +230,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -245,16 +255,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,7 +286,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -294,6 +311,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -308,6 +326,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -321,6 +340,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -340,7 +360,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,4 +378,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_apps_operations.py index 384615be7422..d1c2b6c68b9b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,29 +188,30 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -221,35 +225,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,33 +268,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -304,33 +309,33 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -346,35 +351,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -387,31 +392,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -423,10 +429,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -434,21 +441,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -460,9 +467,10 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -470,16 +478,16 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -494,12 +502,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -507,23 +515,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -540,11 +548,11 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -552,22 +560,22 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -580,31 +588,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -618,35 +627,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -659,31 +668,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -697,35 +707,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -738,31 +748,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -776,35 +787,35 @@ def build_update_azure_storage_accounts_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -817,31 +828,32 @@ def build_list_azure_storage_accounts_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -855,35 +867,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -896,25 +908,26 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -925,31 +938,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -963,35 +977,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1004,31 +1018,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1039,31 +1054,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1077,35 +1093,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1121,35 +1137,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1162,31 +1178,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1197,31 +1214,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1235,35 +1253,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1276,31 +1294,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1311,31 +1330,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1349,35 +1369,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1390,31 +1410,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1428,35 +1449,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1472,35 +1493,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1513,31 +1534,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1549,10 +1571,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1560,21 +1583,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1586,9 +1609,10 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1596,16 +1620,16 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1616,31 +1640,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1651,31 +1676,32 @@ def build_get_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1686,31 +1712,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1722,10 +1749,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1733,21 +1761,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1759,9 +1787,10 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1769,16 +1798,16 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1790,9 +1819,10 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1800,16 +1830,16 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1821,9 +1851,10 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1831,16 +1862,16 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -1851,31 +1882,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1887,10 +1919,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1898,21 +1931,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1927,12 +1960,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1940,23 +1973,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1970,9 +2003,10 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1980,16 +2014,16 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2001,10 +2035,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2012,21 +2047,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2040,35 +2075,35 @@ def build_discover_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2081,31 +2116,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2117,10 +2153,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2128,21 +2165,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2157,12 +2194,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2170,23 +2207,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2200,9 +2237,10 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2210,16 +2248,16 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2234,12 +2272,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2247,23 +2285,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2276,31 +2314,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2314,35 +2353,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2355,31 +2394,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2390,31 +2430,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2425,31 +2466,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2461,10 +2503,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2472,21 +2515,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2501,12 +2544,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2514,23 +2557,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2544,9 +2587,10 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2554,16 +2598,16 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2579,12 +2623,12 @@ def build_create_or_update_function_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2593,23 +2637,23 @@ def build_create_or_update_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2624,9 +2668,10 @@ def build_delete_function_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2635,16 +2680,16 @@ def build_delete_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2656,10 +2701,11 @@ def build_list_function_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2667,21 +2713,21 @@ def build_list_function_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2693,10 +2739,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2704,21 +2751,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2729,31 +2776,32 @@ def build_list_host_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2764,31 +2812,32 @@ def build_list_sync_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2799,25 +2848,26 @@ def build_sync_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -2833,12 +2883,12 @@ def build_create_or_update_host_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2847,23 +2897,23 @@ def build_create_or_update_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2878,10 +2928,11 @@ def build_delete_host_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2890,21 +2941,21 @@ def build_delete_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2915,31 +2966,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2951,10 +3003,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2962,21 +3015,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2991,12 +3044,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3004,23 +3057,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3034,9 +3087,10 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3044,16 +3098,16 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -3066,10 +3120,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3078,21 +3133,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3108,12 +3163,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3122,23 +3177,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3153,9 +3208,10 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3164,16 +3220,16 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -3189,12 +3245,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3203,23 +3259,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3234,10 +3290,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3246,21 +3303,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3271,31 +3328,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3306,31 +3364,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3342,10 +3401,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3353,21 +3413,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3382,12 +3442,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3395,23 +3455,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3425,9 +3485,10 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3435,16 +3496,16 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -3459,12 +3520,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3472,23 +3533,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3501,31 +3562,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3537,10 +3599,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3548,21 +3611,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3577,12 +3640,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3590,23 +3653,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3620,10 +3683,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3631,21 +3695,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3657,10 +3721,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3668,21 +3733,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3695,10 +3760,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3707,21 +3773,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3734,9 +3800,10 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3745,16 +3812,16 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -3767,10 +3834,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3779,21 +3847,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3806,10 +3874,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3818,21 +3887,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3846,10 +3915,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3859,21 +3929,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3886,10 +3956,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3898,21 +3969,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3926,10 +3997,11 @@ def build_get_instance_process_thread_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3939,21 +4011,21 @@ def build_get_instance_process_thread_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3964,31 +4036,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3999,31 +4072,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4034,31 +4108,32 @@ def build_list_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4072,35 +4147,36 @@ def build_list_metrics_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4115,36 +4191,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4160,35 +4236,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4201,31 +4277,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4236,31 +4313,32 @@ def build_get_swift_virtual_network_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4274,35 +4352,35 @@ def build_create_or_update_swift_virtual_network_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4315,25 +4393,26 @@ def build_delete_swift_virtual_network_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4347,35 +4426,35 @@ def build_update_swift_virtual_network_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4389,10 +4468,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4400,21 +4480,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4426,10 +4506,11 @@ def build_get_network_trace_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4437,21 +4518,21 @@ def build_get_network_trace_operation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4466,37 +4547,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4511,37 +4593,38 @@ def build_start_web_site_network_trace_operation_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4552,25 +4635,26 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4582,10 +4666,11 @@ def build_get_network_traces_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4593,21 +4678,21 @@ def build_get_network_traces_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4619,10 +4704,11 @@ def build_get_network_trace_operation_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4630,21 +4716,21 @@ def build_get_network_trace_operation_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4656,10 +4742,11 @@ def build_get_network_traces_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4667,21 +4754,21 @@ def build_get_network_traces_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4692,25 +4779,26 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4723,33 +4811,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4760,31 +4849,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4795,31 +4885,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4831,10 +4922,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4842,21 +4934,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4871,12 +4963,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4884,23 +4976,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4914,9 +5006,10 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4924,16 +5017,16 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -4948,12 +5041,12 @@ def build_update_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4961,23 +5054,23 @@ def build_update_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4990,31 +5083,32 @@ def build_get_private_access_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5028,35 +5122,35 @@ def build_put_private_access_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5069,31 +5163,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5105,10 +5200,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5116,21 +5212,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5142,9 +5238,10 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5152,16 +5249,16 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -5173,10 +5270,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5184,21 +5282,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5210,10 +5308,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5221,21 +5320,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5248,10 +5347,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5260,21 +5360,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5286,10 +5386,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5297,21 +5398,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5324,10 +5425,11 @@ def build_get_process_thread_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5336,21 +5438,21 @@ def build_get_process_thread_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5361,31 +5463,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5397,10 +5500,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5408,21 +5512,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5437,12 +5541,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5450,23 +5554,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5480,9 +5584,10 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5490,16 +5595,16 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -5513,35 +5618,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5554,25 +5659,26 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -5586,29 +5692,30 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -5622,33 +5729,33 @@ def build_restore_from_backup_blob_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5664,33 +5771,33 @@ def build_restore_from_deleted_app_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5706,33 +5813,33 @@ def build_restore_snapshot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5745,31 +5852,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5781,10 +5889,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5792,21 +5901,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5818,10 +5927,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5829,21 +5939,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5855,9 +5965,10 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5865,16 +5976,16 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -5885,31 +5996,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5921,10 +6033,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5932,21 +6045,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5961,12 +6074,12 @@ def build_create_or_update_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5974,23 +6087,23 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6007,9 +6120,10 @@ def build_delete_slot_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6017,20 +6131,20 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -6045,12 +6159,12 @@ def build_update_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6058,23 +6172,23 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6090,10 +6204,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6101,23 +6216,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6132,11 +6247,11 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6144,22 +6259,22 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6176,12 +6291,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6189,23 +6304,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6219,10 +6334,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6230,21 +6346,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6257,10 +6373,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6269,21 +6386,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6296,9 +6413,10 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6307,16 +6425,16 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -6332,12 +6450,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6346,23 +6464,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6380,11 +6498,11 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6393,22 +6511,22 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6422,10 +6540,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6433,21 +6552,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6462,12 +6581,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6475,23 +6594,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6505,10 +6624,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6516,21 +6636,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6545,12 +6665,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6558,23 +6678,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6588,10 +6708,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6599,21 +6720,21 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6628,12 +6749,12 @@ def build_update_azure_storage_accounts_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6641,23 +6762,23 @@ def build_update_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6671,10 +6792,11 @@ def build_list_azure_storage_accounts_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6682,21 +6804,21 @@ def build_list_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6711,12 +6833,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6724,23 +6846,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6754,9 +6876,10 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6764,16 +6887,16 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -6785,10 +6908,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6796,21 +6920,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6825,12 +6949,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6838,23 +6962,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6868,10 +6992,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6879,21 +7004,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6905,10 +7030,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6916,21 +7042,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6945,12 +7071,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6958,23 +7084,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6991,12 +7117,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7004,23 +7130,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7034,10 +7160,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7045,21 +7172,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7071,10 +7198,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7082,21 +7210,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7111,12 +7239,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7124,23 +7252,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7154,10 +7282,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7165,21 +7294,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7191,10 +7320,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7202,21 +7332,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7231,12 +7361,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7244,23 +7374,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7277,12 +7407,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7290,23 +7420,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7320,10 +7450,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7331,21 +7462,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7358,10 +7489,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7370,21 +7502,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7397,9 +7529,10 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7408,16 +7541,16 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7429,10 +7562,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7440,21 +7574,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7466,10 +7600,11 @@ def build_get_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7477,21 +7612,21 @@ def build_get_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7503,10 +7638,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7514,21 +7650,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7541,10 +7677,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7553,21 +7690,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7580,9 +7717,10 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7591,16 +7729,16 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7613,9 +7751,10 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7624,16 +7763,16 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7646,9 +7785,10 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7657,16 +7797,16 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7678,10 +7818,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7689,21 +7830,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7716,10 +7857,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7728,21 +7870,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7758,12 +7900,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7772,23 +7914,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7803,9 +7945,10 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7814,16 +7957,16 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -7836,10 +7979,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7848,21 +7992,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7877,12 +8021,12 @@ def build_discover_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7890,23 +8034,23 @@ def build_discover_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7920,10 +8064,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7931,21 +8076,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7958,10 +8103,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7970,21 +8116,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8000,12 +8146,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8014,23 +8160,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8045,9 +8191,10 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8056,16 +8203,16 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -8081,12 +8228,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8095,23 +8242,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8125,10 +8272,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8136,21 +8284,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8165,12 +8313,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8178,23 +8326,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8208,10 +8356,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8219,21 +8368,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8245,10 +8394,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8256,21 +8406,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8282,10 +8432,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8293,21 +8444,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8320,10 +8471,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8332,21 +8484,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8362,12 +8514,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8376,23 +8528,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8407,9 +8559,10 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8418,16 +8571,16 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -8444,12 +8597,12 @@ def build_create_or_update_function_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8459,23 +8612,23 @@ def build_create_or_update_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8491,9 +8644,10 @@ def build_delete_function_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8503,16 +8657,16 @@ def build_delete_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -8525,10 +8679,11 @@ def build_list_function_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8537,21 +8692,21 @@ def build_list_function_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8564,10 +8719,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8576,21 +8732,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8602,10 +8758,11 @@ def build_list_host_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8613,21 +8770,21 @@ def build_list_host_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8639,10 +8796,11 @@ def build_list_sync_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8650,21 +8808,21 @@ def build_list_sync_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8676,10 +8834,11 @@ def build_sync_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8687,21 +8846,21 @@ def build_sync_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8718,12 +8877,12 @@ def build_create_or_update_host_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8733,23 +8892,23 @@ def build_create_or_update_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8765,10 +8924,11 @@ def build_delete_host_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8778,21 +8938,21 @@ def build_delete_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8804,10 +8964,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8815,21 +8976,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8842,10 +9003,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8854,21 +9016,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8884,12 +9046,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8898,23 +9060,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8929,9 +9091,10 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8940,16 +9103,16 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -8963,10 +9126,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8976,21 +9140,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9007,12 +9171,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9022,23 +9186,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9054,9 +9218,10 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9066,16 +9231,16 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9092,12 +9257,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9107,23 +9272,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9139,10 +9304,11 @@ def build_list_hybrid_connection_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9152,21 +9318,21 @@ def build_list_hybrid_connection_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9178,10 +9344,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9189,21 +9356,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9215,10 +9382,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9226,21 +9394,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9253,10 +9421,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9265,21 +9434,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9295,12 +9464,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9309,23 +9478,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9340,9 +9509,10 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9351,16 +9521,16 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9376,12 +9546,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9390,23 +9560,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9420,10 +9590,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9431,21 +9602,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9458,10 +9629,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9470,21 +9642,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9500,12 +9672,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9514,23 +9686,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9545,10 +9717,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9557,21 +9730,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9584,10 +9757,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9596,21 +9770,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9624,10 +9798,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9637,21 +9812,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9665,9 +9840,10 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9677,16 +9853,16 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -9700,10 +9876,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9713,21 +9890,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9741,10 +9918,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9754,21 +9932,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9783,10 +9961,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9797,21 +9976,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9825,10 +10004,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9838,21 +10018,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9867,10 +10047,11 @@ def build_get_instance_process_thread_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9881,21 +10062,21 @@ def build_get_instance_process_thread_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9907,10 +10088,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9918,21 +10100,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9944,10 +10126,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9955,21 +10138,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9981,10 +10164,11 @@ def build_list_metric_definitions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9992,21 +10176,21 @@ def build_list_metric_definitions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10021,10 +10205,11 @@ def build_list_metrics_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10032,25 +10217,25 @@ def build_list_metrics_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if details is not None: - query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') + _query_parameters['details'] = _SERIALIZER.query("details", details, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10062,10 +10247,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10073,21 +10259,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10099,10 +10285,11 @@ def build_get_swift_virtual_network_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10110,21 +10297,21 @@ def build_get_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10139,12 +10326,12 @@ def build_create_or_update_swift_virtual_network_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10152,23 +10339,23 @@ def build_create_or_update_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10182,9 +10369,10 @@ def build_delete_swift_virtual_network_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10192,16 +10380,16 @@ def build_delete_swift_virtual_network_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10216,12 +10404,12 @@ def build_update_swift_virtual_network_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10229,23 +10417,23 @@ def build_update_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10260,10 +10448,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10272,21 +10461,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10299,10 +10488,11 @@ def build_get_network_trace_operation_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10311,21 +10501,21 @@ def build_get_network_trace_operation_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10341,10 +10531,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10352,27 +10543,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10388,10 +10579,11 @@ def build_start_web_site_network_trace_operation_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10399,27 +10591,27 @@ def build_start_web_site_network_trace_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10431,9 +10623,10 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10441,16 +10634,16 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10463,10 +10656,11 @@ def build_get_network_traces_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10475,21 +10669,21 @@ def build_get_network_traces_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10502,10 +10696,11 @@ def build_get_network_trace_operation_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10514,21 +10709,21 @@ def build_get_network_trace_operation_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10541,10 +10736,11 @@ def build_get_network_traces_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10553,21 +10749,21 @@ def build_get_network_traces_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10579,9 +10775,10 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10589,16 +10786,16 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10612,10 +10809,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10623,23 +10821,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10651,10 +10849,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10662,21 +10861,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10688,10 +10887,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10699,21 +10899,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10726,10 +10926,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10738,21 +10939,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10768,12 +10969,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10782,23 +10983,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10813,9 +11014,10 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10824,16 +11026,16 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -10849,12 +11051,12 @@ def build_update_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10863,23 +11065,23 @@ def build_update_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10893,10 +11095,11 @@ def build_get_private_access_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10904,21 +11107,21 @@ def build_get_private_access_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10933,12 +11136,12 @@ def build_put_private_access_vnet_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10946,23 +11149,23 @@ def build_put_private_access_vnet_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10976,10 +11179,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10987,21 +11191,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11014,10 +11218,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11026,21 +11231,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11053,9 +11258,10 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11064,16 +11270,16 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11086,10 +11292,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11098,21 +11305,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11125,10 +11332,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11137,21 +11345,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11165,10 +11373,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11178,21 +11387,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11205,10 +11414,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11217,21 +11427,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11245,10 +11455,11 @@ def build_get_process_thread_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11258,21 +11469,21 @@ def build_get_process_thread_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11284,10 +11495,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11295,21 +11507,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11322,10 +11534,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11334,21 +11547,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11364,12 +11577,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11378,23 +11591,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11409,9 +11622,10 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11420,16 +11634,16 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11444,12 +11658,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11457,23 +11671,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11487,9 +11701,10 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11497,16 +11712,16 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11521,9 +11736,10 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11531,20 +11747,20 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11559,11 +11775,11 @@ def build_restore_from_backup_blob_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11571,22 +11787,22 @@ def build_restore_from_backup_blob_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11603,11 +11819,11 @@ def build_restore_from_deleted_app_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11615,22 +11831,22 @@ def build_restore_from_deleted_app_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11647,11 +11863,11 @@ def build_restore_snapshot_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11659,22 +11875,22 @@ def build_restore_snapshot_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11688,10 +11904,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11699,21 +11916,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11726,10 +11943,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11738,21 +11956,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11765,10 +11983,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11777,21 +11996,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11804,9 +12023,10 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11815,16 +12035,16 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -11839,12 +12059,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11852,23 +12072,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11885,11 +12105,11 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11897,22 +12117,22 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11926,10 +12146,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11937,21 +12158,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11963,10 +12184,11 @@ def build_list_snapshots_from_dr_secondary_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11974,21 +12196,21 @@ def build_list_snapshots_from_dr_secondary_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12000,10 +12222,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12011,21 +12234,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12040,12 +12263,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12053,23 +12276,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12083,9 +12306,10 @@ def build_delete_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12093,16 +12317,16 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12117,12 +12341,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12130,23 +12354,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12160,9 +12384,10 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12170,16 +12395,16 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12195,10 +12420,11 @@ def build_start_network_trace_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12206,27 +12432,27 @@ def build_start_network_trace_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12238,9 +12464,10 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12248,16 +12475,16 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12269,9 +12496,10 @@ def build_stop_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12279,16 +12507,16 @@ def build_stop_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12300,9 +12528,10 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12310,16 +12539,16 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12331,9 +12560,10 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12341,16 +12571,16 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12362,10 +12592,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12373,21 +12604,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12400,10 +12631,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12412,21 +12644,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12439,9 +12671,10 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12450,16 +12683,16 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12472,10 +12705,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12484,21 +12718,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12512,10 +12746,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12525,21 +12760,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12552,9 +12787,10 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12563,16 +12799,16 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12586,10 +12822,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12597,23 +12834,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12625,10 +12862,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12636,21 +12874,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12663,10 +12901,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12675,21 +12914,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12705,12 +12944,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12719,23 +12958,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12750,9 +12989,10 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12761,16 +13001,16 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -12786,12 +13026,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12800,23 +13040,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12832,10 +13072,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12845,21 +13086,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12876,12 +13117,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12891,23 +13132,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12926,12 +13167,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12941,23 +13182,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12971,10 +13212,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12982,21 +13224,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13009,10 +13251,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13021,21 +13264,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13049,35 +13292,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13093,33 +13336,33 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13132,31 +13375,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13167,31 +13411,32 @@ def build_list_snapshots_from_dr_secondary_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13202,31 +13447,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13240,35 +13486,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13281,25 +13527,26 @@ def build_delete_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13313,35 +13560,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13354,25 +13601,26 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13387,37 +13635,38 @@ def build_start_network_trace_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13428,25 +13677,26 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13457,25 +13707,26 @@ def build_stop_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13486,25 +13737,26 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13515,25 +13767,26 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13544,31 +13797,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13580,10 +13834,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13591,21 +13846,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13617,9 +13872,10 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13627,16 +13883,16 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13648,10 +13904,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13659,21 +13916,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13686,10 +13943,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13698,21 +13956,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13724,9 +13982,10 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13734,16 +13993,16 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13756,33 +14015,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13793,31 +14053,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13829,10 +14090,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13840,21 +14102,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13869,12 +14131,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13882,23 +14144,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13912,9 +14174,10 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13922,16 +14185,16 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -13946,12 +14209,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13959,23 +14222,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13990,10 +14253,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14002,21 +14266,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14032,12 +14296,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14046,23 +14310,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14080,12 +14344,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14094,23 +14358,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14123,31 +14387,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14159,10 +14424,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14170,25 +14436,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -14224,6 +14490,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14234,6 +14502,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -14243,6 +14512,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14260,7 +14530,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14274,7 +14548,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -14297,6 +14571,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14308,6 +14584,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -14319,6 +14596,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -14337,7 +14615,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14351,7 +14633,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -14379,17 +14661,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14405,7 +14694,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -14421,6 +14710,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -14429,6 +14719,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -14436,7 +14727,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -14454,7 +14749,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -14490,8 +14785,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -14503,6 +14799,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -14527,13 +14824,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14549,10 +14845,10 @@ def delete( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -14565,11 +14861,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -14577,7 +14876,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -14587,7 +14890,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -14622,6 +14925,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -14630,6 +14934,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -14637,7 +14942,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -14656,7 +14965,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -14675,7 +14984,7 @@ def analyze_custom_hostname( :type resource_group_name: str :param name: Name of web app. :type name: str - :param host_name: Custom hostname. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -14688,18 +14997,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14714,11 +15030,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14746,6 +15062,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -14754,6 +15071,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -14761,7 +15079,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14771,7 +15093,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -14804,6 +15126,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -14812,6 +15135,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -14819,7 +15143,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14834,7 +15162,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -14858,6 +15186,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14870,6 +15200,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -14881,6 +15212,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14898,7 +15230,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14912,7 +15248,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def get_backup_status( @@ -14943,18 +15279,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14969,11 +15312,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15001,18 +15344,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15022,7 +15372,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -15061,6 +15411,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -15070,6 +15421,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -15077,7 +15429,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15092,10 +15448,10 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - def _restore_initial( + def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15109,6 +15465,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -15118,6 +15475,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -15125,7 +15483,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15135,11 +15497,11 @@ def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore( + def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15171,8 +15533,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -15185,6 +15548,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15206,10 +15570,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations( @@ -15233,6 +15596,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15245,6 +15610,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -15256,6 +15622,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15273,7 +15640,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15287,7 +15658,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -15318,6 +15689,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -15326,6 +15698,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -15333,7 +15706,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15348,7 +15725,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -15377,17 +15754,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15402,7 +15786,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -15434,6 +15818,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -15442,6 +15827,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -15449,7 +15835,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15464,7 +15854,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -15493,17 +15883,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15518,7 +15915,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -15551,6 +15948,7 @@ def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -15559,6 +15957,7 @@ def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -15566,7 +15965,11 @@ def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15581,7 +15984,7 @@ def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -15610,17 +16013,24 @@ def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15635,7 +16045,7 @@ def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -15667,6 +16077,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -15675,6 +16086,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -15682,7 +16094,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15697,11 +16113,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15726,17 +16142,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15746,7 +16169,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -15775,17 +16198,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15800,7 +16230,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -15832,6 +16262,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -15840,6 +16271,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -15847,7 +16279,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15862,7 +16298,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -15891,17 +16327,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15916,7 +16359,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -15945,17 +16388,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15970,7 +16420,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -16003,6 +16453,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -16011,6 +16462,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -16018,7 +16470,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16033,7 +16489,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -16065,6 +16521,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -16073,6 +16530,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -16080,7 +16538,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16095,7 +16557,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -16124,17 +16586,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16149,7 +16618,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -16164,17 +16633,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16188,7 +16664,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -16218,7 +16694,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -16229,6 +16706,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -16252,10 +16730,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -16286,6 +16763,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -16294,6 +16772,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -16301,7 +16780,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16316,7 +16799,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -16345,17 +16828,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16370,7 +16860,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -16399,17 +16889,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16424,7 +16921,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -16458,6 +16955,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -16466,6 +16964,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -16473,7 +16972,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16488,7 +16991,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -16519,17 +17022,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16544,7 +17054,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -16576,6 +17086,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -16584,6 +17095,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -16591,7 +17103,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16606,7 +17122,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -16638,6 +17154,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -16646,6 +17163,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -16653,7 +17171,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16668,7 +17190,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -16695,6 +17217,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16707,6 +17231,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -16718,6 +17243,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16735,7 +17261,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16749,7 +17279,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -16780,18 +17310,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16806,11 +17343,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16838,18 +17375,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16859,7 +17403,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -16888,17 +17432,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16914,7 +17465,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -16943,17 +17494,24 @@ def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16969,7 +17527,7 @@ def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -16994,6 +17552,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17006,6 +17566,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -17017,6 +17578,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17034,7 +17596,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17048,7 +17614,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -17079,18 +17645,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17106,11 +17679,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17138,18 +17711,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -17159,11 +17739,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17191,18 +17771,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17212,11 +17799,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17244,18 +17831,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17265,7 +17859,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -17289,6 +17883,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17301,6 +17897,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -17312,6 +17909,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17329,7 +17927,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17343,7 +17945,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -17374,18 +17976,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17400,7 +18009,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -17435,6 +18044,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -17444,6 +18054,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -17451,7 +18062,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17466,11 +18081,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17498,18 +18113,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -17519,7 +18141,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -17552,18 +18174,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17578,7 +18207,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -17613,6 +18242,7 @@ def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -17621,6 +18251,7 @@ def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -17628,7 +18259,11 @@ def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17643,7 +18278,7 @@ def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -17667,6 +18302,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17679,6 +18316,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -17690,6 +18328,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17707,7 +18346,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17721,7 +18364,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -17752,18 +18395,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17778,7 +18428,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -17813,6 +18463,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -17822,6 +18473,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -17829,7 +18481,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17844,11 +18500,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17876,18 +18532,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -17897,7 +18560,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -17932,6 +18595,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -17941,6 +18605,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -17948,7 +18613,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17963,7 +18632,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -17992,17 +18661,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18017,7 +18693,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -18033,6 +18709,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -18041,6 +18718,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -18048,7 +18726,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -18064,7 +18746,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -18098,8 +18780,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -18111,6 +18794,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18135,10 +18819,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -18166,17 +18849,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18192,7 +18882,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -18217,6 +18907,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18229,6 +18921,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -18240,6 +18933,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18257,7 +18951,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18270,7 +18968,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -18298,17 +18996,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18323,7 +19028,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -18355,18 +19060,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18382,7 +19094,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -18399,6 +19111,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -18408,6 +19121,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -18415,7 +19129,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -18429,7 +19147,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -18466,8 +19184,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -18480,6 +19199,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18504,13 +19224,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18538,18 +19257,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -18559,7 +19285,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -18597,6 +19323,7 @@ def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -18607,6 +19334,7 @@ def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -18614,7 +19342,11 @@ def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -18633,11 +19365,11 @@ def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret( + def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18668,6 +19400,8 @@ def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -18675,12 +19409,17 @@ def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -18690,7 +19429,7 @@ def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -18722,18 +19461,25 @@ def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18748,7 +19494,7 @@ def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -18780,18 +19526,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18806,7 +19559,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -18835,17 +19588,24 @@ def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18860,11 +19620,11 @@ def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status( + def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18889,17 +19649,24 @@ def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18910,11 +19677,11 @@ def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions( + def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18939,17 +19706,24 @@ def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18959,7 +19733,7 @@ def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace @@ -18997,6 +19771,7 @@ def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -19007,6 +19782,7 @@ def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -19014,7 +19790,11 @@ def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -19033,11 +19813,11 @@ def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret( + def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19068,6 +19848,8 @@ def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -19075,12 +19857,17 @@ def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19091,7 +19878,7 @@ def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -19116,6 +19903,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19128,6 +19917,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -19139,6 +19929,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19156,7 +19947,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19170,7 +19965,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -19201,18 +19996,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19227,7 +20029,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -19263,6 +20065,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -19272,6 +20075,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -19279,7 +20083,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19294,11 +20102,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19326,18 +20134,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19347,7 +20162,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -19382,6 +20197,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -19389,12 +20206,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19409,7 +20231,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -19447,6 +20269,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -19457,6 +20280,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -19464,7 +20288,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19479,11 +20307,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19514,6 +20342,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -19521,12 +20351,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19536,7 +20371,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -19574,6 +20409,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -19584,6 +20420,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -19591,7 +20428,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19606,7 +20447,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -19641,6 +20482,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -19648,12 +20491,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19668,7 +20516,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -19697,17 +20545,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19722,7 +20577,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -19751,17 +20606,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19776,7 +20638,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -19808,18 +20670,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19834,7 +20703,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -19869,6 +20738,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -19878,6 +20748,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -19885,7 +20756,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19900,11 +20775,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19932,18 +20807,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19953,7 +20835,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -19988,6 +20870,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -19997,6 +20880,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -20004,7 +20888,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20019,7 +20907,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -20044,6 +20932,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20056,6 +20946,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -20067,6 +20958,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20084,7 +20976,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20098,7 +20994,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_ms_deploy_status( @@ -20129,18 +21025,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20155,7 +21058,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -20172,6 +21075,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -20181,6 +21085,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -20188,7 +21093,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -20204,7 +21113,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -20241,8 +21150,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -20255,6 +21165,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20279,10 +21190,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -20313,18 +21223,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20340,7 +21257,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -20370,6 +21287,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20383,6 +21302,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -20395,6 +21315,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20412,7 +21333,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20425,7 +21350,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -20460,6 +21385,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -20467,12 +21394,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20488,11 +21420,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20526,6 +21458,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -20533,12 +21467,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20548,7 +21487,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -20584,6 +21523,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -20591,12 +21532,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20612,7 +21558,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -20646,6 +21592,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20660,6 +21608,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -20673,6 +21622,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20690,7 +21640,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20703,7 +21657,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -20741,6 +21695,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -20749,12 +21705,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20770,7 +21731,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -20802,6 +21763,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20816,6 +21779,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -20829,6 +21793,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20846,7 +21811,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20859,7 +21828,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def get_instance_process_thread( @@ -20899,6 +21868,8 @@ def get_instance_process_thread( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_thread_request( resource_group_name=resource_group_name, @@ -20907,12 +21878,17 @@ def get_instance_process_thread( thread_id=thread_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_thread.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20928,7 +21904,7 @@ def get_instance_process_thread( return deserialized - get_instance_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} # type: ignore + get_instance_process_thread.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -20957,17 +21933,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20982,7 +21965,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -21011,17 +21994,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21036,7 +22026,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -21061,6 +22051,8 @@ def list_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21073,6 +22065,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -21084,6 +22077,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21101,7 +22095,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21115,7 +22113,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions'} # type: ignore + list_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics( @@ -21135,12 +22133,12 @@ def list_metrics( :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. + default. Default value is None. :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -21149,6 +22147,8 @@ def list_metrics( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21161,6 +22161,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics.metadata['url'], @@ -21174,6 +22175,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -21193,7 +22195,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21207,7 +22213,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metrics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics'} # type: ignore + list_metrics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics"} # type: ignore def _migrate_storage_initial( self, @@ -21223,6 +22229,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -21231,6 +22238,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -21239,7 +22247,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21253,7 +22265,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -21291,8 +22303,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -21305,6 +22318,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21329,10 +22343,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -21347,6 +22360,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -21355,6 +22369,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -21362,7 +22377,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21376,7 +22395,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -21409,8 +22428,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -21422,6 +22442,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21446,10 +22467,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -21479,17 +22499,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21504,7 +22531,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -21533,17 +22560,24 @@ def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21558,7 +22592,7 @@ def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -21596,6 +22630,7 @@ def create_or_update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -21604,6 +22639,7 @@ def create_or_update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection.metadata['url'], @@ -21611,7 +22647,11 @@ def create_or_update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21626,11 +22666,11 @@ def create_or_update_swift_virtual_network_connection( return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network( + def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21655,17 +22695,24 @@ def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21675,7 +22722,7 @@ def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -21713,6 +22760,7 @@ def update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -21721,6 +22769,7 @@ def update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection.metadata['url'], @@ -21728,7 +22777,11 @@ def update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21743,7 +22796,7 @@ def update_swift_virtual_network_connection( return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -21775,18 +22828,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21802,7 +22862,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -21834,18 +22894,25 @@ def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21864,7 +22931,7 @@ def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -21885,11 +22952,11 @@ def start_web_site_network_trace( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -21902,11 +22969,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -21915,7 +22985,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21930,7 +23004,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_initial( @@ -21948,11 +23022,14 @@ def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -21961,7 +23038,11 @@ def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21979,7 +23060,7 @@ def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -22000,11 +23081,11 @@ def begin_start_web_site_network_trace_operation( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -22019,7 +23100,8 @@ def begin_start_web_site_network_trace_operation( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -22033,6 +23115,7 @@ def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -22056,13 +23139,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace( + def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22087,17 +23169,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22107,7 +23196,7 @@ def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace @@ -22139,18 +23228,25 @@ def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22165,7 +23261,7 @@ def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -22197,18 +23293,25 @@ def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22227,7 +23330,7 @@ def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -22259,18 +23362,25 @@ def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22285,11 +23395,11 @@ def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22314,17 +23424,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22334,7 +23451,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -22355,7 +23472,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -22364,6 +23481,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22376,6 +23495,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -22388,6 +23508,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -22406,7 +23527,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22420,7 +23545,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -22448,17 +23573,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22473,7 +23605,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -22502,17 +23634,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22527,7 +23666,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -22559,18 +23698,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22585,7 +23731,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -22620,6 +23766,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -22629,6 +23776,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -22636,7 +23784,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22651,11 +23803,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22683,18 +23835,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22704,7 +23863,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -22739,6 +23898,7 @@ def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -22748,6 +23908,7 @@ def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -22755,7 +23916,11 @@ def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22770,7 +23935,7 @@ def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -22801,17 +23966,24 @@ def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22826,7 +23998,7 @@ def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -22860,6 +24032,7 @@ def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -22868,6 +24041,7 @@ def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -22875,7 +24049,11 @@ def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22890,7 +24068,7 @@ def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -22916,6 +24094,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22928,6 +24108,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -22939,6 +24120,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22956,7 +24138,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22969,7 +24155,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -23000,18 +24186,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23027,11 +24220,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23061,18 +24254,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -23082,7 +24282,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -23114,18 +24314,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23141,7 +24348,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -23171,6 +24378,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23184,6 +24393,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -23196,6 +24406,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23213,7 +24424,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23226,7 +24441,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -23260,6 +24475,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -23267,12 +24484,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23288,7 +24510,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -23316,6 +24538,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23329,6 +24553,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -23341,6 +24566,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23358,7 +24584,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23371,7 +24601,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def get_process_thread( @@ -23407,6 +24637,8 @@ def get_process_thread( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_thread_request( resource_group_name=resource_group_name, @@ -23414,12 +24646,17 @@ def get_process_thread( process_id=process_id, thread_id=thread_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_thread.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23435,7 +24672,7 @@ def get_process_thread( return deserialized - get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} # type: ignore + get_process_thread.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -23460,6 +24697,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23472,6 +24711,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -23483,6 +24723,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23500,7 +24741,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23514,7 +24759,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -23545,18 +24790,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23571,7 +24823,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -23607,6 +24859,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -23616,6 +24869,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -23623,7 +24877,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23638,11 +24896,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23670,18 +24928,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23691,7 +24956,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -23725,6 +24990,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -23733,6 +24999,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -23740,7 +25007,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23755,11 +25026,11 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23786,17 +25057,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23806,11 +25084,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23827,10 +25105,11 @@ def restart( :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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -23843,11 +25122,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -23855,7 +25137,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23865,10 +25151,10 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - def _restore_from_backup_blob_initial( + def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23881,6 +25167,7 @@ def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -23889,6 +25176,7 @@ def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -23896,7 +25184,11 @@ def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23906,11 +25198,11 @@ def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob( + def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23939,8 +25231,9 @@ def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -23952,6 +25245,7 @@ def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23973,12 +25267,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_initial( + def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23991,6 +25284,7 @@ def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -23999,6 +25293,7 @@ def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -24006,7 +25301,11 @@ def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24016,11 +25315,11 @@ def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app( + def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24049,8 +25348,9 @@ def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24062,6 +25362,7 @@ def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24083,12 +25384,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_initial( + def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24101,6 +25401,7 @@ def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -24109,6 +25410,7 @@ def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -24116,7 +25418,11 @@ def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24126,11 +25432,11 @@ def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot( + def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24160,8 +25466,9 @@ def begin_restore_snapshot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24173,6 +25480,7 @@ def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24194,10 +25502,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -24221,6 +25528,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24233,6 +25542,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -24244,6 +25554,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24261,7 +25572,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24274,7 +25589,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -24305,18 +25620,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24332,7 +25654,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -24348,18 +25670,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -24378,7 +25707,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -24412,7 +25741,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -24424,6 +25754,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -24447,13 +25778,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24481,18 +25811,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -24502,7 +25839,7 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -24525,6 +25862,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24537,6 +25876,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -24548,6 +25888,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24565,7 +25906,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24579,7 +25924,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -24610,18 +25955,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24637,7 +25989,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -24654,6 +26006,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -24663,6 +26016,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -24670,7 +26024,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24688,7 +26046,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -24728,8 +26086,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -24742,6 +26101,7 @@ def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24766,13 +26126,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24792,11 +26151,11 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -24809,12 +26168,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -24822,7 +26184,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -24832,7 +26198,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -24871,6 +26237,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -24880,6 +26247,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -24887,7 +26255,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24906,7 +26278,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -24928,7 +26300,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -24941,19 +26313,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24968,11 +26347,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25004,6 +26383,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -25013,6 +26393,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -25020,7 +26401,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25030,7 +26415,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -25067,6 +26452,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -25076,6 +26462,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -25083,7 +26470,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25098,7 +26489,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -25126,6 +26517,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25139,6 +26532,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -25151,6 +26545,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25168,7 +26563,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25182,7 +26581,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def get_backup_status_slot( @@ -25217,6 +26616,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -25224,12 +26625,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25244,11 +26650,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25280,6 +26686,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -25287,12 +26695,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25302,7 +26715,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -25344,6 +26757,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -25354,6 +26768,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -25361,7 +26776,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25376,10 +26795,10 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - def _restore_slot_initial( + def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25394,6 +26813,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -25404,6 +26824,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -25411,7 +26832,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25421,11 +26846,11 @@ def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore_slot( + def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25461,8 +26886,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25476,6 +26902,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25497,10 +26924,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -25528,6 +26954,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25541,6 +26969,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -25553,6 +26982,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25570,7 +27000,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25584,7 +27018,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -25619,6 +27053,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -25628,6 +27063,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -25635,7 +27071,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25650,7 +27090,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -25683,18 +27123,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25709,7 +27156,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -25744,6 +27191,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -25753,6 +27201,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -25760,7 +27209,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25775,7 +27228,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -25808,18 +27261,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25834,7 +27294,7 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace @@ -25871,6 +27331,7 @@ def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -25880,6 +27341,7 @@ def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -25887,7 +27349,11 @@ def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25902,7 +27368,7 @@ def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -25935,18 +27401,25 @@ def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25961,7 +27434,7 @@ def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -25997,6 +27470,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -26006,6 +27480,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -26013,7 +27488,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26028,11 +27507,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26061,18 +27540,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26082,7 +27568,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -26115,18 +27601,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26141,7 +27634,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -26177,6 +27670,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -26186,6 +27680,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -26193,7 +27688,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26208,7 +27707,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -26241,18 +27740,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26267,7 +27773,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -26300,18 +27806,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26326,7 +27839,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -26363,6 +27876,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -26372,6 +27886,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -26379,7 +27894,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26394,7 +27913,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -26430,6 +27949,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -26439,6 +27959,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -26446,7 +27967,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26461,7 +27986,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -26494,18 +28019,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26520,7 +28052,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -26536,18 +28068,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26561,7 +28100,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -26595,7 +28134,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -26607,6 +28147,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -26630,10 +28171,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -26667,6 +28207,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -26676,6 +28217,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -26683,7 +28225,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26698,7 +28244,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -26730,18 +28276,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26756,7 +28309,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -26791,18 +28344,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26817,7 +28377,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -26853,6 +28413,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -26862,6 +28423,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -26869,7 +28431,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26884,7 +28450,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -26920,6 +28486,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -26929,6 +28496,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -26936,7 +28504,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26951,7 +28523,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -26982,6 +28554,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26995,6 +28569,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -27007,6 +28582,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27024,7 +28600,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27038,7 +28618,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -27073,6 +28653,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -27080,12 +28662,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27100,11 +28687,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27136,6 +28723,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -27143,12 +28732,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -27158,7 +28752,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -27190,18 +28784,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -27217,7 +28818,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -27249,18 +28850,25 @@ def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -27276,7 +28884,7 @@ def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -27305,6 +28913,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27318,6 +28928,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -27330,6 +28941,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27347,7 +28959,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27361,7 +28977,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -27396,6 +29012,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -27403,12 +29021,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -27424,11 +29047,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27460,6 +29083,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -27467,12 +29092,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -27482,11 +29112,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27518,6 +29148,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -27525,12 +29157,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -27540,11 +29177,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27576,6 +29213,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -27583,12 +29222,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -27598,7 +29242,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -27626,6 +29270,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27639,6 +29285,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -27651,6 +29298,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27668,7 +29316,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27682,7 +29334,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -27717,6 +29369,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -27724,12 +29378,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27744,7 +29403,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -27783,6 +29442,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -27793,6 +29453,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -27800,7 +29461,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27815,11 +29480,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27851,6 +29516,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -27858,12 +29525,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -27873,7 +29545,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -27910,6 +29582,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -27917,12 +29591,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27937,7 +29616,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -27976,6 +29655,7 @@ def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -27985,6 +29665,7 @@ def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -27992,7 +29673,11 @@ def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28007,7 +29692,7 @@ def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -28035,6 +29720,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28048,6 +29735,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -28060,6 +29748,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28077,7 +29766,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28091,7 +29784,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -28126,6 +29819,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -28133,12 +29828,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28153,7 +29853,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -28192,6 +29892,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -28202,6 +29903,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -28209,7 +29911,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28224,11 +29930,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28260,6 +29966,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -28267,12 +29975,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28282,7 +29995,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -28321,6 +30034,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -28331,6 +30045,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -28338,7 +30053,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28353,7 +30072,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -28385,18 +30104,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28411,7 +30137,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -28428,6 +30154,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -28437,6 +30164,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -28444,7 +30172,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -28460,7 +30192,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -28497,8 +30229,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -28511,6 +30244,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -28535,10 +30269,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -28569,18 +30302,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28596,7 +30336,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -28624,6 +30364,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28637,6 +30379,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -28649,6 +30392,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28666,7 +30410,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28679,7 +30427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -28710,18 +30458,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28736,7 +30491,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -28771,6 +30526,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -28778,12 +30535,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28799,7 +30561,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -28817,6 +30579,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -28827,6 +30590,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -28834,7 +30598,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -28848,7 +30616,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -28888,8 +30656,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -28903,6 +30672,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -28927,13 +30697,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28964,6 +30733,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -28971,12 +30742,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -28986,7 +30762,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -29027,6 +30803,7 @@ def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -29038,6 +30815,7 @@ def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -29045,7 +30823,11 @@ def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -29064,11 +30846,11 @@ def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret_slot( + def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29102,6 +30884,8 @@ def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -29110,12 +30894,17 @@ def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -29125,7 +30914,7 @@ def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -29160,6 +30949,8 @@ def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -29167,12 +30958,17 @@ def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29187,7 +30983,7 @@ def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -29222,6 +31018,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -29229,12 +31027,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29249,7 +31052,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -29281,18 +31084,25 @@ def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29307,11 +31117,11 @@ def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status_slot( + def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29339,18 +31149,25 @@ def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -29361,11 +31178,11 @@ def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions_slot( + def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29393,18 +31210,25 @@ def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -29415,7 +31239,7 @@ def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace @@ -29456,6 +31280,7 @@ def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -29467,6 +31292,7 @@ def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -29474,7 +31300,11 @@ def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -29493,11 +31323,11 @@ def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret_slot( + def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29531,6 +31361,8 @@ def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -29539,12 +31371,17 @@ def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -29555,7 +31392,7 @@ def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -29584,6 +31421,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29597,6 +31436,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -29609,6 +31449,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29626,7 +31467,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29640,7 +31485,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -29675,6 +31520,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -29682,12 +31529,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29702,7 +31554,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -29742,6 +31594,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -29752,6 +31605,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -29759,7 +31613,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29774,11 +31632,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29810,6 +31668,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -29817,12 +31677,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -29832,7 +31697,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -29870,6 +31735,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -29878,12 +31745,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29898,7 +31770,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -29939,6 +31811,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -29950,6 +31823,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -29957,7 +31831,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29972,11 +31850,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30010,6 +31888,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -30018,12 +31898,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30033,7 +31918,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -30074,6 +31959,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -30085,6 +31971,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -30092,7 +31979,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30107,7 +31998,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -30145,6 +32036,8 @@ def list_hybrid_connection_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connection_keys_slot_request( resource_group_name=resource_group_name, @@ -30153,12 +32046,17 @@ def list_hybrid_connection_keys_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30173,7 +32071,7 @@ def list_hybrid_connection_keys_slot( 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'} # type: ignore + list_hybrid_connection_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -30205,18 +32103,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30231,7 +32136,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -30264,18 +32169,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30290,7 +32202,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -30326,6 +32238,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -30333,12 +32247,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30353,7 +32272,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -30392,6 +32311,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -30402,6 +32322,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -30409,7 +32330,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30424,11 +32349,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30460,6 +32385,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -30467,12 +32394,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30482,7 +32414,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -30521,6 +32453,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -30531,6 +32464,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -30538,7 +32472,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30553,7 +32491,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -30582,6 +32520,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30595,6 +32535,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -30607,6 +32548,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30624,7 +32566,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30638,7 +32584,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_ms_deploy_status_slot( @@ -30672,6 +32618,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -30679,12 +32627,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30699,7 +32652,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -30717,6 +32670,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -30727,6 +32681,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -30734,7 +32689,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -30750,7 +32709,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -30790,8 +32749,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -30805,6 +32765,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -30829,10 +32790,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -30866,6 +32826,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -30873,12 +32835,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30894,7 +32861,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -30928,6 +32895,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30942,6 +32911,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -30955,6 +32925,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30972,7 +32943,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30985,7 +32960,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -31024,6 +32999,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -31032,12 +33009,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31053,11 +33035,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31095,6 +33077,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -31103,12 +33087,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -31118,7 +33107,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -31158,6 +33147,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -31166,12 +33157,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31187,7 +33183,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -31225,6 +33221,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31240,6 +33238,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -31254,6 +33253,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31271,7 +33271,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31284,7 +33288,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -31326,6 +33330,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -31335,12 +33341,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31356,7 +33367,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -31392,6 +33403,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31407,6 +33420,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -31421,6 +33435,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31438,7 +33453,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31451,7 +33470,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def get_instance_process_thread_slot( @@ -31495,6 +33514,8 @@ def get_instance_process_thread_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_instance_process_thread_slot_request( resource_group_name=resource_group_name, @@ -31504,12 +33525,17 @@ def get_instance_process_thread_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_thread_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31525,7 +33551,7 @@ def get_instance_process_thread_slot( 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}'} # type: ignore + get_instance_process_thread_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -31558,18 +33584,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31584,7 +33617,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -31616,18 +33649,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31642,7 +33682,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -31671,6 +33711,8 @@ def list_metric_definitions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31684,6 +33726,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metric_definitions_slot.metadata['url'], ) request = _convert_request(request) @@ -31696,6 +33739,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31713,7 +33757,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31727,7 +33775,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} # type: ignore + list_metric_definitions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions"} # type: ignore @distributed_trace def list_metrics_slot( @@ -31751,12 +33799,12 @@ def list_metrics_slot( of the production slot. :type slot: str :param details: Specify "true" to include metric details in the response. It is "false" by - default. + default. Default value is None. :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceMetricCollection or the result of @@ -31765,6 +33813,8 @@ def list_metrics_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ResourceMetricCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31778,6 +33828,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=self.list_metrics_slot.metadata['url'], @@ -31792,6 +33843,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, details=details, filter=filter, template_url=next_link, @@ -31811,7 +33863,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31825,7 +33881,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} # type: ignore + list_metrics_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics"} # type: ignore @distributed_trace def get_migrate_my_sql_status_slot( @@ -31858,18 +33914,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31884,7 +33947,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -31917,18 +33980,25 @@ def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31943,7 +34013,7 @@ def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -31985,6 +34055,7 @@ def create_or_update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -31994,6 +34065,7 @@ def create_or_update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_slot.metadata['url'], @@ -32001,7 +34073,11 @@ def create_or_update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32016,11 +34092,11 @@ def create_or_update_swift_virtual_network_connection_slot( 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'} # type: ignore + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network_slot( + def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32049,18 +34125,25 @@ def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32070,7 +34153,7 @@ def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -32112,6 +34195,7 @@ def update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -32121,6 +34205,7 @@ def update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_slot.metadata['url'], @@ -32128,7 +34213,11 @@ def update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32143,7 +34232,7 @@ def update_swift_virtual_network_connection_slot( return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -32179,6 +34268,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -32186,12 +34277,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32207,7 +34303,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -32243,6 +34339,8 @@ def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -32250,12 +34348,17 @@ def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -32274,7 +34377,7 @@ def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -32298,11 +34401,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -32315,12 +34418,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -32329,7 +34435,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32344,7 +34454,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_slot_initial( @@ -32363,12 +34473,15 @@ def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -32377,7 +34490,11 @@ def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -32395,7 +34512,7 @@ def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -32419,11 +34536,11 @@ def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -32438,7 +34555,8 @@ def begin_start_web_site_network_trace_operation_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -32453,6 +34571,7 @@ def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -32476,13 +34595,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace_slot( + def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32510,18 +34628,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -32531,7 +34656,7 @@ def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace @@ -32567,6 +34692,8 @@ def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -32574,12 +34701,17 @@ def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32594,7 +34726,7 @@ def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -32630,6 +34762,8 @@ def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -32637,12 +34771,17 @@ def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -32661,7 +34800,7 @@ def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -32697,6 +34836,8 @@ def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -32704,12 +34845,17 @@ def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32724,11 +34870,11 @@ def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32757,18 +34903,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -32778,7 +34931,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -32802,7 +34955,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -32811,6 +34964,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32824,6 +34979,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -32837,6 +34993,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -32855,7 +35012,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32869,7 +35030,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -32900,18 +35061,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32926,7 +35094,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -32959,18 +35127,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32985,7 +35160,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -33021,6 +35196,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -33028,12 +35205,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33048,7 +35230,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -33087,6 +35269,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -33097,6 +35280,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -33104,7 +35288,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33119,11 +35307,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33155,6 +35343,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -33162,12 +35352,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33177,7 +35372,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -33216,6 +35411,7 @@ def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -33226,6 +35422,7 @@ def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -33233,7 +35430,11 @@ def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33248,7 +35449,7 @@ def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -33282,18 +35483,25 @@ def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33308,7 +35516,7 @@ def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -33345,6 +35553,7 @@ def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -33354,6 +35563,7 @@ def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -33361,7 +35571,11 @@ def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33376,7 +35590,7 @@ def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -33406,6 +35620,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33419,6 +35635,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -33431,6 +35648,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33448,7 +35666,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33461,7 +35683,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -33496,6 +35718,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -33503,12 +35727,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33524,11 +35753,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33562,6 +35791,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -33569,12 +35800,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -33584,7 +35820,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -33620,6 +35856,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -33627,12 +35865,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33648,7 +35891,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -33682,6 +35925,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33696,6 +35941,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -33709,6 +35955,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33726,7 +35973,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33739,7 +35990,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -33777,6 +36028,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -33785,12 +36038,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33806,7 +36064,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -33838,6 +36096,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33852,6 +36112,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -33865,6 +36126,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33882,7 +36144,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33895,7 +36161,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def get_process_thread_slot( @@ -33935,6 +36201,8 @@ def get_process_thread_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_process_thread_slot_request( resource_group_name=resource_group_name, @@ -33943,12 +36211,17 @@ def get_process_thread_slot( thread_id=thread_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_thread_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33964,7 +36237,7 @@ def get_process_thread_slot( return deserialized - get_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}'} # type: ignore + get_process_thread_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}"} # type: ignore @distributed_trace @@ -33993,6 +36266,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34006,6 +36281,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -34018,6 +36294,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34035,7 +36312,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34049,7 +36330,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -34084,6 +36365,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -34091,12 +36374,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34111,7 +36399,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -34151,6 +36439,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -34161,6 +36450,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -34168,7 +36458,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34183,11 +36477,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34219,6 +36513,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -34226,12 +36522,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -34241,7 +36542,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -34279,6 +36580,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -34288,6 +36590,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -34295,7 +36598,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34310,11 +36617,11 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34345,18 +36652,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34366,11 +36680,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34391,10 +36705,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -34407,12 +36722,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -34420,7 +36738,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34430,10 +36752,10 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - def _restore_from_backup_blob_slot_initial( + def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34447,6 +36769,7 @@ def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -34456,6 +36779,7 @@ def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -34463,7 +36787,11 @@ def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -34473,11 +36801,11 @@ def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob_slot( + def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34510,8 +36838,9 @@ def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -34524,6 +36853,7 @@ def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -34545,12 +36875,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_slot_initial( + def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34564,6 +36893,7 @@ def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -34573,6 +36903,7 @@ def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -34580,7 +36911,11 @@ def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -34590,11 +36925,11 @@ def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app_slot( + def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34626,8 +36961,9 @@ def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -34640,6 +36976,7 @@ def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -34661,12 +36998,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_slot_initial( + def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34680,6 +37016,7 @@ def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -34689,6 +37026,7 @@ def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -34696,7 +37034,11 @@ def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -34706,11 +37048,11 @@ def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot_slot( + def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34743,8 +37085,9 @@ def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -34757,6 +37100,7 @@ def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -34778,10 +37122,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -34809,6 +37152,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34822,6 +37167,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -34834,6 +37180,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34851,7 +37198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34864,7 +37215,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -34899,6 +37250,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -34906,12 +37259,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34927,7 +37285,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -34944,6 +37302,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -34951,12 +37311,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -34975,7 +37340,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -35013,7 +37378,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -35026,6 +37392,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -35049,13 +37416,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35087,6 +37453,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -35094,12 +37462,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -35109,7 +37482,7 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -35141,6 +37514,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -35157,6 +37531,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -35172,6 +37547,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -35191,7 +37567,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35205,9 +37585,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35221,6 +37601,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -35230,6 +37611,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -35237,7 +37619,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35247,11 +37633,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35284,8 +37670,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -35298,6 +37685,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -35319,10 +37707,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -35347,6 +37734,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35360,6 +37749,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -35372,6 +37762,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35389,7 +37780,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35403,7 +37798,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -35428,6 +37823,8 @@ def list_snapshots_from_dr_secondary_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35441,6 +37838,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -35453,6 +37851,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35470,7 +37869,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35484,7 +37887,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control_slot( @@ -35516,18 +37919,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -35549,7 +37959,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -35566,6 +37976,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -35575,6 +37986,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -35582,7 +37994,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -35603,7 +38019,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -35641,8 +38057,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -35655,6 +38072,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -35679,13 +38097,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35714,18 +38131,25 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -35735,7 +38159,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -35771,6 +38195,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -35780,6 +38205,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -35787,7 +38213,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -35809,11 +38239,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35842,18 +38272,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35863,7 +38300,7 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore def _start_network_trace_slot_initial( @@ -35882,12 +38319,15 @@ def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -35896,7 +38336,11 @@ def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35914,7 +38358,7 @@ def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace @@ -35938,11 +38382,11 @@ def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -35957,7 +38401,8 @@ def begin_start_network_trace_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -35972,6 +38417,7 @@ def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -35995,13 +38441,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36030,18 +38475,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36051,11 +38503,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def stop_network_trace_slot( + def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36083,18 +38535,25 @@ def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -36104,11 +38563,11 @@ def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36136,18 +38595,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36157,11 +38623,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36189,18 +38655,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -36210,7 +38683,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -36239,6 +38712,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36252,6 +38727,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -36264,6 +38740,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36281,7 +38758,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36295,7 +38776,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -36330,6 +38811,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -36337,12 +38820,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36358,11 +38846,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36394,6 +38882,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -36401,12 +38891,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -36416,7 +38911,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -36448,6 +38943,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36462,6 +38959,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -36475,6 +38973,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36492,7 +38991,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36505,7 +39008,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -36543,6 +39046,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -36551,12 +39056,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36572,11 +39082,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36608,6 +39118,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -36615,12 +39127,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36630,7 +39147,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -36656,7 +39173,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -36665,6 +39182,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36678,6 +39197,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -36691,6 +39211,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -36709,7 +39230,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36723,7 +39248,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -36755,18 +39280,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36781,7 +39313,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -36817,6 +39349,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -36824,12 +39358,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36844,7 +39383,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -36885,6 +39424,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -36895,6 +39435,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -36902,7 +39443,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36917,11 +39462,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36953,6 +39498,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -36960,12 +39507,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36975,7 +39527,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -37016,6 +39568,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -37026,6 +39579,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -37033,7 +39587,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37048,7 +39606,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -37087,6 +39645,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -37095,12 +39655,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37116,7 +39681,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -37158,6 +39723,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -37169,6 +39735,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -37176,7 +39743,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37191,7 +39762,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -37233,6 +39804,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -37244,6 +39816,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -37251,7 +39824,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37266,7 +39843,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -37293,6 +39870,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37306,6 +39885,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -37318,6 +39898,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37335,7 +39916,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37349,7 +39934,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -37384,6 +39969,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -37391,12 +39978,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37411,7 +40003,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -37439,6 +40031,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -37454,6 +40047,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -37468,6 +40062,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -37487,7 +40082,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37501,9 +40100,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37516,6 +40115,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -37524,6 +40124,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -37531,7 +40132,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37541,11 +40146,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37574,8 +40179,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -37587,6 +40193,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37608,10 +40215,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -37633,6 +40239,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37645,6 +40253,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -37656,6 +40265,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37673,7 +40283,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37687,7 +40301,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -37709,6 +40323,8 @@ def list_snapshots_from_dr_secondary( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37721,6 +40337,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -37732,6 +40349,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37749,7 +40367,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37763,7 +40385,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control( @@ -37791,17 +40413,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37823,7 +40452,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -37839,6 +40468,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -37847,6 +40477,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -37854,7 +40485,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37875,7 +40510,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -37909,8 +40544,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2018_02_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -37922,6 +40558,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37946,13 +40583,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37977,17 +40613,24 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -37997,7 +40640,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -38029,6 +40672,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -38037,6 +40681,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -38044,7 +40689,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38066,11 +40715,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38095,17 +40744,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38115,7 +40771,7 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore def _start_network_trace_initial( @@ -38133,11 +40789,14 @@ def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -38146,7 +40805,11 @@ def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38164,7 +40827,7 @@ def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace @@ -38185,11 +40848,11 @@ def begin_start_network_trace( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -38204,7 +40867,8 @@ def begin_start_network_trace( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2018_02_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -38218,6 +40882,7 @@ def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -38241,13 +40906,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38272,17 +40936,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38292,11 +40963,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def stop_network_trace( + def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38321,17 +40992,24 @@ def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -38341,11 +41019,11 @@ def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38370,17 +41048,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38390,11 +41075,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38419,17 +41104,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -38439,7 +41131,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -38464,6 +41156,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38476,6 +41170,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -38487,6 +41182,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38504,7 +41200,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38518,7 +41218,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -38549,18 +41249,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38576,11 +41283,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38608,18 +41315,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -38629,7 +41343,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -38657,6 +41371,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38670,6 +41386,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -38682,6 +41399,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38699,7 +41417,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38712,7 +41434,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -38746,6 +41468,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -38753,12 +41477,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38774,11 +41503,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38806,18 +41535,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38827,7 +41563,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -38849,7 +41585,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -38858,6 +41594,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38870,6 +41608,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -38882,6 +41621,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -38900,7 +41640,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38914,7 +41658,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -38942,17 +41686,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38967,7 +41718,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -38999,18 +41750,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39025,7 +41783,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -39062,6 +41820,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -39071,6 +41830,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -39078,7 +41838,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39093,11 +41857,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39125,18 +41889,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39146,7 +41917,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -39183,6 +41954,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -39192,6 +41964,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -39199,7 +41972,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39214,7 +41991,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -39249,6 +42026,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -39256,12 +42035,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39277,7 +42061,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -39315,6 +42099,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -39325,6 +42110,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -39332,7 +42118,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39347,7 +42137,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -39385,6 +42175,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -39395,6 +42186,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -39402,7 +42194,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39417,7 +42213,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -39440,6 +42236,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39452,6 +42250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -39463,6 +42262,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39480,7 +42280,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39494,7 +42298,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -39525,18 +42329,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39551,5 +42362,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_site_management_client_operations.py index 50b211ff4f8a..ee12696df01f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_02_01/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,34 @@ def build_list_billing_meters_request( os_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') if os_type is not None: - query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,33 +231,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,29 +268,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -300,37 +305,38 @@ def build_list_geo_regions_request( linux_dynamic_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: - query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + _query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') if linux_dynamic_workers_enabled is not None: - query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -342,33 +348,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -379,29 +385,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -410,29 +417,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-02-01" + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -444,33 +452,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,32 +493,32 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -525,34 +533,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -567,34 +575,34 @@ def build_validate_container_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validateContainerSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validateContainerSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -609,32 +617,32 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-02-01" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -662,14 +670,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -684,7 +699,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -710,11 +725,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -722,7 +739,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -737,7 +758,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -756,6 +777,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -765,6 +788,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -773,6 +797,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -790,7 +815,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -804,7 +833,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -829,15 +858,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -852,7 +888,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -881,12 +917,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -894,7 +932,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -909,7 +951,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -923,9 +965,9 @@ def list_billing_meters( Gets a list of meters for a given location. - :param billing_location: Azure Location of billable resource. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -933,6 +975,8 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -943,6 +987,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -954,6 +999,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -973,7 +1019,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -987,7 +1037,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace def check_name_availability( @@ -1005,7 +1055,7 @@ def check_name_availability( :type name: str :param type: Resource type used for verification. :type type: str or ~azure.mgmt.web.v2018_02_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -1018,6 +1068,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -1025,6 +1076,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -1032,7 +1084,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1047,7 +1103,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -1070,15 +1126,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1093,7 +1156,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -1109,22 +1172,24 @@ def list_geo_regions( Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2018_02_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1135,6 +1200,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1148,6 +1214,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1169,7 +1236,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1183,7 +1254,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1203,6 +1274,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1216,6 +1288,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1228,6 +1301,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1247,7 +1321,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1261,7 +1339,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1279,6 +1357,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_02_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1289,6 +1369,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1298,6 +1379,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1315,7 +1397,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1329,7 +1415,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1351,15 +1437,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1374,7 +1467,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1402,12 +1495,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1415,7 +1510,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1430,11 +1529,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1459,6 +1558,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1466,6 +1566,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1473,7 +1574,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1483,7 +1588,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1512,6 +1617,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1519,6 +1625,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1526,7 +1633,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1541,7 +1652,7 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace @@ -1571,6 +1682,7 @@ def validate_container_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_container_settings_request, 'ValidateContainerSettingsRequest') @@ -1578,6 +1690,7 @@ def validate_container_settings( request = build_validate_container_settings_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_container_settings.metadata['url'], @@ -1585,7 +1698,11 @@ def validate_container_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1600,11 +1717,11 @@ def validate_container_settings( return deserialized - validate_container_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validateContainerSettings'} # type: ignore + validate_container_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validateContainerSettings"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1629,6 +1746,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-02-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1636,6 +1754,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1643,7 +1762,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1653,5 +1776,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_configuration.py index 033fa7052f91..2c7438a90c0a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2018-11-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2018-11-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_metadata.json index 5b44a6690499..0ea1626173b9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_web_site_management_client.py index 8ae9bc017525..1bb8781282a8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -31,8 +32,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2018-11-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -54,7 +58,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_configuration.py index 3d235cbc1831..8e242271c43d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2018-11-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2018-11-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_web_site_management_client.py index eb5fa08047ce..8a9157e6dd51 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -31,8 +32,11 @@ class WebSiteManagementClient: :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2018-11-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/operations/_certificates_operations.py index d2286fcd0d93..3267362b46a0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_11_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -133,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2018_11_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -213,17 +228,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +260,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -270,6 +292,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -278,6 +301,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -285,7 +309,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,11 +328,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -329,17 +357,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -349,7 +384,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -381,6 +416,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -389,6 +425,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -396,7 +433,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -411,5 +452,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/operations/_certificates_operations.py index 1079f70847f4..0650addaa50f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2018_11_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-11-01" + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-11-01" + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-11-01" + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -135,35 +138,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-11-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-11-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,25 +179,26 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2018-11-01" + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, + url=_url, + params=_query_parameters, **kwargs ) @@ -208,35 +212,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2018-11-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2018-11-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -279,6 +283,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_11_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -289,6 +295,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -298,6 +305,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -315,7 +323,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -329,7 +341,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -349,6 +361,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2018_11_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +374,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -370,6 +385,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -387,7 +403,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -401,7 +421,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -429,17 +449,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -454,7 +481,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -486,6 +513,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -494,6 +522,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -501,7 +530,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -516,11 +549,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -545,17 +578,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -565,7 +605,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -597,6 +637,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2018-11-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -605,6 +646,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -612,7 +654,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -627,5 +673,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_configuration.py index 370702b85858..e91230b2659b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2019-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-08-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_metadata.json index d6f224bccc5e..b4bfed78983f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -120,192 +120,192 @@ "get_publishing_user" : { "sync": { "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_publishing_user(\n self,\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "update_publishing_user" : { "sync": { "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2019_08_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2019_08_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2019_08_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2019_08_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "user_details" }, "list_source_controls" : { "sync": { "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.SourceControlCollection\"]\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_source_controls(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_source_control" : { "sync": { "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type" }, "update_source_control" : { "sync": { "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type, request_message" }, "list_billing_meters" : { "sync": { "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.BillingMeterCollection\"]\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "billing_location, os_type" }, "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, "get_subscription_deployment_locations" : { "sync": { "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.DeploymentLocations\"\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs: Any\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" }, "list_site_identifiers_assigned_to_host_name" : { "sync": { "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.IdentifierCollection\"]\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name_identifier" }, "list_premier_add_on_offers" : { "sync": { "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.PremierAddOnOfferCollection\"]\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_premier_add_on_offers(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_skus" : { "sync": { "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SkuInfos\"\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def list_skus(\n self,\n **kwargs: Any\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "verify_hosting_environment_vnet" : { "sync": { "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.VnetValidationFailureDetails\"\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs: Any\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2019_08_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "parameters" }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" }, "validate" : { "sync": { "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ValidateResponse\"\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2019_08_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2019_08_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs: Any\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2019_08_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2019_08_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2019_08_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, validate_request" }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2019_08_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" } diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_web_site_management_client.py index 8e93e5ffbf5f..0a758526ad6a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -64,8 +65,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2019-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -103,7 +107,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_configuration.py index 493e5218c88a..d7fc99bbbd87 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2019-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-08-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_web_site_management_client.py index e20919c076b3..927dc0ea864c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -64,8 +65,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2019-08-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_certificate_orders_operations.py index 95b2ae7aa1eb..f17e95807147 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,17 +121,17 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -140,12 +147,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -153,7 +162,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -164,7 +177,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -175,7 +188,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -186,6 +199,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -197,6 +212,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -207,6 +223,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -224,7 +241,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +259,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -249,7 +270,7 @@ async def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -266,17 +287,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -291,7 +319,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -307,6 +335,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -315,6 +344,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -322,7 +352,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -340,7 +374,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -353,7 +387,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -376,8 +410,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -389,6 +424,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -413,13 +449,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -427,7 +462,7 @@ async def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -444,17 +479,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -465,7 +507,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -478,7 +520,7 @@ async def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -498,6 +540,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -506,6 +549,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -513,7 +557,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -532,7 +580,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -544,7 +592,7 @@ def list_certificates( ) -> AsyncIterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -557,6 +605,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +619,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -580,6 +631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -597,7 +649,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -611,7 +667,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -623,7 +679,7 @@ async def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -642,18 +698,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -668,7 +731,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -685,6 +748,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -694,6 +758,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -701,7 +766,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -719,7 +788,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -733,7 +802,7 @@ async def begin_create_or_update_certificate( ) -> AsyncLROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -757,8 +826,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -771,6 +841,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -795,13 +866,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -810,7 +880,7 @@ async def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -829,18 +899,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -851,7 +928,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -865,7 +942,7 @@ async def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -887,6 +964,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -896,6 +974,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -903,7 +982,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -922,11 +1005,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -935,7 +1018,7 @@ async def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -955,6 +1038,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -963,6 +1047,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -970,7 +1055,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -981,11 +1070,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -994,7 +1083,7 @@ async def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1014,6 +1103,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1022,6 +1112,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1029,7 +1120,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1040,11 +1135,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1052,7 +1147,7 @@ async def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1069,17 +1164,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1090,11 +1192,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1103,7 +1205,7 @@ async def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1122,6 +1224,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1130,6 +1233,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1137,7 +1241,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1148,7 +1256,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1161,7 +1269,7 @@ async def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1180,6 +1288,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1188,6 +1297,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1195,7 +1305,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,11 +1324,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1222,7 +1336,7 @@ async def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1239,17 +1353,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1260,7 +1381,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1272,7 +1393,7 @@ async def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -1289,17 +1410,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1442,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1326,7 +1454,7 @@ async def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -1343,17 +1471,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,5 +1503,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_environments_operations.py index 54053eed59df..9f52c9b1eeeb 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -292,7 +320,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -305,7 +333,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -328,8 +356,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -341,6 +370,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -365,12 +395,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,18 +412,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -404,11 +440,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -417,7 +453,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -438,7 +474,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -450,6 +487,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -470,10 +508,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -485,7 +522,7 @@ async def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -505,6 +542,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -513,6 +551,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -520,7 +559,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -542,7 +585,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -554,7 +597,7 @@ def list_capacities( ) -> AsyncIterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -567,6 +610,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -579,6 +624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -590,6 +636,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -607,7 +654,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +672,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def get_vip_info( @@ -632,7 +683,7 @@ async def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -649,17 +700,24 @@ async def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +732,7 @@ async def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore async def _change_vnet_initial( @@ -690,6 +748,7 @@ async def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -698,6 +757,7 @@ async def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -705,7 +765,11 @@ async def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -723,7 +787,7 @@ async def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -736,7 +800,7 @@ async def begin_change_vnet( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -759,6 +823,7 @@ async def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -774,6 +839,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -788,6 +854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -807,7 +874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -818,7 +889,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -830,6 +901,7 @@ async def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -840,8 +912,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -857,10 +928,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -872,7 +942,7 @@ async def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -889,17 +959,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +991,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -927,7 +1004,7 @@ async def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -946,18 +1023,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -972,7 +1056,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -984,8 +1068,7 @@ def get_inbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -998,6 +1081,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1010,6 +1095,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1021,6 +1107,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1038,7 +1125,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1052,7 +1143,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -1063,7 +1154,7 @@ def list_multi_role_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -1076,6 +1167,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1088,6 +1181,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -1099,6 +1193,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1116,7 +1211,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1130,7 +1229,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1141,7 +1240,7 @@ async def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -1158,17 +1257,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1183,7 +1289,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1199,6 +1305,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1207,6 +1314,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1214,7 +1322,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1344,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1245,7 +1357,7 @@ async def begin_create_or_update_multi_role_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -1267,8 +1379,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1280,6 +1393,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1304,10 +1418,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1319,7 +1432,7 @@ async def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -1338,6 +1451,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1346,6 +1460,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1353,7 +1468,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1372,7 +1491,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1386,8 +1505,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -1402,6 +1521,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1415,6 +1536,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1427,6 +1549,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1444,7 +1567,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1458,7 +1585,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1469,7 +1596,7 @@ def list_multi_role_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -1482,6 +1609,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1494,6 +1623,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1505,6 +1635,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1522,7 +1653,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1671,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1547,7 +1682,7 @@ def list_multi_role_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -1559,6 +1694,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1571,6 +1708,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1582,6 +1720,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1599,7 +1738,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,7 +1756,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1624,7 +1767,7 @@ def list_multi_role_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -1636,6 +1779,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1648,6 +1793,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1805,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1823,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1841,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -1701,7 +1852,7 @@ async def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -1718,17 +1869,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1743,7 +1901,7 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -1755,8 +1913,7 @@ def get_outbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -1769,6 +1926,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1781,6 +1940,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1792,6 +1952,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1809,7 +1970,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1823,10 +1988,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1834,7 +1999,7 @@ async def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -1851,17 +2016,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1872,7 +2044,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -1887,17 +2059,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1915,7 +2094,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -1927,7 +2106,7 @@ async def begin_resume( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -1948,6 +2127,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1960,6 +2141,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -1971,6 +2153,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1988,7 +2171,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1999,7 +2186,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2010,6 +2197,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2019,8 +2207,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2036,10 +2223,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2051,7 +2237,7 @@ def list_app_service_plans( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -2064,6 +2250,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2076,6 +2264,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2087,6 +2276,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2104,7 +2294,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2118,7 +2312,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2130,13 +2324,14 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2144,6 +2339,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2156,6 +2353,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2168,6 +2366,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2186,7 +2385,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2200,7 +2403,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2214,17 +2417,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2242,7 +2452,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2254,7 +2464,7 @@ async def begin_suspend( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -2275,6 +2485,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2287,6 +2499,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2298,6 +2511,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2315,7 +2529,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2326,7 +2544,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2337,6 +2555,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2346,8 +2565,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2363,10 +2581,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2379,7 +2596,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -2388,7 +2605,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2397,6 +2614,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2409,6 +2628,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2421,6 +2641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2439,7 +2660,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2453,7 +2678,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -2464,7 +2689,7 @@ def list_worker_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -2477,6 +2702,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2489,6 +2716,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -2500,6 +2728,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2517,7 +2746,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2531,7 +2764,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -2543,7 +2776,7 @@ async def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -2562,18 +2795,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2588,7 +2828,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -2605,6 +2845,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2614,6 +2855,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -2621,7 +2863,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2639,7 +2885,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -2653,7 +2899,7 @@ async def begin_create_or_update_worker_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -2677,8 +2923,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2691,6 +2938,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2715,10 +2963,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -2731,7 +2978,7 @@ async def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -2752,6 +2999,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2761,6 +3009,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -2768,7 +3017,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2787,7 +3040,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -2801,8 +3054,7 @@ def list_worker_pool_instance_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -2819,6 +3071,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2833,6 +3087,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2846,6 +3101,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2863,7 +3119,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2877,7 +3137,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -2889,7 +3149,7 @@ def list_web_worker_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -2904,6 +3164,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2917,6 +3179,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2929,6 +3192,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2946,7 +3210,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2960,7 +3228,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -2972,7 +3240,7 @@ def list_worker_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -2986,6 +3254,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2999,6 +3269,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3011,6 +3282,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3028,7 +3300,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3042,7 +3318,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3054,7 +3330,7 @@ def list_web_worker_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -3068,6 +3344,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3081,6 +3359,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3093,6 +3372,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3110,7 +3390,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3124,4 +3408,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_plans_operations.py index 7f70d9dd5a68..c42b467adaf2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -131,7 +138,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -142,6 +149,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -153,6 +162,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -163,6 +173,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -180,7 +191,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +209,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -205,7 +220,7 @@ async def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -222,17 +237,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -249,7 +271,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -265,6 +287,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -273,6 +296,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -280,7 +304,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -298,7 +326,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -311,7 +339,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -332,8 +360,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -345,6 +374,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -369,13 +399,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,7 +412,7 @@ async def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -400,17 +429,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -421,7 +457,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -434,7 +470,7 @@ async def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -453,6 +489,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -461,6 +498,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -468,7 +506,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -487,7 +529,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -499,7 +541,7 @@ async def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -516,17 +558,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -541,7 +590,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -555,7 +604,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -576,6 +625,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -583,12 +634,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -603,11 +659,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -617,7 +673,7 @@ async def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -638,6 +694,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -645,12 +703,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -661,7 +724,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -675,7 +738,7 @@ async def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -696,6 +759,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -703,12 +768,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -723,7 +793,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -737,7 +807,7 @@ def list_web_apps_by_hybrid_connection( ) -> AsyncIterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -753,6 +823,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -767,6 +839,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -780,6 +853,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -797,7 +871,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -811,7 +889,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -822,7 +900,7 @@ async def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -839,17 +917,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,7 +949,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -876,7 +961,7 @@ def list_hybrid_connections( ) -> AsyncIterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -889,6 +974,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -901,6 +988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -912,6 +1000,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -929,7 +1018,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -943,10 +1036,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -955,7 +1048,7 @@ async def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -976,18 +1069,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -998,7 +1098,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1013,7 +1113,7 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -1021,12 +1121,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1034,6 +1135,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1046,6 +1149,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1060,6 +1164,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1080,7 +1185,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1094,7 +1203,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1105,7 +1214,7 @@ async def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -1122,17 +1231,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1147,7 +1263,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1160,14 +1276,15 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1176,6 +1293,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1188,6 +1307,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1200,6 +1320,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1218,7 +1339,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1232,7 +1357,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1243,7 +1368,7 @@ async def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -1260,17 +1385,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1285,7 +1417,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1298,7 +1430,7 @@ async def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -1317,18 +1449,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1345,7 +1484,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1359,7 +1498,7 @@ async def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -1380,6 +1519,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1387,12 +1528,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1407,7 +1553,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1422,7 +1568,7 @@ async def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -1445,6 +1591,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1455,6 +1602,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1462,7 +1610,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1477,7 +1629,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1490,8 +1642,7 @@ async def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -1510,18 +1661,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1694,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1550,7 +1708,7 @@ async def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -1571,6 +1729,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1578,12 +1738,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1600,7 +1765,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1615,7 +1780,7 @@ async def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1638,6 +1803,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1648,6 +1814,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1655,7 +1822,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1672,11 +1843,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1686,7 +1857,7 @@ async def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -1707,6 +1878,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1714,12 +1887,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1730,7 +1908,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1745,7 +1923,7 @@ async def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1768,6 +1946,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1778,6 +1957,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1785,7 +1965,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1802,11 +1986,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1815,7 +1999,7 @@ async def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -1834,18 +2018,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1856,5 +2047,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificate_registration_provider_operations.py index f86feeddecc5..caedaba331b2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificates_operations.py index 39e7c876864f..e049deb5bc91 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,7 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -133,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -196,7 +211,7 @@ async def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -213,17 +228,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +260,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -251,7 +273,7 @@ async def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -270,6 +292,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -278,6 +301,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -285,7 +309,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,11 +328,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -312,7 +340,7 @@ async def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -329,17 +357,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -350,7 +385,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -363,7 +398,7 @@ async def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -382,6 +417,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -390,6 +426,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -397,7 +434,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -412,5 +453,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_deleted_web_apps_operations.py index 051e2880d356..4423fdf20923 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -122,7 +129,7 @@ def list_by_location( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -133,6 +140,8 @@ def list_by_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace_async async def get_deleted_web_app_by_location( @@ -196,7 +211,7 @@ async def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -213,17 +228,24 @@ async def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,5 +260,5 @@ async def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_diagnostics_operations.py index 0f3d2d287ef0..8ccf6bab80a3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list_hosting_environment_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -138,7 +145,7 @@ async def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -146,11 +153,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -163,12 +170,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -177,7 +187,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +206,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -204,7 +218,7 @@ def list_site_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -217,6 +231,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -229,6 +245,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -240,6 +257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,7 +293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -286,7 +308,7 @@ async def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -294,11 +316,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -311,12 +333,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -325,7 +350,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,7 +369,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -352,7 +381,7 @@ def list_site_diagnostic_categories( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -365,6 +394,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -377,6 +408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -388,6 +420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -405,7 +438,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -419,7 +456,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -431,7 +468,7 @@ async def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -450,18 +487,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -476,7 +520,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -489,7 +533,7 @@ def list_site_analyses( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -504,6 +548,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -517,6 +563,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -529,6 +576,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -546,7 +594,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -560,7 +612,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -573,7 +625,7 @@ async def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -594,6 +646,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -601,12 +655,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +680,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -638,7 +697,7 @@ async def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -648,11 +707,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -665,6 +724,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -672,6 +733,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -680,7 +742,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -695,7 +761,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -708,7 +774,7 @@ def list_site_detectors( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -723,6 +789,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +804,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -748,6 +817,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -765,7 +835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -779,7 +853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector( @@ -792,7 +866,7 @@ async def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -813,6 +887,8 @@ async def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -820,12 +896,17 @@ async def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -840,7 +921,7 @@ async def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -857,7 +938,7 @@ async def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -867,11 +948,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -884,6 +965,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -891,6 +974,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -899,7 +983,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +1002,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -927,7 +1015,7 @@ def list_site_detector_responses_slot( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -942,6 +1030,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -955,6 +1045,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -967,6 +1058,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -984,7 +1076,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -998,7 +1094,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1014,7 +1110,7 @@ async def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1024,11 +1120,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1041,6 +1137,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1048,6 +1146,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1056,7 +1155,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1071,7 +1174,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1084,7 +1187,7 @@ def list_site_diagnostic_categories_slot( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1099,6 +1202,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1112,6 +1217,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1124,6 +1230,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1141,7 +1248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1155,7 +1266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1168,7 +1279,7 @@ async def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1189,6 +1300,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1196,12 +1309,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1216,7 +1334,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1230,7 +1348,7 @@ def list_site_analyses_slot( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1247,6 +1365,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1261,6 +1381,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1274,6 +1395,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1291,7 +1413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1305,7 +1431,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1319,7 +1445,7 @@ async def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1342,6 +1468,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1350,12 +1478,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1370,7 +1503,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1388,7 +1521,7 @@ async def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1400,11 +1533,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1417,6 +1550,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1425,6 +1560,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1433,7 +1569,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1448,7 +1588,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1462,7 +1602,7 @@ def list_site_detectors_slot( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1479,6 +1619,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1493,6 +1635,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1506,6 +1649,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1523,7 +1667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1537,7 +1685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_slot( @@ -1551,7 +1699,7 @@ async def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1574,6 +1722,8 @@ async def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1582,12 +1732,17 @@ async def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1602,7 +1757,7 @@ async def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -1620,7 +1775,7 @@ async def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1632,11 +1787,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1649,6 +1804,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1657,6 +1814,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1665,7 +1823,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1680,5 +1842,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domain_registration_provider_operations.py index 94852e8ea2e0..e8a4994e1991 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domains_operations.py index e05822743bd3..c7370ca6e17a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ async def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -99,7 +104,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -109,7 +114,7 @@ def list( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) @@ -117,6 +122,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -127,6 +134,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -136,6 +144,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -153,7 +162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -167,7 +180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -176,7 +189,7 @@ async def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -189,15 +202,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +232,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -223,7 +243,7 @@ def list_recommendations( ) -> AsyncIterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2019_08_01.models.DomainRecommendationSearchParameters @@ -234,6 +254,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -247,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -259,6 +281,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -278,7 +301,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -292,7 +319,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -302,7 +329,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -312,6 +339,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -323,6 +352,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -333,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -350,7 +381,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -364,7 +399,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -375,7 +410,7 @@ async def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -392,17 +427,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +459,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -433,6 +475,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -441,6 +484,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -448,7 +492,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -466,7 +514,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -479,7 +527,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -500,8 +548,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -513,6 +562,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -537,13 +587,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -552,7 +601,7 @@ async def delete( ) -> None: """Delete a domain. - Description for 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 @@ -572,18 +621,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -594,7 +650,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -607,7 +663,7 @@ async def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -626,6 +682,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -634,6 +691,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -641,7 +699,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -660,7 +722,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -672,7 +734,7 @@ def list_ownership_identifiers( ) -> AsyncIterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -685,6 +747,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -697,6 +761,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -708,6 +773,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -725,7 +791,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -739,7 +809,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -751,7 +821,7 @@ async def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -770,18 +840,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -796,7 +873,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -811,8 +888,8 @@ async def create_or_update_ownership_identifier( """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. + 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 @@ -833,6 +910,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -842,6 +920,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -849,7 +928,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,11 +947,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -877,7 +960,7 @@ async def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -896,18 +979,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -918,7 +1008,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -933,8 +1023,8 @@ async def update_ownership_identifier( """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. + 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 @@ -955,6 +1045,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -964,6 +1055,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -971,7 +1063,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -986,11 +1082,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -998,7 +1094,7 @@ async def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1015,17 +1111,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1036,5 +1139,5 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_provider_operations.py index 5a01d4608739..39fdafc16f54 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,9 +52,9 @@ def get_available_stacks( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2019_08_01.models.Enum4 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -115,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -125,8 +131,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -135,6 +141,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +152,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -152,6 +161,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -169,7 +179,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -183,7 +197,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -193,9 +207,9 @@ def get_available_stacks_on_prem( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2019_08_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -204,6 +218,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -214,6 +230,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -224,6 +241,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -242,7 +260,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -256,4 +278,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_recommendations_operations.py index 4046db45bfcb..5a89d7d44318 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,14 +54,14 @@ def list( ) -> AsyncIterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -125,16 +132,16 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -147,15 +154,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -166,19 +180,18 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -193,16 +206,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -213,7 +233,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -227,7 +247,7 @@ def list_history_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -238,7 +258,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -247,6 +267,8 @@ def list_history_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -259,6 +281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -272,6 +295,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -291,7 +315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -305,7 +333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -318,7 +346,7 @@ def list_recommended_rules_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -328,7 +356,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -337,6 +365,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -349,6 +379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -362,6 +393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -381,7 +413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,10 +431,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_hosting_environment( + async def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -407,7 +443,7 @@ async def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -426,18 +462,25 @@ async def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -448,11 +491,11 @@ async def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_hosting_environment( + async def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -461,7 +504,7 @@ async def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -480,18 +523,25 @@ async def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -502,7 +552,7 @@ async def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -517,7 +567,7 @@ async def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -526,10 +576,10 @@ async def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -542,12 +592,15 @@ async def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -555,7 +608,11 @@ async def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -570,11 +627,11 @@ async def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_hosting_environment( + async def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -584,7 +641,7 @@ async def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -605,19 +662,26 @@ async def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -628,7 +692,7 @@ async def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -642,7 +706,7 @@ def list_history_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -653,7 +717,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -662,6 +726,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -674,6 +740,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -687,6 +754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -706,7 +774,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -720,7 +792,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -733,7 +805,7 @@ def list_recommended_rules_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -743,7 +815,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -752,6 +824,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -764,6 +838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -777,6 +852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -796,7 +872,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -810,10 +890,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -821,7 +901,7 @@ async def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -838,17 +918,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -859,11 +946,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -871,7 +958,7 @@ async def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -888,17 +975,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -909,7 +1003,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -924,7 +1018,7 @@ async def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -933,10 +1027,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -949,12 +1043,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -962,7 +1059,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,11 +1078,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -990,7 +1091,7 @@ async def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1009,18 +1110,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,5 +1139,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_resource_health_metadata_operations.py index ebe913a6bdcd..a4cc413a7b8f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,8 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -134,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -155,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -197,8 +211,7 @@ def list_by_site( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -211,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -223,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -234,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -251,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -265,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -276,7 +297,7 @@ async def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -293,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -318,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -331,8 +359,7 @@ def list_by_site_slot( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -347,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -372,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -389,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -403,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -415,7 +450,7 @@ async def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -434,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_static_sites_operations.py index bfda23e27bac..05aab35f125a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -24,7 +23,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class StaticSitesOperations: +class StaticSitesOperations: # pylint: disable=too-many-public-methods """StaticSitesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -122,7 +129,7 @@ def get_static_sites_by_resource_group( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -133,6 +140,8 @@ def get_static_sites_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace_async async def get_static_site( @@ -196,7 +211,7 @@ async def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -213,17 +228,24 @@ async def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +260,7 @@ async def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -251,8 +273,7 @@ async def create_or_update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -271,6 +292,7 @@ async def create_or_update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -279,6 +301,7 @@ async def create_or_update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site.metadata['url'], @@ -286,7 +309,11 @@ async def create_or_update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -305,11 +332,11 @@ async def create_or_update_static_site( return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async - async def delete_static_site( + async def delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -317,7 +344,7 @@ async def delete_static_site( ) -> None: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -334,17 +361,24 @@ async def delete_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -355,7 +389,7 @@ async def delete_static_site( if cls: return cls(pipeline_response, None, {}) - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -368,8 +402,7 @@ async def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -388,6 +421,7 @@ async def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -396,6 +430,7 @@ async def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -403,7 +438,11 @@ async def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -422,7 +461,7 @@ async def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -435,7 +474,7 @@ def list_static_site_users( ) -> AsyncIterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -450,6 +489,8 @@ def list_static_site_users( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -463,6 +504,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -475,6 +517,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -492,7 +535,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -506,10 +553,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace_async - async def delete_static_site_user( + async def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -519,7 +566,7 @@ async def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -540,6 +587,8 @@ async def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -547,12 +596,17 @@ async def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -563,7 +617,7 @@ async def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace_async @@ -578,7 +632,7 @@ async def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -602,6 +656,7 @@ async def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -612,6 +667,7 @@ async def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -619,7 +675,11 @@ async def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -634,7 +694,7 @@ async def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -646,7 +706,7 @@ def get_static_site_builds( ) -> AsyncIterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -659,6 +719,8 @@ def get_static_site_builds( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -671,6 +733,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -682,6 +745,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -699,7 +763,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -713,7 +781,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace_async async def get_static_site_build( @@ -725,7 +793,7 @@ async def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -744,18 +812,25 @@ async def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -770,11 +845,11 @@ async def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace_async - async def delete_static_site_build( + async def delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -783,7 +858,7 @@ async def delete_static_site_build( ) -> None: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -802,18 +877,25 @@ async def delete_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -824,7 +906,7 @@ async def delete_static_site_build( if cls: return cls(pipeline_response, None, {}) - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace_async @@ -838,7 +920,7 @@ async def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -859,6 +941,7 @@ async def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -868,6 +951,7 @@ async def create_or_update_static_site_build_function_app_settings( name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -875,7 +959,11 @@ async def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -894,7 +982,7 @@ async def create_or_update_static_site_build_function_app_settings( 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'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings"} # type: ignore @distributed_trace @@ -907,7 +995,7 @@ def list_static_site_build_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -922,6 +1010,8 @@ def list_static_site_build_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -935,6 +1025,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -947,6 +1038,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -964,7 +1056,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -978,7 +1074,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions"} # type: ignore @distributed_trace_async async def list_static_site_build_function_app_settings( @@ -990,7 +1086,7 @@ async def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -1009,18 +1105,25 @@ async def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1039,7 +1142,7 @@ async def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -1052,7 +1155,7 @@ async def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -1071,6 +1174,7 @@ async def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1079,6 +1183,7 @@ async def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -1086,7 +1191,11 @@ async def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1105,7 +1214,7 @@ async def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace_async @@ -1118,7 +1227,7 @@ async def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -1138,6 +1247,7 @@ async def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -1146,6 +1256,7 @@ async def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -1153,7 +1264,11 @@ async def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1168,7 +1283,7 @@ async def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -1180,7 +1295,7 @@ def list_static_site_custom_domains( ) -> AsyncIterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -1193,6 +1308,8 @@ def list_static_site_custom_domains( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1205,6 +1322,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -1216,6 +1334,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1233,7 +1352,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1247,7 +1370,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace_async async def create_or_update_static_site_custom_domain( @@ -1259,8 +1382,7 @@ async def create_or_update_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -1279,18 +1401,25 @@ async def create_or_update_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_create_or_update_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.create_or_update_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1309,11 +1438,11 @@ async def create_or_update_static_site_custom_domain( return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def delete_static_site_custom_domain( + async def delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1322,7 +1451,7 @@ async def delete_static_site_custom_domain( ) -> None: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1341,18 +1470,25 @@ async def delete_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1363,11 +1499,11 @@ async def delete_static_site_custom_domain( if cls: return cls(pipeline_response, None, {}) - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def validate_custom_domain_can_be_added_to_static_site( + async def validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1376,7 +1512,7 @@ async def validate_custom_domain_can_be_added_to_static_site( ) -> None: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -1395,18 +1531,25 @@ async def validate_custom_domain_can_be_added_to_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_validate_custom_domain_can_be_added_to_static_site_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.validate_custom_domain_can_be_added_to_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1417,11 +1560,11 @@ async def validate_custom_domain_can_be_added_to_static_site( if cls: return cls(pipeline_response, None, {}) - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace_async - async def detach_static_site( + async def detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1429,7 +1572,7 @@ async def detach_static_site( ) -> None: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1446,17 +1589,24 @@ async def detach_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_detach_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1467,7 +1617,7 @@ async def detach_static_site( if cls: return cls(pipeline_response, None, {}) - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace @@ -1479,7 +1629,7 @@ def list_static_site_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -1492,6 +1642,8 @@ def list_static_site_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1504,6 +1656,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -1515,6 +1668,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1532,7 +1686,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1546,7 +1704,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace_async async def list_static_site_function_app_settings( @@ -1557,7 +1715,7 @@ async def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -1574,17 +1732,24 @@ async def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1603,7 +1768,7 @@ async def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -1615,7 +1780,7 @@ async def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -1632,17 +1797,24 @@ async def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1657,11 +1829,11 @@ async def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace_async - async def reset_static_site_api_key( + async def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1670,7 +1842,7 @@ async def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -1690,6 +1862,7 @@ async def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -1698,6 +1871,7 @@ async def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -1705,7 +1879,11 @@ async def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1716,5 +1894,5 @@ async def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_top_level_domains_operations.py index c734fd66b0a2..a44155889896 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -122,7 +129,7 @@ async def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -137,16 +144,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -161,7 +175,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -173,7 +187,7 @@ def list_agreements( ) -> AsyncIterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -186,6 +200,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -200,6 +215,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -213,6 +229,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -232,7 +249,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -246,4 +267,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_apps_operations.py index bbd5dc094f3b..9ee197261708 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -137,6 +144,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -148,6 +157,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -159,6 +169,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -246,7 +268,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -262,6 +284,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -270,6 +293,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -277,7 +301,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -295,7 +323,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -309,8 +337,8 @@ async def begin_create_or_update( """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. + 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 @@ -331,8 +359,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -344,6 +373,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -368,13 +398,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -384,16 +413,16 @@ async def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -406,11 +435,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -418,7 +450,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -429,7 +465,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -443,8 +479,8 @@ async def update( """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. + 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 @@ -464,6 +500,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -472,6 +509,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -479,7 +517,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -498,7 +540,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -511,13 +553,13 @@ async def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -530,18 +572,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -556,11 +605,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -569,7 +618,7 @@ async def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -588,6 +637,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -596,6 +646,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -603,7 +654,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -614,7 +669,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -627,7 +682,7 @@ async def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -647,6 +702,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -655,6 +711,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -662,7 +719,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -677,7 +738,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -689,7 +750,7 @@ def list_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -702,6 +763,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -714,6 +777,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -725,6 +789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -742,7 +807,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -756,7 +825,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def get_backup_status( @@ -768,7 +837,7 @@ async def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -787,18 +856,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -813,11 +889,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -826,7 +902,7 @@ async def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -845,18 +921,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -867,7 +950,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -883,9 +966,9 @@ async def list_backup_status_secrets( 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. + 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 @@ -906,6 +989,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -915,6 +999,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -922,7 +1007,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1026,10 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - async def _restore_initial( + async def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -954,6 +1043,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -963,6 +1053,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -970,7 +1061,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -980,11 +1075,11 @@ async def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore( + async def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -994,7 +1089,7 @@ async def begin_restore( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -1016,8 +1111,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1030,6 +1126,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1051,10 +1148,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async async def get_basic_publishing_credentials_policies( @@ -1065,8 +1161,7 @@ async def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -1083,17 +1178,24 @@ async def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1108,7 +1210,7 @@ async def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async @@ -1120,7 +1222,7 @@ async def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -1137,17 +1239,24 @@ async def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1162,7 +1271,7 @@ async def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1175,7 +1284,7 @@ async def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -1195,6 +1304,7 @@ async def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1203,6 +1313,7 @@ async def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -1210,7 +1321,11 @@ async def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1225,7 +1340,7 @@ async def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1237,7 +1352,7 @@ async def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -1254,17 +1369,24 @@ async def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1279,7 +1401,7 @@ async def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -1292,7 +1414,7 @@ async def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -1312,6 +1434,7 @@ async def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1320,6 +1443,7 @@ async def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -1327,7 +1451,11 @@ async def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1342,7 +1470,7 @@ async def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -1354,7 +1482,7 @@ def list_configurations( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -1367,6 +1495,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1379,6 +1509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1390,6 +1521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1407,7 +1539,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1421,7 +1557,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1433,7 +1569,7 @@ async def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -1452,6 +1588,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1460,6 +1597,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1467,7 +1605,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1482,7 +1624,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1494,7 +1636,7 @@ async def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -1511,17 +1653,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1685,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1549,7 +1698,7 @@ async def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -1568,6 +1717,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1576,6 +1726,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1583,7 +1734,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1598,7 +1753,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1610,7 +1765,7 @@ async def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -1627,17 +1782,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1652,7 +1814,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1665,7 +1827,7 @@ async def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -1685,6 +1847,7 @@ async def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -1693,6 +1856,7 @@ async def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -1700,7 +1864,11 @@ async def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1715,7 +1883,7 @@ async def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -1727,7 +1895,7 @@ async def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -1744,17 +1912,24 @@ async def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1769,7 +1944,7 @@ async def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -1782,7 +1957,7 @@ async def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -1801,6 +1976,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -1809,6 +1985,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -1816,7 +1993,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1831,11 +2012,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1843,7 +2024,7 @@ async def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -1860,17 +2041,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1881,7 +2069,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -1893,7 +2081,7 @@ async def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -1910,17 +2098,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1935,7 +2130,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace_async @@ -1947,7 +2142,7 @@ async def get_app_settings_key_vault_references( ) -> "_models.KeyVaultReferenceCollection": """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -1964,17 +2159,24 @@ async def get_app_settings_key_vault_references( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_app_settings_key_vault_references_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1989,7 +2191,7 @@ async def get_app_settings_key_vault_references( return deserialized - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async @@ -2002,7 +2204,7 @@ async def get_app_setting_key_vault_reference( ) -> "_models.KeyVaultReferenceResource": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2021,18 +2223,25 @@ async def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2047,7 +2256,7 @@ async def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace_async @@ -2060,7 +2269,7 @@ async def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -2079,6 +2288,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -2087,6 +2297,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -2094,7 +2305,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2109,7 +2324,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -2121,7 +2336,7 @@ async def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -2138,17 +2353,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2163,7 +2385,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -2175,7 +2397,7 @@ async def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -2192,17 +2414,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2217,7 +2446,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2230,7 +2459,7 @@ async def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -2250,6 +2479,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -2258,6 +2488,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -2265,7 +2496,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2280,7 +2515,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2293,7 +2528,7 @@ async def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -2312,6 +2547,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -2320,6 +2556,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -2327,7 +2564,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2342,7 +2583,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -2354,7 +2595,7 @@ async def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -2371,17 +2612,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2396,7 +2644,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -2411,17 +2659,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2435,7 +2690,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -2447,7 +2702,7 @@ async def begin_list_publishing_credentials( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -2465,7 +2720,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2476,6 +2732,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2499,10 +2756,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2514,7 +2770,7 @@ async def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -2533,6 +2789,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2541,6 +2798,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2548,7 +2806,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2563,7 +2825,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2575,7 +2837,7 @@ async def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -2592,17 +2854,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2617,7 +2886,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2629,8 +2898,7 @@ async def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -2647,17 +2915,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2672,7 +2947,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2686,8 +2961,8 @@ async def update_slot_configuration_names( """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. + 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 @@ -2706,6 +2981,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -2714,6 +2990,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -2721,7 +2998,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2736,7 +3017,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2749,8 +3030,8 @@ async def get_configuration( """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. + 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 @@ -2767,17 +3048,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2792,7 +3080,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2805,7 +3093,7 @@ async def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -2824,6 +3112,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2832,6 +3121,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -2839,7 +3129,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2854,7 +3148,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2867,7 +3161,7 @@ async def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -2886,6 +3180,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2894,6 +3189,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -2901,7 +3197,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2916,7 +3216,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -2929,8 +3229,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -2943,6 +3243,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2955,6 +3257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -2966,6 +3269,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2983,7 +3287,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2997,7 +3305,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -3009,7 +3317,7 @@ async def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -3028,18 +3336,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3054,11 +3369,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3067,7 +3382,7 @@ async def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -3086,18 +3401,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3108,7 +3430,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -3120,7 +3442,7 @@ async def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -3137,17 +3459,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3163,7 +3492,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -3175,7 +3504,7 @@ async def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -3192,17 +3521,24 @@ async def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3218,7 +3554,7 @@ async def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -3230,7 +3566,7 @@ def list_continuous_web_jobs( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -3243,6 +3579,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3255,6 +3593,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -3266,6 +3605,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3283,7 +3623,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3297,7 +3641,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -3309,7 +3653,7 @@ async def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3328,18 +3672,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3356,11 +3707,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3369,7 +3720,7 @@ async def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3388,18 +3739,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3410,11 +3768,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3423,7 +3781,7 @@ async def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -3442,18 +3800,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3464,11 +3829,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3477,7 +3842,7 @@ async def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -3496,18 +3861,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3518,7 +3890,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3530,7 +3902,7 @@ def list_deployments( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -3543,6 +3915,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3555,6 +3929,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3566,6 +3941,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3583,7 +3959,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3597,7 +3977,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3609,7 +3989,7 @@ async def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -3628,18 +4008,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3654,7 +4041,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3668,7 +4055,7 @@ async def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -3689,6 +4076,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -3698,6 +4086,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -3705,7 +4094,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3720,11 +4113,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3733,7 +4126,7 @@ async def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -3752,18 +4145,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3774,7 +4174,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3787,7 +4187,7 @@ async def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -3807,18 +4207,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3833,7 +4240,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -3847,8 +4254,8 @@ async def discover_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. - 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. + 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 @@ -3868,6 +4275,7 @@ async def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -3876,6 +4284,7 @@ async def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -3883,7 +4292,11 @@ async def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3898,7 +4311,7 @@ async def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -3910,7 +4323,7 @@ def list_domain_ownership_identifiers( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -3923,6 +4336,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3935,6 +4350,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -3946,6 +4362,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3963,7 +4380,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3977,7 +4398,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -3989,7 +4410,7 @@ async def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -4008,18 +4429,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4034,7 +4462,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4048,8 +4476,7 @@ async def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4070,6 +4497,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4079,6 +4507,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -4086,7 +4515,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4101,11 +4534,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4114,7 +4547,7 @@ async def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -4133,18 +4566,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4155,7 +4595,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4169,8 +4609,7 @@ async def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4191,6 +4630,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4200,6 +4640,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -4207,7 +4648,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4222,7 +4667,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4234,7 +4679,7 @@ async def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -4251,17 +4696,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4276,7 +4728,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -4292,6 +4744,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -4300,6 +4753,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -4307,7 +4761,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -4323,7 +4781,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -4336,7 +4794,7 @@ async def begin_create_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -4357,8 +4815,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -4370,6 +4829,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4394,10 +4854,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -4408,7 +4867,7 @@ async def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -4425,17 +4884,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4452,7 +4918,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -4464,7 +4930,7 @@ def list_functions( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -4477,6 +4943,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4489,6 +4957,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -4500,6 +4969,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4517,7 +4987,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4531,7 +5005,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -4542,7 +5016,7 @@ async def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -4559,17 +5033,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4584,7 +5065,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -4597,7 +5078,7 @@ async def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -4616,18 +5097,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4644,7 +5132,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -4661,6 +5149,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -4670,6 +5159,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -4677,7 +5167,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4691,7 +5185,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4705,7 +5199,7 @@ async def begin_create_function( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -4728,8 +5222,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -4742,6 +5237,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4766,13 +5262,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4781,7 +5276,7 @@ async def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -4800,18 +5295,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4822,7 +5324,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4837,7 +5339,7 @@ async def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -4860,6 +5362,7 @@ async def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -4870,6 +5373,7 @@ async def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -4877,7 +5381,11 @@ async def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -4896,11 +5404,11 @@ async def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret( + async def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4910,7 +5418,7 @@ async def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -4931,6 +5439,8 @@ async def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -4938,12 +5448,17 @@ async def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4954,7 +5469,7 @@ async def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -4967,7 +5482,7 @@ async def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -4986,18 +5501,25 @@ async def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5012,7 +5534,7 @@ async def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -5025,7 +5547,7 @@ async def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -5044,18 +5566,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5070,7 +5599,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -5082,7 +5611,7 @@ async def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -5099,17 +5628,24 @@ async def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5124,11 +5660,11 @@ async def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status( + async def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5136,7 +5672,7 @@ async def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -5153,17 +5689,24 @@ async def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5174,11 +5717,11 @@ async def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions( + async def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5186,7 +5729,7 @@ async def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -5203,17 +5746,24 @@ async def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5224,7 +5774,7 @@ async def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace_async @@ -5239,7 +5789,7 @@ async def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -5262,6 +5812,7 @@ async def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5272,6 +5823,7 @@ async def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -5279,7 +5831,11 @@ async def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5298,11 +5854,11 @@ async def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret( + async def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5312,7 +5868,7 @@ async def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -5333,6 +5889,8 @@ async def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -5340,12 +5898,17 @@ async def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5356,7 +5919,7 @@ async def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -5368,7 +5931,7 @@ def list_host_name_bindings( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -5381,6 +5944,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5393,6 +5958,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -5404,6 +5970,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5421,7 +5988,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5435,7 +6006,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -5447,7 +6018,7 @@ async def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -5466,18 +6037,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5492,7 +6070,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5506,7 +6084,7 @@ async def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -5528,6 +6106,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -5537,6 +6116,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -5544,7 +6124,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5559,11 +6143,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5572,7 +6156,7 @@ async def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -5591,18 +6175,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5613,7 +6204,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5627,7 +6218,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -5648,6 +6239,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5655,12 +6248,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5675,7 +6273,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5690,7 +6288,7 @@ async def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -5713,6 +6311,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -5723,6 +6322,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -5730,7 +6330,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5745,11 +6349,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5759,7 +6363,7 @@ async def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -5780,6 +6384,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5787,12 +6393,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5803,7 +6414,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5818,7 +6429,7 @@ async def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -5841,6 +6452,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -5851,6 +6463,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -5858,7 +6471,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5873,7 +6490,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5885,7 +6502,7 @@ async def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -5902,17 +6519,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5927,7 +6551,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -5939,8 +6563,7 @@ async def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -5957,17 +6580,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5982,7 +6612,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -5995,7 +6625,7 @@ async def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -6014,18 +6644,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6040,7 +6677,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6054,8 +6691,7 @@ async def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6076,6 +6712,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6085,6 +6722,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -6092,7 +6730,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6107,11 +6749,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6120,7 +6762,7 @@ async def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -6139,18 +6781,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6161,7 +6810,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6175,8 +6824,7 @@ async def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6197,6 +6845,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6206,6 +6855,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -6213,7 +6863,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6228,7 +6882,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -6240,7 +6894,7 @@ def list_instance_identifiers( ) -> AsyncIterable["_models.WebAppInstanceCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -6253,6 +6907,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6265,6 +6921,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -6276,6 +6933,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6293,7 +6951,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6307,7 +6969,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_info( @@ -6319,7 +6981,7 @@ async def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -6338,18 +7000,25 @@ async def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6364,7 +7033,7 @@ async def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -6377,7 +7046,7 @@ async def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -6396,18 +7065,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6422,7 +7098,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -6439,6 +7115,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -6448,6 +7125,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -6455,7 +7133,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -6471,7 +7153,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -6485,7 +7167,7 @@ async def begin_create_instance_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -6508,8 +7190,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -6522,6 +7205,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6546,10 +7230,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -6561,7 +7244,7 @@ async def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -6580,18 +7263,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6608,7 +7298,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -6622,8 +7312,8 @@ def list_instance_processes( """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. + 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 @@ -6639,6 +7329,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6652,6 +7344,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -6664,6 +7357,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6681,7 +7375,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6695,7 +7393,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -6708,8 +7406,7 @@ async def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -6731,6 +7428,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -6738,12 +7437,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6760,11 +7464,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6775,8 +7479,8 @@ async def delete_instance_process( """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. + 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 @@ -6798,6 +7502,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -6805,12 +7511,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -6821,7 +7532,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -6835,8 +7546,7 @@ async def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -6858,6 +7568,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -6865,12 +7577,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6887,7 +7604,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -6902,8 +7619,8 @@ def list_instance_process_modules( """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. + 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 @@ -6921,6 +7638,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6935,6 +7654,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -6948,6 +7668,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6965,7 +7686,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6979,7 +7704,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -6993,8 +7718,7 @@ async def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7018,6 +7742,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -7026,12 +7752,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7048,7 +7779,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -7062,8 +7793,7 @@ def list_instance_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -7081,6 +7811,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7095,6 +7827,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -7108,6 +7841,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7125,7 +7859,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7139,7 +7877,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable( @@ -7150,7 +7888,7 @@ async def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -7167,17 +7905,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7192,7 +7937,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -7204,7 +7949,7 @@ def list_site_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -7217,6 +7962,8 @@ def list_site_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7229,6 +7976,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -7240,6 +7988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7257,7 +8006,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7271,7 +8024,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers( @@ -7282,7 +8035,7 @@ async def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -7299,17 +8052,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7324,7 +8084,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore async def _migrate_storage_initial( @@ -7341,6 +8101,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -7349,6 +8110,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -7357,7 +8119,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7371,7 +8137,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -7385,7 +8151,7 @@ async def begin_migrate_storage( ) -> AsyncLROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -7409,8 +8175,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -7423,6 +8190,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7447,10 +8215,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -7465,6 +8232,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -7473,6 +8241,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -7480,7 +8249,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7494,7 +8267,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -7507,7 +8280,7 @@ async def begin_migrate_my_sql( ) -> AsyncLROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -7528,8 +8301,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -7541,6 +8315,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7565,10 +8340,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -7580,8 +8354,8 @@ async def get_migrate_my_sql_status( """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. + 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 @@ -7598,17 +8372,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7623,7 +8404,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -7635,7 +8416,7 @@ async def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -7652,17 +8433,24 @@ async def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7677,7 +8465,7 @@ async def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7693,9 +8481,9 @@ async def create_or_update_swift_virtual_network_connection( 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 + 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. @@ -7715,6 +8503,7 @@ async def create_or_update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -7723,6 +8512,7 @@ async def create_or_update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection.metadata['url'], @@ -7730,7 +8520,11 @@ async def create_or_update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7745,11 +8539,11 @@ async def create_or_update_swift_virtual_network_connection( return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network( + async def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7757,7 +8551,7 @@ async def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -7774,17 +8568,24 @@ async def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7795,7 +8596,7 @@ async def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7811,9 +8612,9 @@ async def update_swift_virtual_network_connection( 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 + 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. @@ -7833,6 +8634,7 @@ async def update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -7841,6 +8643,7 @@ async def update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection.metadata['url'], @@ -7848,7 +8651,11 @@ async def update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7863,7 +8670,7 @@ async def update_swift_virtual_network_connection( return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7876,7 +8683,7 @@ async def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -7895,18 +8702,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7923,7 +8737,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -7936,8 +8750,7 @@ async def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -7956,18 +8769,25 @@ async def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -7986,7 +8806,7 @@ async def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8001,17 +8821,17 @@ async def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -8024,11 +8844,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8037,7 +8860,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8052,7 +8879,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_initial( @@ -8070,11 +8897,14 @@ async def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8083,7 +8913,11 @@ async def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8101,7 +8935,7 @@ async def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -8116,17 +8950,17 @@ async def begin_start_web_site_network_trace_operation( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -8142,7 +8976,8 @@ async def begin_start_web_site_network_trace_operation( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -8156,6 +8991,7 @@ async def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -8179,13 +9015,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace( + async def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8193,7 +9028,7 @@ async def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -8210,17 +9045,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8231,7 +9073,7 @@ async def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -8244,8 +9086,7 @@ async def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8264,18 +9105,25 @@ async def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8290,7 +9138,7 @@ async def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -8303,8 +9151,7 @@ async def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8323,18 +9170,25 @@ async def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8353,7 +9207,7 @@ async def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8366,8 +9220,7 @@ async def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8386,18 +9239,25 @@ async def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8412,11 +9272,11 @@ async def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8424,8 +9284,7 @@ async def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -8442,17 +9301,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8463,7 +9329,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -8476,7 +9342,7 @@ def list_perf_mon_counters( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -8484,7 +9350,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -8493,6 +9359,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8505,6 +9373,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -8517,6 +9386,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -8535,7 +9405,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8549,7 +9423,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -8560,7 +9434,7 @@ async def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -8577,17 +9451,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8602,7 +9483,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -8614,7 +9495,7 @@ async def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -8631,17 +9512,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8656,7 +9544,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -8669,7 +9557,7 @@ async def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -8688,18 +9576,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8714,7 +9609,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8728,7 +9623,7 @@ async def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -8749,6 +9644,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -8758,6 +9654,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -8765,7 +9662,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8780,11 +9681,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8793,7 +9694,7 @@ async def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -8812,18 +9713,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8834,7 +9742,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8848,7 +9756,7 @@ async def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -8869,6 +9777,7 @@ async def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -8878,6 +9787,7 @@ async def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -8885,7 +9795,11 @@ async def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8900,7 +9814,7 @@ async def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8913,8 +9827,8 @@ async def get_private_access( """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. + 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 @@ -8931,17 +9845,24 @@ async def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8956,7 +9877,7 @@ async def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -8970,8 +9891,8 @@ async def put_private_access_vnet( """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. + 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 @@ -8990,6 +9911,7 @@ async def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -8998,6 +9920,7 @@ async def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -9005,7 +9928,11 @@ async def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9020,7 +9947,7 @@ async def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -9033,8 +9960,8 @@ def list_processes( """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. + 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 @@ -9047,6 +9974,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9059,6 +9988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -9070,6 +10000,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9087,7 +10018,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9101,7 +10036,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -9113,8 +10048,7 @@ async def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9133,18 +10067,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9161,11 +10102,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9175,8 +10116,8 @@ async def delete_process( """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. + 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 @@ -9195,18 +10136,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -9217,7 +10165,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -9230,8 +10178,7 @@ async def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -9250,18 +10197,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9278,7 +10232,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -9292,8 +10246,8 @@ def list_process_modules( """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. + 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 @@ -9308,6 +10262,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9321,6 +10277,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -9333,6 +10290,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9350,7 +10308,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9364,7 +10326,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -9377,8 +10339,7 @@ async def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9399,6 +10360,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -9406,12 +10369,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9428,7 +10396,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -9441,8 +10409,7 @@ def list_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -9457,6 +10424,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9470,6 +10439,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -9482,6 +10452,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9499,7 +10470,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9513,7 +10488,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -9524,7 +10499,7 @@ def list_public_certificates( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -9537,6 +10512,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9549,6 +10526,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -9560,6 +10538,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9577,7 +10556,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9591,7 +10574,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -9603,7 +10586,7 @@ async def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -9622,18 +10605,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9648,7 +10638,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -9662,7 +10652,7 @@ async def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -9684,6 +10674,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -9693,6 +10684,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -9700,7 +10692,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9715,11 +10711,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9728,7 +10724,7 @@ async def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -9747,18 +10743,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -9769,7 +10772,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -9782,7 +10785,7 @@ async def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -9803,6 +10806,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -9811,6 +10815,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -9818,7 +10823,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9833,11 +10842,11 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9846,8 +10855,8 @@ async def reset_production_slot_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. + 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 @@ -9864,17 +10873,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9885,11 +10901,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9899,17 +10915,18 @@ async def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -9922,11 +10939,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -9934,7 +10954,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9945,10 +10969,10 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - async def _restore_from_backup_blob_initial( + async def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9961,6 +10985,7 @@ async def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -9969,6 +10994,7 @@ async def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -9976,7 +11002,11 @@ async def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9986,11 +11016,11 @@ async def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob( + async def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9999,7 +11029,7 @@ async def begin_restore_from_backup_blob( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -10019,8 +11049,9 @@ async def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10032,6 +11063,7 @@ async def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10053,12 +11085,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_initial( + async def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10071,6 +11102,7 @@ async def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -10079,6 +11111,7 @@ async def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -10086,7 +11119,11 @@ async def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10096,11 +11133,11 @@ async def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app( + async def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10109,7 +11146,7 @@ async def begin_restore_from_deleted_app( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -10129,8 +11166,9 @@ async def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10142,6 +11180,7 @@ async def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10163,12 +11202,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_initial( + async def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10181,6 +11219,7 @@ async def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -10189,6 +11228,7 @@ async def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -10196,7 +11236,11 @@ async def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10206,11 +11250,11 @@ async def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot( + async def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10219,7 +11263,7 @@ async def begin_restore_snapshot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -10240,8 +11284,9 @@ async def begin_restore_snapshot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10253,6 +11298,7 @@ async def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10274,10 +11320,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -10288,7 +11333,7 @@ def list_site_extensions( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -10301,6 +11346,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10313,6 +11360,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -10324,6 +11372,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10341,7 +11390,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10355,7 +11408,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -10367,7 +11420,7 @@ async def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -10386,18 +11439,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10414,7 +11474,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -10430,18 +11490,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -10460,7 +11527,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -10473,7 +11540,7 @@ async def begin_install_site_extension( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -10495,7 +11562,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -10507,6 +11575,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -10530,13 +11599,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10545,7 +11613,7 @@ async def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -10564,18 +11632,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -10586,10 +11661,10 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore - async def _copy_production_slot_initial( + async def _copy_production_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10602,6 +11677,7 @@ async def _copy_production_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -10610,6 +11686,7 @@ async def _copy_production_slot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_production_slot_initial.metadata['url'], @@ -10617,7 +11694,11 @@ async def _copy_production_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10627,11 +11708,11 @@ async def _copy_production_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_production_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + _copy_production_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace_async - async def begin_copy_production_slot( + async def begin_copy_production_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10640,7 +11721,7 @@ async def begin_copy_production_slot( ) -> AsyncLROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -10661,8 +11742,9 @@ async def begin_copy_production_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10674,6 +11756,7 @@ async def begin_copy_production_slot( resource_group_name=resource_group_name, name=name, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10695,10 +11778,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + begin_copy_production_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace def list_slots( @@ -10709,7 +11791,7 @@ def list_slots( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -10721,6 +11803,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10733,6 +11817,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -10744,6 +11829,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10761,7 +11847,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10775,7 +11865,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -10787,7 +11877,7 @@ async def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -10806,18 +11896,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10834,7 +11931,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -10851,6 +11948,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -10860,6 +11958,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -10867,7 +11966,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10885,7 +11988,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -10900,8 +12003,8 @@ async def begin_create_or_update_slot( """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. + 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 @@ -10925,8 +12028,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -10939,6 +12043,7 @@ async def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10963,13 +12068,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10980,7 +12084,7 @@ async def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -10989,11 +12093,11 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -11006,12 +12110,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -11019,7 +12126,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -11030,7 +12141,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11045,8 +12156,8 @@ async def update_slot( """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. + 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 @@ -11069,6 +12180,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -11078,6 +12190,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -11085,7 +12198,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11104,7 +12221,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11118,7 +12235,7 @@ async def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -11126,7 +12243,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -11139,19 +12256,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11166,11 +12290,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11180,7 +12304,7 @@ async def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -11202,6 +12326,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -11211,6 +12336,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -11218,7 +12344,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11229,7 +12359,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -11243,7 +12373,7 @@ async def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -11266,6 +12396,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11275,6 +12406,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -11282,7 +12414,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11297,7 +12433,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -11310,7 +12446,7 @@ def list_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -11326,6 +12462,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11339,6 +12477,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -11351,6 +12490,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11368,7 +12508,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11382,7 +12526,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def get_backup_status_slot( @@ -11395,7 +12539,7 @@ async def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -11417,6 +12561,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -11424,12 +12570,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11444,11 +12595,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11458,7 +12609,7 @@ async def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -11480,6 +12631,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -11487,12 +12640,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11503,7 +12661,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -11520,9 +12678,9 @@ async def list_backup_status_secrets_slot( 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. + 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 @@ -11545,6 +12703,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11555,6 +12714,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -11562,7 +12722,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11577,10 +12741,10 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - async def _restore_slot_initial( + async def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11595,6 +12759,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -11605,6 +12770,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -11612,7 +12778,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11622,11 +12792,11 @@ async def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore_slot( + async def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11637,7 +12807,7 @@ async def begin_restore_slot( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -11662,8 +12832,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -11677,6 +12848,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11698,10 +12870,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -11713,7 +12884,7 @@ def list_configurations_slot( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -11729,6 +12900,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11742,6 +12915,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -11754,6 +12928,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11771,7 +12946,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11785,7 +12964,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -11798,7 +12977,7 @@ async def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -11820,6 +12999,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -11829,6 +13009,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -11836,7 +13017,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11851,7 +13036,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -11864,7 +13049,7 @@ async def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -11884,18 +13069,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11910,7 +13102,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -11924,7 +13116,7 @@ async def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -11945,6 +13137,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -11954,6 +13147,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -11961,7 +13155,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11976,7 +13174,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -11989,7 +13187,7 @@ async def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -12009,18 +13207,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12035,7 +13240,7 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -12049,7 +13254,7 @@ async def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -12072,6 +13277,7 @@ async def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -12081,6 +13287,7 @@ async def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -12088,7 +13295,11 @@ async def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12103,7 +13314,7 @@ async def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -12116,7 +13327,7 @@ async def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -12136,18 +13347,25 @@ async def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12162,7 +13380,7 @@ async def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -12176,7 +13394,7 @@ async def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -12198,6 +13416,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12207,6 +13426,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -12214,7 +13434,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12229,11 +13453,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12242,7 +13466,7 @@ async def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -12262,18 +13486,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12284,7 +13515,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -12297,7 +13528,7 @@ async def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -12317,18 +13548,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12343,7 +13581,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace_async @@ -12357,7 +13595,7 @@ async def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -12379,6 +13617,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -12388,6 +13627,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -12395,7 +13635,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12410,7 +13654,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -12423,7 +13667,7 @@ async def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -12443,18 +13687,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12469,7 +13720,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -12482,7 +13733,7 @@ async def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -12502,18 +13753,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12528,7 +13786,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -12542,7 +13800,7 @@ async def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -12565,6 +13823,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -12574,6 +13833,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -12581,7 +13841,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12596,7 +13860,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -12610,7 +13874,7 @@ async def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -12632,6 +13896,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -12641,6 +13906,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -12648,7 +13914,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12663,7 +13933,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -12676,7 +13946,7 @@ async def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -12696,18 +13966,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12722,7 +13999,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -12738,18 +14015,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12763,7 +14047,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -12776,7 +14060,7 @@ async def begin_list_publishing_credentials_slot( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -12797,7 +14081,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -12809,6 +14094,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -12832,10 +14118,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -12848,7 +14133,7 @@ async def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -12869,6 +14154,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -12878,6 +14164,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -12885,7 +14172,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12900,7 +14191,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -12913,7 +14204,7 @@ async def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -12932,18 +14223,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12958,7 +14256,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -12972,8 +14270,8 @@ async def get_configuration_slot( """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. + 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 @@ -12993,18 +14291,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13019,7 +14324,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -13033,7 +14338,7 @@ async def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -13055,6 +14360,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -13064,6 +14370,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -13071,7 +14378,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13086,7 +14397,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -13100,7 +14411,7 @@ async def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -13122,6 +14433,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -13131,6 +14443,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -13138,7 +14451,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13153,7 +14470,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -13167,8 +14484,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -13184,6 +14501,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13197,6 +14516,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -13209,6 +14529,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13226,7 +14547,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13240,7 +14565,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -13253,7 +14578,7 @@ async def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -13275,6 +14600,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -13282,12 +14609,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13302,11 +14634,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13316,7 +14648,7 @@ async def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -13338,6 +14670,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -13345,12 +14679,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -13361,7 +14700,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -13374,7 +14713,7 @@ async def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -13393,18 +14732,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13420,7 +14766,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -13433,7 +14779,7 @@ async def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -13452,18 +14798,25 @@ async def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13479,7 +14832,7 @@ async def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -13492,7 +14845,7 @@ def list_continuous_web_jobs_slot( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -13508,6 +14861,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13521,6 +14876,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -13533,6 +14889,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13550,7 +14907,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13564,7 +14925,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -13577,7 +14938,7 @@ async def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -13599,6 +14960,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13606,12 +14969,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13628,11 +14996,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13642,7 +15010,7 @@ async def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -13664,6 +15032,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13671,12 +15041,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13687,11 +15062,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13701,7 +15076,7 @@ async def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -13723,6 +15098,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13730,12 +15107,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13746,11 +15128,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13760,7 +15142,7 @@ async def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -13782,6 +15164,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13789,12 +15173,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13805,7 +15194,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -13818,7 +15207,7 @@ def list_deployments_slot( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -13834,6 +15223,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13847,6 +15238,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -13859,6 +15251,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13876,7 +15269,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13890,7 +15287,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -13903,7 +15300,7 @@ async def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -13925,6 +15322,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -13932,12 +15331,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13952,7 +15356,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -13967,7 +15371,7 @@ async def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -13991,6 +15395,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -14001,6 +15406,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -14008,7 +15414,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14023,11 +15433,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14037,7 +15447,7 @@ async def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -14059,6 +15469,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -14066,12 +15478,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14082,7 +15499,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -14096,7 +15513,7 @@ async def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -14119,6 +15536,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -14126,12 +15545,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14146,7 +15570,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -14161,8 +15585,8 @@ async def discover_backup_slot( """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. + 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 @@ -14185,6 +15609,7 @@ async def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -14194,6 +15619,7 @@ async def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -14201,7 +15627,11 @@ async def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14216,7 +15646,7 @@ async def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -14229,7 +15659,7 @@ def list_domain_ownership_identifiers_slot( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -14245,6 +15675,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14258,6 +15690,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -14270,6 +15703,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14287,7 +15721,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14301,7 +15739,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -14314,7 +15752,7 @@ async def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -14336,6 +15774,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -14343,12 +15783,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14363,7 +15808,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14378,8 +15823,7 @@ async def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -14403,6 +15847,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -14413,6 +15858,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -14420,7 +15866,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14435,11 +15885,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14449,7 +15899,7 @@ async def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -14471,6 +15921,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -14478,12 +15930,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14494,7 +15951,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14509,8 +15966,7 @@ async def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -14534,6 +15990,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -14544,6 +16001,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -14551,7 +16009,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14566,7 +16028,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14579,7 +16041,7 @@ async def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -14598,18 +16060,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14624,7 +16093,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -14641,6 +16110,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -14650,6 +16120,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -14657,7 +16128,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -14673,7 +16148,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -14687,7 +16162,7 @@ async def begin_create_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -14710,8 +16185,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -14724,6 +16200,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -14748,10 +16225,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -14763,7 +16239,7 @@ async def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -14782,18 +16258,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14810,7 +16293,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -14823,7 +16306,7 @@ def list_instance_functions_slot( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -14838,6 +16321,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14851,6 +16336,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -14863,6 +16349,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14880,7 +16367,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14894,7 +16385,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -14906,7 +16397,7 @@ async def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -14925,18 +16416,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14951,7 +16449,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -14965,7 +16463,7 @@ async def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -14986,6 +16484,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -14993,12 +16493,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15015,7 +16520,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -15033,6 +16538,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -15043,6 +16549,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -15050,7 +16557,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -15064,7 +16575,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -15079,7 +16590,7 @@ async def begin_create_instance_function_slot( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -15104,8 +16615,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -15119,6 +16631,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15143,13 +16656,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15159,7 +16671,7 @@ async def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -15180,6 +16692,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -15187,12 +16701,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15203,7 +16722,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -15219,7 +16738,7 @@ async def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -15244,6 +16763,7 @@ async def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -15255,6 +16775,7 @@ async def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -15262,7 +16783,11 @@ async def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -15281,11 +16806,11 @@ async def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret_slot( + async def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15296,7 +16821,7 @@ async def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -15319,6 +16844,8 @@ async def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -15327,12 +16854,17 @@ async def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15343,7 +16875,7 @@ async def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -15357,7 +16889,7 @@ async def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -15378,6 +16910,8 @@ async def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -15385,12 +16919,17 @@ async def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15405,7 +16944,7 @@ async def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -15419,7 +16958,7 @@ async def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -15440,6 +16979,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -15447,12 +16988,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15467,7 +17013,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -15480,7 +17026,7 @@ async def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -15499,18 +17045,25 @@ async def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15525,11 +17078,11 @@ async def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status_slot( + async def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15538,7 +17091,7 @@ async def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -15557,18 +17110,25 @@ async def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -15579,11 +17139,11 @@ async def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions_slot( + async def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15592,7 +17152,7 @@ async def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -15611,18 +17171,25 @@ async def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -15633,7 +17200,7 @@ async def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace_async @@ -15649,7 +17216,7 @@ async def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -15674,6 +17241,7 @@ async def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -15685,6 +17253,7 @@ async def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -15692,7 +17261,11 @@ async def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -15711,11 +17284,11 @@ async def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret_slot( + async def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15726,7 +17299,7 @@ async def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -15749,6 +17322,8 @@ async def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -15757,12 +17332,17 @@ async def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15773,7 +17353,7 @@ async def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -15786,7 +17366,7 @@ def list_host_name_bindings_slot( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -15802,6 +17382,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15815,6 +17397,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -15827,6 +17410,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15844,7 +17428,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15858,7 +17446,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -15871,7 +17459,7 @@ async def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -15893,6 +17481,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -15900,12 +17490,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15920,7 +17515,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -15935,7 +17530,7 @@ async def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -15960,6 +17555,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -15970,6 +17566,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -15977,7 +17574,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15992,11 +17593,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16006,7 +17607,7 @@ async def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -16028,6 +17629,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -16035,12 +17638,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16051,7 +17659,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -16066,7 +17674,7 @@ async def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -16089,6 +17697,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -16097,12 +17707,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16117,7 +17732,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16133,7 +17748,7 @@ async def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -16158,6 +17773,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -16169,6 +17785,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -16176,7 +17793,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16191,11 +17812,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16206,7 +17827,7 @@ async def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -16229,6 +17850,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -16237,12 +17860,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16253,7 +17881,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16269,7 +17897,7 @@ async def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -16294,6 +17922,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -16305,6 +17934,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -16312,7 +17942,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16327,7 +17961,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16340,7 +17974,7 @@ async def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -16359,18 +17993,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16385,7 +18026,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -16398,8 +18039,7 @@ async def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -16419,18 +18059,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16445,7 +18092,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -16459,7 +18106,7 @@ async def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -16481,6 +18128,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -16488,12 +18137,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16508,7 +18162,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -16523,8 +18177,7 @@ async def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -16548,6 +18201,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -16558,6 +18212,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -16565,7 +18220,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16580,11 +18239,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16594,7 +18253,7 @@ async def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -16616,6 +18275,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -16623,12 +18284,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16639,7 +18305,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -16654,8 +18320,7 @@ async def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -16679,6 +18344,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -16689,6 +18355,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -16696,7 +18363,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16711,7 +18382,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -16724,7 +18395,7 @@ def list_instance_identifiers_slot( ) -> AsyncIterable["_models.WebAppInstanceCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -16740,6 +18411,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16753,6 +18426,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -16765,6 +18439,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16782,7 +18457,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16796,7 +18475,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_info_slot( @@ -16809,7 +18488,7 @@ async def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -16831,6 +18510,8 @@ async def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -16838,12 +18519,17 @@ async def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16858,7 +18544,7 @@ async def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -16872,7 +18558,7 @@ async def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -16893,6 +18579,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -16900,12 +18588,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16920,7 +18613,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -16938,6 +18631,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -16948,6 +18642,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -16955,7 +18650,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -16971,7 +18670,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -16986,7 +18685,7 @@ async def begin_create_instance_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -17011,8 +18710,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -17026,6 +18726,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -17050,10 +18751,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -17066,7 +18766,7 @@ async def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -17087,6 +18787,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -17094,12 +18796,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17116,7 +18823,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -17131,8 +18838,8 @@ def list_instance_processes_slot( """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. + 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 @@ -17151,6 +18858,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17165,6 +18874,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -17178,6 +18888,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17195,7 +18906,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17209,7 +18924,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -17223,8 +18938,7 @@ async def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -17249,6 +18963,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -17257,12 +18973,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17279,11 +19000,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17295,8 +19016,8 @@ async def delete_instance_process_slot( """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. + 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 @@ -17321,6 +19042,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -17329,12 +19052,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -17345,7 +19073,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -17360,8 +19088,7 @@ async def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -17386,6 +19113,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -17394,12 +19123,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17416,7 +19150,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -17432,8 +19166,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -17454,6 +19188,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17469,6 +19205,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -17483,6 +19220,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17500,7 +19238,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17514,7 +19256,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -17529,8 +19271,7 @@ async def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -17557,6 +19298,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -17566,12 +19309,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17588,7 +19336,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -17603,8 +19351,7 @@ def list_instance_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -17625,6 +19372,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17640,6 +19389,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -17654,6 +19404,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17671,7 +19422,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17685,7 +19440,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable_slot( @@ -17697,7 +19452,7 @@ async def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -17717,18 +19472,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17743,7 +19505,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -17756,7 +19518,7 @@ def list_site_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -17772,6 +19534,8 @@ def list_site_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17785,6 +19549,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -17797,6 +19562,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17814,7 +19580,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17828,7 +19598,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers_slot( @@ -17840,7 +19610,7 @@ async def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -17859,18 +19629,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17885,7 +19662,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace_async @@ -17899,8 +19676,8 @@ async def get_migrate_my_sql_status_slot( """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. + 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 @@ -17919,18 +19696,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17945,7 +19729,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -17958,7 +19742,7 @@ async def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -17978,18 +19762,25 @@ async def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18004,7 +19795,7 @@ async def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18021,9 +19812,9 @@ async def create_or_update_swift_virtual_network_connection_slot( 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 + 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. @@ -18046,6 +19837,7 @@ async def create_or_update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -18055,6 +19847,7 @@ async def create_or_update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_slot.metadata['url'], @@ -18062,7 +19855,11 @@ async def create_or_update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18077,11 +19874,11 @@ async def create_or_update_swift_virtual_network_connection_slot( 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'} # type: ignore + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network_slot( + async def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18090,7 +19887,7 @@ async def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -18110,18 +19907,25 @@ async def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18132,7 +19936,7 @@ async def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18149,9 +19953,9 @@ async def update_swift_virtual_network_connection_slot( 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 + 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. @@ -18174,6 +19978,7 @@ async def update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -18183,6 +19988,7 @@ async def update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_slot.metadata['url'], @@ -18190,7 +19996,11 @@ async def update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18205,7 +20015,7 @@ async def update_swift_virtual_network_connection_slot( return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18219,7 +20029,7 @@ async def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -18241,6 +20051,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -18248,12 +20060,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18270,7 +20087,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -18284,8 +20101,7 @@ async def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18307,6 +20123,8 @@ async def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -18314,12 +20132,17 @@ async def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18338,7 +20161,7 @@ async def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -18354,7 +20177,7 @@ async def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -18362,11 +20185,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -18379,12 +20202,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18393,7 +20219,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18408,7 +20238,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_slot_initial( @@ -18427,12 +20257,15 @@ async def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18441,7 +20274,11 @@ async def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18459,7 +20296,7 @@ async def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -18475,7 +20312,7 @@ async def begin_start_web_site_network_trace_operation_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -18483,11 +20320,11 @@ async def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -18503,7 +20340,8 @@ async def begin_start_web_site_network_trace_operation_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -18518,6 +20356,7 @@ async def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -18541,13 +20380,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace_slot( + async def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18556,7 +20394,7 @@ async def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -18575,18 +20413,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18597,7 +20442,7 @@ async def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -18611,8 +20456,7 @@ async def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18634,6 +20478,8 @@ async def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -18641,12 +20487,17 @@ async def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18661,7 +20512,7 @@ async def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -18675,8 +20526,7 @@ async def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18698,6 +20548,8 @@ async def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -18705,12 +20557,17 @@ async def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18729,7 +20586,7 @@ async def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -18743,8 +20600,7 @@ async def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18766,6 +20622,8 @@ async def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -18773,12 +20631,17 @@ async def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18793,11 +20656,11 @@ async def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18806,8 +20669,7 @@ async def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -18827,18 +20689,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18849,7 +20718,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -18863,7 +20732,7 @@ def list_perf_mon_counters_slot( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -18873,7 +20742,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -18882,6 +20751,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18895,6 +20766,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -18908,6 +20780,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -18926,7 +20799,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18940,7 +20817,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -18952,7 +20829,7 @@ async def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -18971,18 +20848,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18997,7 +20881,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -19010,7 +20894,7 @@ async def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -19030,18 +20914,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19056,7 +20947,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -19070,7 +20961,7 @@ async def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -19092,6 +20983,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -19099,12 +20992,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19119,7 +21017,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19134,7 +21032,7 @@ async def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -19158,6 +21056,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -19168,6 +21067,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -19175,7 +21075,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19190,11 +21094,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19204,7 +21108,7 @@ async def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -19226,6 +21130,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -19233,12 +21139,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19249,7 +21160,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19264,7 +21175,7 @@ async def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -19288,6 +21199,7 @@ async def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -19298,6 +21210,7 @@ async def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -19305,7 +21218,11 @@ async def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19320,7 +21237,7 @@ async def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19334,8 +21251,8 @@ async def get_private_access_slot( """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. + 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 @@ -19354,18 +21271,25 @@ async def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19380,7 +21304,7 @@ async def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -19395,8 +21319,8 @@ async def put_private_access_vnet_slot( """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. + 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 @@ -19417,6 +21341,7 @@ async def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -19426,6 +21351,7 @@ async def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -19433,7 +21359,11 @@ async def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19448,7 +21378,7 @@ async def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -19461,7 +21391,7 @@ async def get_private_endpoint_connection( ) -> "_models.PrivateEndpointConnectionResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19480,18 +21410,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19506,7 +21443,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -19523,6 +21460,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -19532,6 +21470,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -19539,7 +21478,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19557,7 +21500,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -19571,7 +21514,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.PrivateEndpointConnectionResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -19596,8 +21539,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.PrivateEndpointConnectionResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -19610,6 +21554,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19634,10 +21579,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -19652,18 +21596,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -19684,7 +21635,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -19697,7 +21648,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19717,7 +21668,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -19729,6 +21681,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -19752,10 +21705,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -19766,7 +21718,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19783,17 +21735,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19808,7 +21767,7 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -19822,8 +21781,8 @@ def list_processes_slot( """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. + 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 @@ -19839,6 +21798,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19852,6 +21813,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -19864,6 +21826,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19881,7 +21844,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19895,7 +21862,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -19908,8 +21875,7 @@ async def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -19931,6 +21897,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -19938,12 +21906,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19960,11 +21933,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19975,8 +21948,8 @@ async def delete_process_slot( """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. + 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 @@ -19998,6 +21971,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -20005,12 +21980,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20021,7 +22001,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -20035,8 +22015,7 @@ async def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -20058,6 +22037,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -20065,12 +22046,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20087,7 +22073,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -20102,8 +22088,8 @@ def list_process_modules_slot( """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. + 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 @@ -20121,6 +22107,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20135,6 +22123,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -20148,6 +22137,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20165,7 +22155,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20179,7 +22173,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -20193,8 +22187,7 @@ async def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -20218,6 +22211,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -20226,12 +22221,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20248,7 +22248,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -20262,8 +22262,7 @@ def list_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -20281,6 +22280,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20295,6 +22296,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -20308,6 +22310,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20325,7 +22328,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20339,7 +22346,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -20351,7 +22358,7 @@ def list_public_certificates_slot( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -20367,6 +22374,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20380,6 +22389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -20392,6 +22402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20409,7 +22420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20423,7 +22438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -20436,7 +22451,7 @@ async def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -20458,6 +22473,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -20465,12 +22482,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20485,7 +22507,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -20500,7 +22522,7 @@ async def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -20525,6 +22547,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -20535,6 +22558,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -20542,7 +22566,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20557,11 +22585,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20571,7 +22599,7 @@ async def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -20593,6 +22621,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -20600,12 +22630,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20616,7 +22651,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -20630,7 +22665,7 @@ async def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -20654,6 +22689,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -20663,6 +22699,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -20670,7 +22707,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20685,11 +22726,11 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20699,8 +22740,8 @@ async def reset_slot_configuration_slot( """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. + 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 @@ -20720,18 +22761,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20742,11 +22790,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20757,7 +22805,7 @@ async def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -20767,10 +22815,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -20783,12 +22832,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -20796,7 +22848,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20807,10 +22863,10 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - async def _restore_from_backup_blob_slot_initial( + async def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20824,6 +22880,7 @@ async def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -20833,6 +22890,7 @@ async def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -20840,7 +22898,11 @@ async def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20850,11 +22912,11 @@ async def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob_slot( + async def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20864,7 +22926,7 @@ async def begin_restore_from_backup_blob_slot( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -20887,8 +22949,9 @@ async def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -20901,6 +22964,7 @@ async def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20922,12 +22986,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_slot_initial( + async def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20941,6 +23004,7 @@ async def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -20950,6 +23014,7 @@ async def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -20957,7 +23022,11 @@ async def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20967,11 +23036,11 @@ async def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app_slot( + async def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20981,7 +23050,7 @@ async def begin_restore_from_deleted_app_slot( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -21003,8 +23072,9 @@ async def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21017,6 +23087,7 @@ async def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21038,12 +23109,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_slot_initial( + async def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21057,6 +23127,7 @@ async def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -21066,6 +23137,7 @@ async def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -21073,7 +23145,11 @@ async def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21083,11 +23159,11 @@ async def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot_slot( + async def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21097,7 +23173,7 @@ async def begin_restore_snapshot_slot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -21120,8 +23196,9 @@ async def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21134,6 +23211,7 @@ async def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21155,10 +23233,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -21170,7 +23247,7 @@ def list_site_extensions_slot( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -21186,6 +23263,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21199,6 +23278,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -21211,6 +23291,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21228,7 +23309,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21242,7 +23327,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -21255,7 +23340,7 @@ async def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -21277,6 +23362,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -21284,12 +23371,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21306,7 +23398,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -21323,6 +23415,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -21330,12 +23424,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -21354,7 +23453,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -21368,7 +23467,7 @@ async def begin_install_site_extension_slot( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -21393,7 +23492,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -21406,6 +23506,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -21429,13 +23530,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21445,7 +23545,7 @@ async def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -21467,6 +23567,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -21474,12 +23576,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21490,10 +23597,10 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore - async def _copy_slot_initial( + async def _copy_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21507,6 +23614,7 @@ async def _copy_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -21516,6 +23624,7 @@ async def _copy_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_slot_initial.metadata['url'], @@ -21523,7 +23632,11 @@ async def _copy_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21533,11 +23646,11 @@ async def _copy_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + _copy_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace_async - async def begin_copy_slot( + async def begin_copy_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21547,7 +23660,7 @@ async def begin_copy_slot( ) -> AsyncLROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -21571,8 +23684,9 @@ async def begin_copy_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21585,6 +23699,7 @@ async def begin_copy_slot( name=name, slot=slot, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21606,10 +23721,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + begin_copy_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace def list_slot_differences_slot( @@ -21622,7 +23736,7 @@ def list_slot_differences_slot( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -21640,6 +23754,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -21656,6 +23771,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -21671,6 +23787,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -21690,7 +23807,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21704,9 +23825,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21720,6 +23841,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -21729,6 +23851,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -21736,7 +23859,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21746,11 +23873,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21760,7 +23887,7 @@ async def begin_swap_slot( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -21783,8 +23910,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21797,6 +23925,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21818,10 +23947,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -21833,7 +23961,7 @@ def list_snapshots_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -21847,6 +23975,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21860,6 +23990,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -21872,6 +24003,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21889,7 +24021,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21903,7 +24039,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -21915,7 +24051,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -21929,6 +24065,8 @@ def list_snapshots_from_dr_secondary_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21942,6 +24080,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -21954,6 +24093,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21971,7 +24111,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21985,7 +24129,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -21997,7 +24141,7 @@ async def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -22017,18 +24161,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22050,7 +24201,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -22067,6 +24218,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -22076,6 +24228,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -22083,7 +24236,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22104,7 +24261,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -22118,7 +24275,7 @@ async def begin_create_or_update_source_control_slot( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -22143,8 +24300,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -22157,6 +24315,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22181,13 +24340,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22196,7 +24354,7 @@ async def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -22216,18 +24374,25 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -22238,7 +24403,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -22252,7 +24417,7 @@ async def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -22274,6 +24439,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -22283,6 +24449,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -22290,7 +24457,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22312,11 +24483,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22325,7 +24496,7 @@ async def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -22345,18 +24516,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22367,7 +24545,7 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore async def _start_network_trace_slot_initial( @@ -22386,12 +24564,15 @@ async def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -22400,7 +24581,11 @@ async def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22418,7 +24603,7 @@ async def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -22434,7 +24619,7 @@ async def begin_start_network_trace_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -22442,11 +24627,11 @@ async def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -22462,7 +24647,8 @@ async def begin_start_network_trace_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -22477,6 +24663,7 @@ async def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -22500,13 +24687,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22515,7 +24701,7 @@ async def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -22535,18 +24721,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22557,11 +24750,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace_slot( + async def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22570,7 +24763,7 @@ async def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -22589,18 +24782,25 @@ async def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22611,11 +24811,11 @@ async def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22624,7 +24824,7 @@ async def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -22643,18 +24843,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22665,11 +24872,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22678,7 +24885,7 @@ async def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -22697,18 +24904,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -22719,7 +24933,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -22732,7 +24946,7 @@ def list_triggered_web_jobs_slot( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -22748,6 +24962,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22761,6 +24977,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -22773,6 +24990,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22790,7 +25008,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22804,7 +25026,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -22817,7 +25039,7 @@ async def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -22839,6 +25061,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -22846,12 +25070,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22868,11 +25097,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22882,7 +25111,7 @@ async def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -22904,6 +25133,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -22911,12 +25142,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22927,7 +25163,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -22941,7 +25177,7 @@ def list_triggered_web_job_history_slot( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -22959,6 +25195,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22973,6 +25211,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -22986,6 +25225,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23003,7 +25243,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23017,7 +25261,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -23031,8 +25275,7 @@ async def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -23056,6 +25299,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -23064,12 +25309,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23086,11 +25336,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23100,7 +25350,7 @@ async def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -23122,6 +25372,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -23129,12 +25381,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23145,7 +25402,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -23159,7 +25416,7 @@ def list_usages_slot( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -23171,7 +25428,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -23180,6 +25437,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23193,6 +25452,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -23206,6 +25466,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -23224,7 +25485,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23238,7 +25503,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -23250,7 +25515,7 @@ async def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -23270,18 +25535,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23296,7 +25568,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -23310,7 +25582,7 @@ async def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -23332,6 +25604,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -23339,12 +25613,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23359,7 +25638,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23375,8 +25654,8 @@ async def create_or_update_vnet_connection_slot( """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). + 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 @@ -23400,6 +25679,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -23410,6 +25690,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -23417,7 +25698,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23432,11 +25717,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23446,8 +25731,7 @@ async def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -23469,6 +25753,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -23476,12 +25762,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23492,7 +25783,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23508,8 +25799,8 @@ async def update_vnet_connection_slot( """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). + 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 @@ -23533,6 +25824,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -23543,6 +25835,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -23550,7 +25843,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23565,7 +25862,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23580,7 +25877,7 @@ async def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -23604,6 +25901,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -23612,12 +25911,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23634,7 +25938,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -23650,7 +25954,7 @@ async def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -23676,6 +25980,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -23687,6 +25992,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -23694,7 +26000,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23709,7 +26019,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -23725,7 +26035,7 @@ async def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -23751,6 +26061,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -23762,6 +26073,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -23769,7 +26081,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23784,7 +26100,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -23797,7 +26113,7 @@ def list_web_jobs_slot( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -23812,6 +26128,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23825,6 +26143,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -23837,6 +26156,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23854,7 +26174,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23868,7 +26192,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -23881,7 +26205,7 @@ async def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -23903,6 +26227,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -23910,12 +26236,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23930,7 +26261,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -23943,7 +26274,7 @@ def list_slot_differences_from_production( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -23958,6 +26289,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -23973,6 +26305,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -23987,6 +26320,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -24006,7 +26340,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24020,9 +26358,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24035,6 +26373,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -24043,6 +26382,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -24050,7 +26390,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24060,11 +26404,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24073,7 +26417,7 @@ async def begin_swap_slot_with_production( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -24093,8 +26437,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24106,6 +26451,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24127,10 +26473,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -24141,7 +26486,7 @@ def list_snapshots( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -24153,6 +26498,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24165,6 +26512,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -24176,6 +26524,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24193,7 +26542,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24207,7 +26560,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -24218,7 +26571,7 @@ def list_snapshots_from_dr_secondary( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -24230,6 +26583,8 @@ def list_snapshots_from_dr_secondary( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24242,6 +26597,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -24253,6 +26609,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24270,7 +26627,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24284,7 +26645,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control( @@ -24295,7 +26656,7 @@ async def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -24312,17 +26673,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24344,7 +26712,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -24360,6 +26728,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -24368,6 +26737,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -24375,7 +26745,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24396,7 +26770,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -24409,7 +26783,7 @@ async def begin_create_or_update_source_control( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -24431,8 +26805,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -24444,6 +26819,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24468,13 +26844,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24482,7 +26857,7 @@ async def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -24499,17 +26874,24 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -24520,7 +26902,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -24533,7 +26915,7 @@ async def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -24552,6 +26934,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -24560,6 +26943,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -24567,7 +26951,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24589,11 +26977,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24601,7 +26989,7 @@ async def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -24618,17 +27006,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24639,7 +27034,7 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore async def _start_network_trace_initial( @@ -24657,11 +27052,14 @@ async def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -24670,7 +27068,11 @@ async def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24688,7 +27090,7 @@ async def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -24703,17 +27105,17 @@ async def begin_start_network_trace( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -24729,7 +27131,8 @@ async def begin_start_network_trace( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -24743,6 +27146,7 @@ async def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -24766,13 +27170,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24780,7 +27183,7 @@ async def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -24797,17 +27200,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24818,11 +27228,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace( + async def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24830,7 +27240,7 @@ async def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -24847,17 +27257,24 @@ async def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24868,11 +27285,11 @@ async def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24880,7 +27297,7 @@ async def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -24897,17 +27314,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24918,11 +27342,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24930,7 +27354,7 @@ async def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -24947,17 +27371,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -24968,7 +27399,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -24980,7 +27411,7 @@ def list_triggered_web_jobs( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -24993,6 +27424,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25005,6 +27438,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -25016,6 +27450,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25033,7 +27468,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25047,7 +27486,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -25059,7 +27498,7 @@ async def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -25078,18 +27517,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25106,11 +27552,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25119,7 +27565,7 @@ async def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -25138,18 +27584,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -25160,7 +27613,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -25173,7 +27626,7 @@ def list_triggered_web_job_history( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -25188,6 +27641,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25201,6 +27656,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -25213,6 +27669,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25230,7 +27687,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25244,7 +27705,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -25257,8 +27718,7 @@ async def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -25279,6 +27739,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -25286,12 +27748,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25308,11 +27775,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25321,7 +27788,7 @@ async def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -25340,18 +27807,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25362,7 +27836,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -25375,7 +27849,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -25384,7 +27858,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -25393,6 +27867,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25405,6 +27881,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -25417,6 +27894,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -25435,7 +27913,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25449,7 +27931,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -25460,7 +27942,7 @@ async def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -25477,17 +27959,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25502,7 +27991,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -25515,7 +28004,7 @@ async def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -25534,18 +28023,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25560,7 +28056,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25575,8 +28071,8 @@ async def create_or_update_vnet_connection( """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). + 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 @@ -25597,6 +28093,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -25606,6 +28103,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -25613,7 +28111,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25628,11 +28130,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25641,8 +28143,7 @@ async def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -25661,18 +28162,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25683,7 +28191,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25698,8 +28206,8 @@ async def update_vnet_connection( """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). + 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 @@ -25720,6 +28228,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -25729,6 +28238,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -25736,7 +28246,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25751,7 +28265,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25765,7 +28279,7 @@ async def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -25786,6 +28300,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -25793,12 +28309,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25815,7 +28336,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25830,7 +28351,7 @@ async def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -25853,6 +28374,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25863,6 +28385,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -25870,7 +28393,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25885,7 +28412,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25900,7 +28427,7 @@ async def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -25923,6 +28450,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25933,6 +28461,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -25940,7 +28469,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25955,7 +28488,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -25967,7 +28500,7 @@ def list_web_jobs( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -25979,6 +28512,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25991,6 +28526,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -26002,6 +28538,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26019,7 +28556,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26033,7 +28574,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -26045,7 +28586,7 @@ async def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -26064,18 +28605,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26090,5 +28638,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_site_management_client_operations.py index 061965d7f88f..227471590e3c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -33,7 +32,7 @@ async def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -68,7 +74,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -79,7 +85,7 @@ async def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2019_08_01.models.User @@ -94,11 +100,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -106,7 +114,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +133,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -131,7 +143,7 @@ def list_source_controls( ) -> AsyncIterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -140,6 +152,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -149,6 +163,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -157,6 +172,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -174,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -188,7 +208,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -198,7 +218,7 @@ async def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -213,15 +233,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -236,7 +263,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -248,7 +275,7 @@ async def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -265,12 +292,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -278,7 +307,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -293,7 +326,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -305,11 +338,11 @@ def list_billing_meters( ) -> AsyncIterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -318,6 +351,8 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -328,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -339,6 +375,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -358,7 +395,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -372,7 +413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace_async async def check_name_availability( @@ -384,13 +425,13 @@ async def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -403,6 +444,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -410,6 +452,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -417,7 +460,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -432,7 +479,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace_async @@ -442,7 +489,7 @@ async def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -455,15 +502,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -478,7 +532,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -492,18 +546,18 @@ def list_geo_regions( ) -> AsyncIterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -511,6 +565,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -521,6 +577,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -534,6 +591,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -555,7 +613,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -569,7 +631,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -579,7 +641,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> AsyncIterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier @@ -590,6 +652,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -603,6 +666,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -615,6 +679,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -634,7 +699,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -648,7 +717,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -657,7 +726,7 @@ def list_premier_add_on_offers( ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -666,6 +735,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -676,6 +747,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -685,6 +757,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -702,7 +775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -716,7 +793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -725,7 +802,7 @@ async def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -738,15 +815,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -761,7 +845,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -773,8 +857,8 @@ async def verify_hosting_environment_vnet( """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. + 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 @@ -789,12 +873,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -802,7 +888,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -817,11 +907,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -829,7 +919,7 @@ async def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -846,6 +936,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -853,6 +944,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -860,7 +952,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -871,7 +967,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -883,7 +979,7 @@ async def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -900,6 +996,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -907,6 +1004,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -914,7 +1012,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -929,11 +1031,11 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -941,7 +1043,7 @@ async def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -958,6 +1060,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -965,6 +1068,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -972,7 +1076,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -983,5 +1091,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py index 73e016bee0bb..dc218232ebcf 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,33 +68,33 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -105,30 +106,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -297,31 +301,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -333,10 +338,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -344,21 +350,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -373,12 +379,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -386,23 +392,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -416,10 +422,11 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -427,21 +434,21 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -456,12 +463,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -469,23 +476,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -501,35 +508,35 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -545,35 +552,35 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -586,31 +593,32 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -624,35 +632,35 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -668,35 +676,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -709,31 +717,32 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -744,31 +753,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -779,35 +789,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -836,7 +847,7 @@ def list( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -845,6 +856,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -855,6 +868,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -864,6 +878,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -881,7 +896,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -895,17 +914,17 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -921,12 +940,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -934,7 +955,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -945,7 +970,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -956,7 +981,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -967,6 +992,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -978,6 +1005,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -988,6 +1016,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1005,7 +1034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1019,7 +1052,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1030,7 +1063,7 @@ def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -1047,17 +1080,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1072,7 +1112,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1088,6 +1128,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1096,6 +1137,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1103,7 +1145,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1121,7 +1167,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1134,7 +1180,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -1157,8 +1203,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1170,6 +1217,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1194,13 +1242,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1208,7 +1255,7 @@ def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -1225,17 +1272,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1246,7 +1300,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1259,7 +1313,7 @@ def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -1279,6 +1333,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1287,6 +1342,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1294,7 +1350,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1313,7 +1373,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1325,7 +1385,7 @@ def list_certificates( ) -> Iterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -1338,6 +1398,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1350,6 +1412,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1361,6 +1424,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1378,7 +1442,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,7 +1460,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1404,7 +1472,7 @@ def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -1423,18 +1491,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1449,7 +1524,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1466,6 +1541,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1475,6 +1551,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1482,7 +1559,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1500,7 +1581,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1514,7 +1595,7 @@ def begin_create_or_update_certificate( ) -> LROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1538,8 +1619,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1552,6 +1634,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1576,13 +1659,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1591,7 +1673,7 @@ def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -1610,18 +1692,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1632,7 +1721,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1646,7 +1735,7 @@ def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1668,6 +1757,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1677,6 +1767,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1684,7 +1775,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1703,11 +1798,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1716,7 +1811,7 @@ def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -1736,6 +1831,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1744,6 +1840,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1751,7 +1848,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1762,11 +1863,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1775,7 +1876,7 @@ def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1795,6 +1896,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1803,6 +1905,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1810,7 +1913,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1821,11 +1928,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1833,7 +1940,7 @@ def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1850,17 +1957,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1871,11 +1985,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1884,7 +1998,7 @@ def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1903,6 +2017,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1911,6 +2026,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1918,7 +2034,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1929,7 +2049,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1942,7 +2062,7 @@ def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1961,6 +2081,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1969,6 +2090,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1976,7 +2098,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1991,11 +2117,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -2003,7 +2129,7 @@ def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -2020,17 +2146,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2041,7 +2174,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2053,7 +2186,7 @@ def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -2070,17 +2203,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2095,7 +2235,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2107,7 +2247,7 @@ def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -2124,17 +2264,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2149,5 +2296,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_environments_operations.py index 308e11376a33..74c1dbf41fd4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,33 +183,34 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -296,31 +301,32 @@ def build_get_vip_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -334,35 +340,35 @@ def build_change_vnet_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -375,31 +381,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -411,10 +418,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -422,21 +430,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -447,31 +455,32 @@ def build_get_inbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -482,31 +491,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -517,31 +527,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -555,35 +566,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -599,35 +610,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -641,10 +652,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -652,21 +664,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -677,31 +689,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -712,31 +725,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -747,31 +761,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -782,31 +797,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -817,31 +833,32 @@ def build_get_outbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -852,31 +869,32 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -887,31 +905,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -922,31 +941,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -959,33 +979,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -996,31 +1017,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1033,33 +1055,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1070,31 +1093,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1106,10 +1130,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1117,21 +1142,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1146,12 +1171,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1159,23 +1184,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1192,12 +1217,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1205,23 +1230,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1236,10 +1261,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1248,21 +1274,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1274,10 +1300,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1285,21 +1312,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1311,10 +1338,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1322,21 +1350,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1348,10 +1376,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1359,25 +1388,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1406,7 +1435,7 @@ def list( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -1415,6 +1444,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1425,6 +1456,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1434,6 +1466,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1451,7 +1484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1465,7 +1502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1475,7 +1512,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -1486,6 +1523,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1497,6 +1536,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1507,6 +1547,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1524,7 +1565,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1538,7 +1583,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1549,7 +1594,7 @@ def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -1566,17 +1611,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1591,7 +1643,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1607,6 +1659,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1615,6 +1668,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1622,7 +1676,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1643,7 +1701,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1656,7 +1714,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -1679,8 +1737,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1692,6 +1751,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1716,12 +1776,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1734,18 +1793,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1755,11 +1821,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1768,7 +1834,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -1789,7 +1855,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1801,6 +1868,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1821,10 +1889,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -1836,7 +1903,7 @@ def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -1856,6 +1923,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -1864,6 +1932,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1871,7 +1940,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1893,7 +1966,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1905,7 +1978,7 @@ def list_capacities( ) -> Iterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -1918,6 +1991,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1930,6 +2005,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -1941,6 +2017,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1958,7 +2035,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1972,7 +2053,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def get_vip_info( @@ -1983,7 +2064,7 @@ def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -2000,17 +2081,24 @@ def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2025,7 +2113,7 @@ def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore def _change_vnet_initial( @@ -2041,6 +2129,7 @@ def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -2049,6 +2138,7 @@ def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -2056,7 +2146,11 @@ def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2074,7 +2168,7 @@ def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2087,7 +2181,7 @@ def begin_change_vnet( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -2110,6 +2204,7 @@ def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -2125,6 +2220,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -2139,6 +2235,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -2158,7 +2255,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2169,7 +2270,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2181,6 +2282,7 @@ def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2191,8 +2293,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -2208,10 +2309,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2223,7 +2323,7 @@ def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -2240,17 +2340,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2265,7 +2372,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2278,7 +2385,7 @@ def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -2297,18 +2404,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2323,7 +2437,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2335,8 +2449,7 @@ def get_inbound_network_dependencies_endpoints( ) -> Iterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -2349,6 +2462,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2361,6 +2476,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2372,6 +2488,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2389,7 +2506,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2403,7 +2524,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2414,7 +2535,7 @@ def list_multi_role_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -2426,6 +2547,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2438,6 +2561,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2449,6 +2573,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2466,7 +2591,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2480,7 +2609,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2491,7 +2620,7 @@ def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -2508,17 +2637,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2533,7 +2669,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2549,6 +2685,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2557,6 +2694,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2564,7 +2702,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2582,7 +2724,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2595,7 +2737,7 @@ def begin_create_or_update_multi_role_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -2616,8 +2758,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2629,6 +2772,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2653,10 +2797,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -2668,7 +2811,7 @@ def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -2687,6 +2830,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2695,6 +2839,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -2702,7 +2847,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2721,7 +2870,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2735,8 +2884,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -2751,6 +2900,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2764,6 +2915,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2776,6 +2928,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2793,7 +2946,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2807,7 +2964,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -2818,7 +2975,7 @@ def list_multi_role_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -2831,6 +2988,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2843,6 +3002,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2854,6 +3014,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2871,7 +3032,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2885,7 +3050,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -2896,7 +3061,7 @@ def list_multi_role_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -2907,6 +3072,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2919,6 +3086,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -2930,6 +3098,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2947,7 +3116,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2961,7 +3134,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -2972,7 +3145,7 @@ def list_multi_role_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -2983,6 +3156,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2995,6 +3170,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3006,6 +3182,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3023,7 +3200,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3037,7 +3218,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3048,7 +3229,7 @@ def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -3065,17 +3246,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3090,7 +3278,7 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -3102,8 +3290,7 @@ def get_outbound_network_dependencies_endpoints( ) -> Iterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -3116,6 +3303,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3128,6 +3317,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -3139,6 +3329,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3156,7 +3347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3170,10 +3365,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3181,7 +3376,7 @@ def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -3198,17 +3393,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -3219,7 +3421,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -3234,17 +3436,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3262,7 +3471,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3274,7 +3483,7 @@ def begin_resume( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -3295,6 +3504,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3307,6 +3518,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -3318,6 +3530,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3335,7 +3548,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3346,7 +3563,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3357,6 +3574,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3366,8 +3584,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3383,10 +3600,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3398,7 +3614,7 @@ def list_app_service_plans( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -3411,6 +3627,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3423,6 +3641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -3434,6 +3653,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3451,7 +3671,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3465,7 +3689,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -3477,19 +3701,22 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3502,6 +3729,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -3514,6 +3742,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -3532,7 +3761,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3546,7 +3779,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -3560,17 +3793,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3588,7 +3828,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -3600,7 +3840,7 @@ def begin_suspend( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -3621,6 +3861,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3633,6 +3875,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -3644,6 +3887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3661,7 +3905,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3672,7 +3920,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3683,6 +3931,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3692,8 +3941,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3709,10 +3957,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -3725,7 +3972,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -3734,7 +3981,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -3743,6 +3990,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3755,6 +4004,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -3767,6 +4017,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -3785,7 +4036,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3799,7 +4054,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -3810,7 +4065,7 @@ def list_worker_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -3822,6 +4077,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3834,6 +4091,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -3845,6 +4103,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3862,7 +4121,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3876,7 +4139,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -3888,7 +4151,7 @@ def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -3907,18 +4170,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3933,7 +4203,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -3950,6 +4220,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3959,6 +4230,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -3966,7 +4238,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3984,7 +4260,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -3998,7 +4274,7 @@ def begin_create_or_update_worker_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -4021,8 +4297,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4035,6 +4312,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4059,10 +4337,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4075,7 +4352,7 @@ def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -4096,6 +4373,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4105,6 +4383,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4112,7 +4391,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4131,7 +4414,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4145,8 +4428,7 @@ def list_worker_pool_instance_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -4163,6 +4445,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4177,6 +4461,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4190,6 +4475,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4207,7 +4493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4221,7 +4511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -4233,7 +4523,7 @@ def list_web_worker_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -4248,6 +4538,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4261,6 +4553,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4273,6 +4566,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4290,7 +4584,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4304,7 +4602,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -4316,7 +4614,7 @@ def list_worker_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -4329,6 +4627,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4342,6 +4642,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -4354,6 +4655,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4371,7 +4673,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4385,7 +4691,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -4397,7 +4703,7 @@ def list_web_worker_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -4410,6 +4716,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4423,6 +4731,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -4435,6 +4744,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4452,7 +4762,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4466,4 +4780,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_plans_operations.py index 1b405cb1e478..cc0742d08e38 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,31 +185,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +303,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -310,21 +316,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -337,10 +343,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -349,21 +356,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -376,10 +383,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -388,21 +396,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -415,10 +423,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -427,21 +436,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -452,31 +461,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -487,31 +497,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -524,33 +535,34 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -565,37 +577,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,31 +619,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -643,33 +657,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -680,31 +695,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -716,10 +732,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -727,21 +744,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -754,10 +771,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -766,21 +784,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -796,12 +814,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -810,23 +828,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -840,10 +858,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -851,21 +870,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -878,10 +897,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -890,21 +910,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -920,12 +940,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -934,23 +954,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -965,10 +985,11 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -977,21 +998,21 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1028,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1021,23 +1042,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1051,10 +1072,11 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1062,25 +1084,25 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1110,7 +1132,7 @@ def list( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -1123,6 +1145,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1133,6 +1157,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1143,6 +1168,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1161,7 +1187,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1175,7 +1205,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1185,7 +1215,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -1196,6 +1226,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1207,6 +1239,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1217,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1234,7 +1268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1248,7 +1286,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1259,7 +1297,7 @@ def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -1276,17 +1314,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1303,7 +1348,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1319,6 +1364,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1327,6 +1373,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1334,7 +1381,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1352,7 +1403,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1365,7 +1416,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -1386,8 +1437,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1399,6 +1451,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1423,13 +1476,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1437,7 +1489,7 @@ def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -1454,17 +1506,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1475,7 +1534,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1488,7 +1547,7 @@ def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -1507,6 +1566,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1515,6 +1575,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1522,7 +1583,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1541,7 +1606,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1553,7 +1618,7 @@ def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -1570,17 +1635,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1595,7 +1667,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1609,7 +1681,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -1630,6 +1702,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1637,12 +1711,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1657,11 +1736,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1671,7 +1750,7 @@ def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -1692,6 +1771,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1699,12 +1780,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1715,7 +1801,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1729,7 +1815,7 @@ def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -1750,6 +1836,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1757,12 +1845,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1777,7 +1870,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1791,7 +1884,7 @@ def list_web_apps_by_hybrid_connection( ) -> Iterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -1806,6 +1899,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1820,6 +1915,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1833,6 +1929,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1850,7 +1947,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1864,7 +1965,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1875,7 +1976,7 @@ def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -1892,17 +1993,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1917,7 +2025,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1929,7 +2037,7 @@ def list_hybrid_connections( ) -> Iterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -1942,6 +2050,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1954,6 +2064,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -1965,6 +2076,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1982,7 +2094,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1996,10 +2112,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2008,7 +2124,7 @@ def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -2029,18 +2145,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2051,7 +2174,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2066,7 +2189,7 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -2074,18 +2197,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2098,6 +2224,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2112,6 +2239,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2132,7 +2260,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2146,7 +2278,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2157,7 +2289,7 @@ def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -2174,17 +2306,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2199,7 +2338,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2212,14 +2351,15 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2228,6 +2368,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2240,6 +2382,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2252,6 +2395,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2270,7 +2414,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2284,7 +2432,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2295,7 +2443,7 @@ def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -2312,17 +2460,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2337,7 +2492,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2350,7 +2505,7 @@ def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -2369,18 +2524,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2397,7 +2559,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2411,7 +2573,7 @@ def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -2432,6 +2594,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2439,12 +2603,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2459,7 +2628,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2474,7 +2643,7 @@ def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -2497,6 +2666,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2507,6 +2677,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2514,7 +2685,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2529,7 +2704,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2542,8 +2717,7 @@ def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -2562,18 +2736,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2588,7 +2769,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2602,7 +2783,7 @@ def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -2623,6 +2804,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2630,12 +2813,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2652,7 +2840,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2667,7 +2855,7 @@ def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2690,6 +2878,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2700,6 +2889,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2707,7 +2897,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2724,11 +2918,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2738,7 +2932,7 @@ def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -2759,6 +2953,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2766,12 +2962,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2782,7 +2983,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2797,7 +2998,7 @@ def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2820,6 +3021,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2830,6 +3032,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -2837,7 +3040,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2854,11 +3061,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2867,7 +3074,7 @@ def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -2886,18 +3093,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2908,5 +3122,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificate_registration_provider_operations.py index e8d8f1e3dd4d..09127dc8baf7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificates_operations.py index dba9ce49c627..04e72f6cb551 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -135,35 +138,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,31 +179,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -214,35 +218,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -277,7 +281,7 @@ def list( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -285,6 +289,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -295,6 +301,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -304,6 +311,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -321,7 +329,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -335,7 +347,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -345,7 +357,7 @@ def list_by_resource_group( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -355,6 +367,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -366,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -376,6 +391,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -393,7 +409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -407,7 +427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -418,7 +438,7 @@ def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -435,17 +455,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,7 +487,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -473,7 +500,7 @@ def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -492,6 +519,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -500,6 +528,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -507,7 +536,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -522,11 +555,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -534,7 +567,7 @@ def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -551,17 +584,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -572,7 +612,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -585,7 +625,7 @@ def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -604,6 +644,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -612,6 +653,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -619,7 +661,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -634,5 +680,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_deleted_web_apps_operations.py index de0b8718eaae..2b4c01e94260 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_get_deleted_web_app_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -153,7 +156,7 @@ def list( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -162,6 +165,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -172,6 +177,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -181,6 +187,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -198,7 +205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -222,7 +233,7 @@ def list_by_location( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -233,6 +244,8 @@ def list_by_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -244,6 +257,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -254,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -271,7 +286,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -285,7 +304,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace def get_deleted_web_app_by_location( @@ -296,7 +315,7 @@ def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -313,17 +332,24 @@ def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,5 +364,5 @@ def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_diagnostics_operations.py index d84da5391865..40ea8e1117ba 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -967,7 +989,7 @@ def list_hosting_environment_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1049,7 +1079,7 @@ def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -1057,11 +1087,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1074,12 +1104,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1088,7 +1121,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1103,7 +1140,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1115,7 +1152,7 @@ def list_site_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1128,6 +1165,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1140,6 +1179,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1151,6 +1191,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1168,7 +1209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1182,7 +1227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1197,7 +1242,7 @@ def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1205,11 +1250,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1222,12 +1267,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1236,7 +1284,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1303,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1263,7 +1315,7 @@ def list_site_diagnostic_categories( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1276,6 +1328,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1288,6 +1342,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1299,6 +1354,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1316,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1330,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1342,7 +1402,7 @@ def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1361,18 +1421,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1454,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1400,7 +1467,7 @@ def list_site_analyses( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1415,6 +1482,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1428,6 +1497,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1440,6 +1510,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1457,7 +1528,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,7 +1546,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1484,7 +1559,7 @@ def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1505,6 +1580,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1512,12 +1589,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1614,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1549,7 +1631,7 @@ def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1559,11 +1641,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1576,6 +1658,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1583,6 +1667,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1591,7 +1676,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1695,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1619,7 +1708,7 @@ def list_site_detectors( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1634,6 +1723,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1647,6 +1738,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1751,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1769,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1787,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1703,7 +1800,7 @@ def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1724,6 +1821,8 @@ def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -1731,12 +1830,17 @@ def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1751,7 +1855,7 @@ def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1768,7 +1872,7 @@ def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1778,11 +1882,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1795,6 +1899,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1802,6 +1908,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1810,7 +1917,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1825,7 +1936,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1838,7 +1949,7 @@ def list_site_detector_responses_slot( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1853,6 +1964,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1866,6 +1979,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1878,6 +1992,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1895,7 +2010,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1909,7 +2028,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1925,7 +2044,7 @@ def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1935,11 +2054,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1952,6 +2071,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1959,6 +2080,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1967,7 +2089,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1982,7 +2108,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1995,7 +2121,7 @@ def list_site_diagnostic_categories_slot( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -2010,6 +2136,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2023,6 +2151,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2164,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2182,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2200,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2079,7 +2213,7 @@ def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -2100,6 +2234,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2107,12 +2243,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2127,7 +2268,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2141,7 +2282,7 @@ def list_site_analyses_slot( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -2158,6 +2299,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2172,6 +2315,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2185,6 +2329,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2202,7 +2347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2216,7 +2365,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2230,7 +2379,7 @@ def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -2253,6 +2402,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2261,12 +2412,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2281,7 +2437,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2299,7 +2455,7 @@ def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2311,11 +2467,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2328,6 +2484,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2336,6 +2494,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2344,7 +2503,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2359,7 +2522,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2373,7 +2536,7 @@ def list_site_detectors_slot( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2390,6 +2553,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2404,6 +2569,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2417,6 +2583,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2434,7 +2601,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2448,7 +2619,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2462,7 +2633,7 @@ def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2485,6 +2656,8 @@ def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2493,12 +2666,17 @@ def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2513,7 +2691,7 @@ def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2531,7 +2709,7 @@ def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2543,11 +2721,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2560,6 +2738,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2568,6 +2748,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2576,7 +2757,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2591,5 +2776,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domain_registration_provider_operations.py index 3d2192aed7f9..a0b6da44478b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domains_operations.py index 81cec989cea2..14adb72d12ee 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,33 +295,34 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,35 +336,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -372,31 +377,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -408,10 +414,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -419,21 +426,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -448,12 +455,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -461,23 +468,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -491,10 +498,11 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -502,21 +510,21 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -531,12 +539,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -544,23 +552,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -573,31 +581,32 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,7 +640,7 @@ def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier @@ -646,12 +655,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -659,7 +670,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +689,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -684,13 +699,15 @@ def list( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -701,6 +718,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -710,6 +728,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -727,7 +746,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -741,7 +764,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -750,7 +773,7 @@ def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -763,15 +786,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -786,7 +816,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -797,7 +827,7 @@ def list_recommendations( ) -> Iterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2019_08_01.models.DomainRecommendationSearchParameters @@ -808,6 +838,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -821,6 +852,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -833,6 +865,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -852,7 +885,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -866,7 +903,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -876,7 +913,7 @@ def list_by_resource_group( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -885,6 +922,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -896,6 +935,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -906,6 +946,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -923,7 +964,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,7 +982,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -948,7 +993,7 @@ def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -965,17 +1010,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -990,7 +1042,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -1006,6 +1058,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -1014,6 +1067,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1021,7 +1075,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1039,7 +1097,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1052,7 +1110,7 @@ def begin_create_or_update( ) -> LROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -1072,8 +1130,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1085,6 +1144,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1109,13 +1169,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1124,7 +1183,7 @@ def delete( ) -> None: """Delete a domain. - Description for 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 @@ -1144,18 +1203,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1166,7 +1232,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1179,7 +1245,7 @@ def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -1198,6 +1264,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1206,6 +1273,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1213,7 +1281,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1304,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1244,7 +1316,7 @@ def list_ownership_identifiers( ) -> Iterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -1257,6 +1329,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1269,6 +1343,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1280,6 +1355,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1297,7 +1373,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1311,7 +1391,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1323,7 +1403,7 @@ def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -1342,18 +1422,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,7 +1455,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1383,8 +1470,8 @@ def create_or_update_ownership_identifier( """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. + 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 @@ -1405,6 +1492,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1414,6 +1502,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1421,7 +1510,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1436,11 +1529,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1449,7 +1542,7 @@ def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -1468,18 +1561,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1490,7 +1590,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1505,8 +1605,8 @@ def update_ownership_identifier( """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. + 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 @@ -1527,6 +1627,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1536,6 +1637,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1543,7 +1645,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1558,11 +1664,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1570,7 +1676,7 @@ def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1587,17 +1693,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1608,5 +1721,5 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_provider_operations.py index 863cc074f249..ef29906c78d2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum4"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,24 +59,25 @@ def build_get_available_stacks_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -86,31 +88,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum5"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -144,9 +147,9 @@ def get_available_stacks( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2019_08_01.models.Enum4 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -155,6 +158,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +169,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -173,6 +179,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -191,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -205,7 +216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -215,8 +226,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -224,6 +235,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -233,6 +246,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -241,6 +255,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -258,7 +273,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -272,7 +291,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -282,9 +301,9 @@ def get_available_stacks_on_prem( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2019_08_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -293,6 +312,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -303,6 +324,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -313,6 +335,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -331,7 +354,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -345,4 +372,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_recommendations_operations.py index 9a56143f5599..b45e7f2f308b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,29 +69,30 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -100,30 +102,31 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,36 @@ def build_list_history_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +183,36 @@ def build_list_recommended_rules_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,32 +225,33 @@ def build_disable_all_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,32 +264,33 @@ def build_reset_all_filters_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +305,11 @@ def build_get_rule_details_by_hosting_environment_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), @@ -309,25 +317,25 @@ def build_get_rule_details_by_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -341,10 +349,11 @@ def build_disable_recommendation_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -352,22 +361,22 @@ def build_disable_recommendation_for_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -381,35 +390,36 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -423,35 +433,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -462,31 +473,32 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -497,31 +509,32 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,10 +549,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -547,25 +561,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -577,10 +591,11 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -588,21 +603,21 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -637,14 +652,14 @@ def list( ) -> Iterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -653,6 +668,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -663,6 +680,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -674,6 +692,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -693,7 +712,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -707,16 +730,16 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -729,15 +752,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -748,19 +778,18 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -775,16 +804,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -795,7 +831,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -809,7 +845,7 @@ def list_history_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -820,7 +856,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -829,6 +865,8 @@ def list_history_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -841,6 +879,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -854,6 +893,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -873,7 +913,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -887,7 +931,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -900,7 +944,7 @@ def list_recommended_rules_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -910,7 +954,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -919,6 +963,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -931,6 +977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -944,6 +991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -963,7 +1011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,10 +1029,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_hosting_environment( + def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -989,7 +1041,7 @@ def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1008,18 +1060,25 @@ def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1030,11 +1089,11 @@ def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_hosting_environment( + def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1043,7 +1102,7 @@ def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1062,18 +1121,25 @@ def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1084,7 +1150,7 @@ def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1099,7 +1165,7 @@ def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1108,10 +1174,10 @@ def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1124,12 +1190,15 @@ def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -1137,7 +1206,11 @@ def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1152,11 +1225,11 @@ def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_hosting_environment( + def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1166,7 +1239,7 @@ def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1187,19 +1260,26 @@ def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,7 +1290,7 @@ def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -1224,7 +1304,7 @@ def list_history_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -1235,7 +1315,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1244,6 +1324,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1256,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -1269,6 +1352,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -1288,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1302,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -1315,7 +1403,7 @@ def list_recommended_rules_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -1325,7 +1413,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1334,6 +1422,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1346,6 +1436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -1359,6 +1450,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -1378,7 +1470,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,10 +1488,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1403,7 +1499,7 @@ def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1420,17 +1516,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1441,11 +1544,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1453,7 +1556,7 @@ def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1470,17 +1573,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1491,7 +1601,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1506,7 +1616,7 @@ def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1515,10 +1625,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1531,12 +1641,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -1544,7 +1657,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1559,11 +1676,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1572,7 +1689,7 @@ def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1591,18 +1708,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,5 +1737,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_resource_health_metadata_operations.py index 7729c494a852..23332c3e57be 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -262,7 +268,7 @@ def list( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -331,8 +345,7 @@ def list_by_resource_group( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -343,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -354,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -364,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -381,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -406,8 +427,7 @@ def list_by_site( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -420,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -432,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -443,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -460,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -474,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -485,7 +513,7 @@ def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -502,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -527,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -540,8 +575,7 @@ def list_by_site_slot( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -556,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -581,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -598,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -624,7 +666,7 @@ def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -643,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_static_sites_operations.py index 4d9726d62f70..5b9d39610949 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_static_sites_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -135,35 +138,35 @@ def build_create_or_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,31 +179,32 @@ def build_delete_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -214,35 +218,35 @@ def build_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -256,10 +260,11 @@ def build_list_static_site_users_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -267,21 +272,21 @@ def build_list_static_site_users_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -294,10 +299,11 @@ def build_delete_static_site_user_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -306,21 +312,21 @@ def build_delete_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -336,12 +342,12 @@ def build_update_static_site_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -350,23 +356,23 @@ def build_update_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -379,31 +385,32 @@ def build_get_static_site_builds_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -415,10 +422,11 @@ def build_get_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -426,21 +434,21 @@ def build_get_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -452,10 +460,11 @@ def build_delete_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -463,21 +472,21 @@ def build_delete_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -492,12 +501,12 @@ def build_create_or_update_static_site_build_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -505,23 +514,23 @@ def build_create_or_update_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -535,10 +544,11 @@ def build_list_static_site_build_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -546,21 +556,21 @@ def build_list_static_site_build_functions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -572,10 +582,11 @@ def build_list_static_site_build_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -583,21 +594,21 @@ def build_list_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -611,35 +622,35 @@ def build_create_or_update_static_site_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -655,35 +666,35 @@ def build_create_user_roles_invitation_link_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -696,31 +707,32 @@ def build_list_static_site_custom_domains_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -732,10 +744,11 @@ def build_create_or_update_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -743,21 +756,21 @@ def build_create_or_update_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -769,10 +782,11 @@ def build_delete_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -780,21 +794,21 @@ def build_delete_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -806,10 +820,11 @@ def build_validate_custom_domain_can_be_added_to_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -817,21 +832,21 @@ def build_validate_custom_domain_can_be_added_to_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -842,31 +857,32 @@ def build_detach_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -877,31 +893,32 @@ def build_list_static_site_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -912,31 +929,32 @@ def build_list_static_site_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -947,31 +965,32 @@ def build_list_static_site_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -985,41 +1004,41 @@ def build_reset_static_site_api_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs ) -class StaticSitesOperations(object): +class StaticSitesOperations(object): # pylint: disable=too-many-public-methods """StaticSitesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1048,7 +1067,7 @@ def list( ) -> Iterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -1056,6 +1075,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1066,6 +1087,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1075,6 +1097,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1092,7 +1115,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1106,7 +1133,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -1116,7 +1143,7 @@ def get_static_sites_by_resource_group( ) -> Iterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -1126,6 +1153,8 @@ def get_static_sites_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1137,6 +1166,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1147,6 +1177,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1164,7 +1195,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1178,7 +1213,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_site( @@ -1189,7 +1224,7 @@ def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -1206,17 +1241,24 @@ def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1231,7 +1273,7 @@ def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1244,8 +1286,7 @@ def create_or_update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -1264,6 +1305,7 @@ def create_or_update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -1272,6 +1314,7 @@ def create_or_update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site.metadata['url'], @@ -1279,7 +1322,11 @@ def create_or_update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1298,11 +1345,11 @@ def create_or_update_static_site( return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace - def delete_static_site( + def delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1310,7 +1357,7 @@ def delete_static_site( ) -> None: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1327,17 +1374,24 @@ def delete_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1348,7 +1402,7 @@ def delete_static_site( if cls: return cls(pipeline_response, None, {}) - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1361,8 +1415,7 @@ def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -1381,6 +1434,7 @@ def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -1389,6 +1443,7 @@ def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -1396,7 +1451,11 @@ def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1415,7 +1474,7 @@ def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1428,7 +1487,7 @@ def list_static_site_users( ) -> Iterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -1443,6 +1502,8 @@ def list_static_site_users( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1456,6 +1517,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -1468,6 +1530,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1485,7 +1548,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1499,10 +1566,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace - def delete_static_site_user( + def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1512,7 +1579,7 @@ def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -1533,6 +1600,8 @@ def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -1540,12 +1609,17 @@ def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1556,7 +1630,7 @@ def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -1571,7 +1645,7 @@ def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -1595,6 +1669,7 @@ def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -1605,6 +1680,7 @@ def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -1612,7 +1688,11 @@ def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1627,7 +1707,7 @@ def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -1639,7 +1719,7 @@ def get_static_site_builds( ) -> Iterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -1652,6 +1732,8 @@ def get_static_site_builds( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1664,6 +1746,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -1675,6 +1758,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1692,7 +1776,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1706,7 +1794,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace def get_static_site_build( @@ -1718,7 +1806,7 @@ def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -1737,18 +1825,25 @@ def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1763,11 +1858,11 @@ def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace - def delete_static_site_build( + def delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1776,7 +1871,7 @@ def delete_static_site_build( ) -> None: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1795,18 +1890,25 @@ def delete_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1817,7 +1919,7 @@ def delete_static_site_build( if cls: return cls(pipeline_response, None, {}) - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace @@ -1831,7 +1933,7 @@ def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -1852,6 +1954,7 @@ def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1861,6 +1964,7 @@ def create_or_update_static_site_build_function_app_settings( name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -1868,7 +1972,11 @@ def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1887,7 +1995,7 @@ def create_or_update_static_site_build_function_app_settings( 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'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings"} # type: ignore @distributed_trace @@ -1900,7 +2008,7 @@ def list_static_site_build_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -1915,6 +2023,8 @@ def list_static_site_build_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1928,6 +2038,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -1940,6 +2051,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1957,7 +2069,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1971,7 +2087,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions"} # type: ignore @distributed_trace def list_static_site_build_function_app_settings( @@ -1983,7 +2099,7 @@ def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2002,18 +2118,25 @@ def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2032,7 +2155,7 @@ def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -2045,7 +2168,7 @@ def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -2064,6 +2187,7 @@ def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -2072,6 +2196,7 @@ def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -2079,7 +2204,11 @@ def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2098,7 +2227,7 @@ def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace @@ -2111,7 +2240,7 @@ def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -2131,6 +2260,7 @@ def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -2139,6 +2269,7 @@ def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -2146,7 +2277,11 @@ def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2161,7 +2296,7 @@ def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -2173,7 +2308,7 @@ def list_static_site_custom_domains( ) -> Iterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -2186,6 +2321,8 @@ def list_static_site_custom_domains( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2198,6 +2335,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -2209,6 +2347,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2226,7 +2365,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2240,7 +2383,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace def create_or_update_static_site_custom_domain( @@ -2252,8 +2395,7 @@ def create_or_update_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -2272,18 +2414,25 @@ def create_or_update_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_create_or_update_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.create_or_update_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2302,11 +2451,11 @@ def create_or_update_static_site_custom_domain( return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def delete_static_site_custom_domain( + def delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2315,7 +2464,7 @@ def delete_static_site_custom_domain( ) -> None: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2334,18 +2483,25 @@ def delete_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2356,11 +2512,11 @@ def delete_static_site_custom_domain( if cls: return cls(pipeline_response, None, {}) - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def validate_custom_domain_can_be_added_to_static_site( + def validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2369,7 +2525,7 @@ def validate_custom_domain_can_be_added_to_static_site( ) -> None: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -2388,18 +2544,25 @@ def validate_custom_domain_can_be_added_to_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_validate_custom_domain_can_be_added_to_static_site_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.validate_custom_domain_can_be_added_to_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2410,11 +2573,11 @@ def validate_custom_domain_can_be_added_to_static_site( if cls: return cls(pipeline_response, None, {}) - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace - def detach_static_site( + def detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2422,7 +2585,7 @@ def detach_static_site( ) -> None: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2439,17 +2602,24 @@ def detach_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_detach_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2460,7 +2630,7 @@ def detach_static_site( if cls: return cls(pipeline_response, None, {}) - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace @@ -2472,7 +2642,7 @@ def list_static_site_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -2485,6 +2655,8 @@ def list_static_site_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2497,6 +2669,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -2508,6 +2681,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2525,7 +2699,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2539,7 +2717,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace def list_static_site_function_app_settings( @@ -2550,7 +2728,7 @@ def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2567,17 +2745,24 @@ def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2596,7 +2781,7 @@ def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -2608,7 +2793,7 @@ def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -2625,17 +2810,24 @@ def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2650,11 +2842,11 @@ def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace - def reset_static_site_api_key( + def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2663,7 +2855,7 @@ def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -2683,6 +2875,7 @@ def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -2691,6 +2884,7 @@ def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -2698,7 +2892,11 @@ def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2709,5 +2907,5 @@ def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_top_level_domains_operations.py index ce753425dfd3..97bb310d9a00 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -161,7 +163,7 @@ def list( ) -> Iterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -220,7 +230,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -230,7 +240,7 @@ def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -245,16 +255,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,7 +286,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -281,7 +298,7 @@ def list_agreements( ) -> Iterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -294,6 +311,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -308,6 +326,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -321,6 +340,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -340,7 +360,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,4 +378,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_apps_operations.py index 098083bb0c5f..202e482f9c25 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,35 +188,36 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,35 +231,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -270,33 +274,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -310,35 +315,35 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -354,35 +359,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -395,31 +400,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -431,10 +437,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -442,21 +449,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -468,10 +475,11 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -479,21 +487,21 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -508,12 +516,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -521,23 +529,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -554,12 +562,12 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -567,23 +575,23 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -596,31 +604,32 @@ def build_get_basic_publishing_credentials_policies_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,31 +640,32 @@ def build_get_ftp_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -669,35 +679,35 @@ def build_update_ftp_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -710,31 +720,32 @@ def build_get_scm_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -748,35 +759,35 @@ def build_update_scm_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -789,31 +800,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -827,35 +839,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -868,31 +880,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -906,35 +919,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -947,31 +960,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -985,35 +999,35 @@ def build_update_azure_storage_accounts_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1026,31 +1040,32 @@ def build_list_azure_storage_accounts_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1064,35 +1079,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1105,31 +1120,32 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1140,31 +1156,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1175,31 +1192,32 @@ def build_get_app_settings_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1211,10 +1229,11 @@ def build_get_app_setting_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1222,21 +1241,21 @@ def build_get_app_setting_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1250,35 +1269,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1291,31 +1310,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1326,31 +1346,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1364,35 +1385,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1408,35 +1429,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1449,31 +1470,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1484,31 +1506,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1522,35 +1545,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1563,31 +1586,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1598,31 +1622,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1636,35 +1661,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1677,31 +1702,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1715,35 +1741,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1759,35 +1785,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1800,31 +1826,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1836,10 +1863,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1847,21 +1875,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1873,10 +1901,11 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1884,21 +1913,21 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1909,31 +1938,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1944,31 +1974,32 @@ def build_get_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1979,31 +2010,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2015,10 +2047,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2026,21 +2059,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2052,10 +2085,11 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2063,21 +2097,21 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2089,10 +2123,11 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2100,21 +2135,21 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2126,10 +2161,11 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2137,21 +2173,21 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2162,31 +2198,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2198,10 +2235,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2209,21 +2247,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2238,12 +2276,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2251,23 +2289,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2281,10 +2319,11 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2292,21 +2331,21 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2318,10 +2357,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2329,21 +2369,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2357,35 +2397,35 @@ def build_discover_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2398,31 +2438,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2434,10 +2475,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2445,21 +2487,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2474,12 +2516,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2487,23 +2529,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2517,10 +2559,11 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2528,21 +2571,21 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2557,12 +2600,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2570,23 +2613,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2599,31 +2642,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2637,35 +2681,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2678,31 +2722,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2713,31 +2758,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2748,31 +2794,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2784,10 +2831,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2795,21 +2843,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2824,12 +2872,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2837,23 +2885,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2867,10 +2915,11 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2878,21 +2927,21 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2908,12 +2957,12 @@ def build_create_or_update_function_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2922,23 +2971,23 @@ def build_create_or_update_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2953,10 +3002,11 @@ def build_delete_function_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2965,21 +3015,21 @@ def build_delete_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2991,10 +3041,11 @@ def build_list_function_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3002,21 +3053,21 @@ def build_list_function_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3028,10 +3079,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3039,21 +3091,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3064,31 +3116,32 @@ def build_list_host_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3099,31 +3152,32 @@ def build_list_sync_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3134,31 +3188,32 @@ def build_sync_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3174,12 +3229,12 @@ def build_create_or_update_host_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3188,23 +3243,23 @@ def build_create_or_update_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3219,10 +3274,11 @@ def build_delete_host_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3231,21 +3287,21 @@ def build_delete_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3256,31 +3312,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3292,10 +3349,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3303,21 +3361,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3332,12 +3390,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3345,23 +3403,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3375,10 +3433,11 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3386,21 +3445,21 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3413,10 +3472,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3425,21 +3485,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3455,12 +3515,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3469,23 +3529,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3500,10 +3560,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3512,21 +3573,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3542,12 +3603,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3556,23 +3617,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3585,31 +3646,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3620,31 +3682,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3656,10 +3719,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3667,21 +3731,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3696,12 +3760,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3709,23 +3773,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3739,10 +3803,11 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3750,21 +3815,21 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3779,12 +3844,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3792,23 +3857,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3821,31 +3886,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3857,10 +3923,11 @@ def build_get_instance_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3868,21 +3935,21 @@ def build_get_instance_info_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3894,10 +3961,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3905,21 +3973,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3934,12 +4002,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3947,23 +4015,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3977,10 +4045,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3988,21 +4057,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4014,10 +4083,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4025,21 +4095,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4052,10 +4122,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4064,21 +4135,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4091,10 +4162,11 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4103,21 +4175,21 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4130,10 +4202,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4142,21 +4215,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4169,10 +4242,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4181,21 +4255,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4209,10 +4283,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4222,21 +4297,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4249,10 +4324,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4261,21 +4337,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4286,31 +4362,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4321,31 +4398,32 @@ def build_list_site_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4356,31 +4434,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4395,36 +4474,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4440,35 +4519,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4481,31 +4560,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4516,31 +4596,32 @@ def build_get_swift_virtual_network_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4554,35 +4635,35 @@ def build_create_or_update_swift_virtual_network_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4595,31 +4676,32 @@ def build_delete_swift_virtual_network_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4633,35 +4715,35 @@ def build_update_swift_virtual_network_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4675,10 +4757,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4686,21 +4769,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4712,10 +4795,11 @@ def build_get_network_trace_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4723,21 +4807,21 @@ def build_get_network_trace_operation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4752,37 +4836,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4797,37 +4882,38 @@ def build_start_web_site_network_trace_operation_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4838,31 +4924,32 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4874,10 +4961,11 @@ def build_get_network_traces_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4885,21 +4973,21 @@ def build_get_network_traces_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4911,10 +4999,11 @@ def build_get_network_trace_operation_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4922,21 +5011,21 @@ def build_get_network_trace_operation_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4948,10 +5037,11 @@ def build_get_network_traces_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4959,21 +5049,21 @@ def build_get_network_traces_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4984,31 +5074,32 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5021,33 +5112,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5058,31 +5150,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5093,31 +5186,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5129,10 +5223,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5140,21 +5235,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5169,12 +5264,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5182,23 +5277,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5212,10 +5307,11 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5223,21 +5319,21 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5252,12 +5348,12 @@ def build_update_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5265,23 +5361,23 @@ def build_update_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5294,31 +5390,32 @@ def build_get_private_access_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5332,35 +5429,35 @@ def build_put_private_access_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5373,31 +5470,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5409,10 +5507,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5420,21 +5519,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5446,10 +5545,11 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5457,21 +5557,21 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5483,10 +5583,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5494,21 +5595,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5520,10 +5621,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5531,21 +5633,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5558,10 +5660,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5570,21 +5673,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5596,10 +5699,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5607,21 +5711,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5632,31 +5736,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5668,10 +5773,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5679,21 +5785,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5708,12 +5814,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5721,23 +5827,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5751,10 +5857,11 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5762,21 +5869,21 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5790,35 +5897,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5831,31 +5938,32 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5869,35 +5977,36 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5911,35 +6020,35 @@ def build_restore_from_backup_blob_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5955,35 +6064,35 @@ def build_restore_from_deleted_app_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5999,35 +6108,35 @@ def build_restore_snapshot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6040,31 +6149,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6076,10 +6186,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6087,21 +6198,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6113,10 +6224,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6124,21 +6236,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6150,10 +6262,11 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6161,21 +6274,21 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6189,35 +6302,35 @@ def build_copy_production_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6230,31 +6343,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6266,10 +6380,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6277,21 +6392,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6306,12 +6421,12 @@ def build_create_or_update_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6319,23 +6434,23 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6352,10 +6467,11 @@ def build_delete_slot_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6363,25 +6479,25 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6396,12 +6512,12 @@ def build_update_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6409,23 +6525,23 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6441,10 +6557,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6452,23 +6569,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6483,12 +6600,12 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6496,23 +6613,23 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6529,12 +6646,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6542,23 +6659,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6572,10 +6689,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6583,21 +6701,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6610,10 +6728,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6622,21 +6741,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6649,10 +6768,11 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6661,21 +6781,21 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6691,12 +6811,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6705,23 +6825,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6739,12 +6859,12 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6753,23 +6873,23 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6783,10 +6903,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6794,21 +6915,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6823,12 +6944,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6836,23 +6957,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6866,10 +6987,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6877,21 +6999,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6906,12 +7028,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6919,23 +7041,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6949,10 +7071,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6960,21 +7083,21 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6989,12 +7112,12 @@ def build_update_azure_storage_accounts_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7002,23 +7125,23 @@ def build_update_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7032,10 +7155,11 @@ def build_list_azure_storage_accounts_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7043,21 +7167,21 @@ def build_list_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7072,12 +7196,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7085,23 +7209,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7115,10 +7239,11 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7126,21 +7251,21 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7152,10 +7277,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7163,21 +7289,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7192,12 +7318,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7205,23 +7331,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7235,10 +7361,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7246,21 +7373,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7272,10 +7399,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7283,21 +7411,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7312,12 +7440,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7325,23 +7453,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7358,12 +7486,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7371,23 +7499,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7401,10 +7529,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7412,21 +7541,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7438,10 +7567,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7449,21 +7579,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7478,12 +7608,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7491,23 +7621,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7521,10 +7651,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7532,21 +7663,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7558,10 +7689,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7569,21 +7701,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7598,12 +7730,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7611,23 +7743,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7644,12 +7776,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7657,23 +7789,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7687,10 +7819,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7698,21 +7831,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7725,10 +7858,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7737,21 +7871,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7764,10 +7898,11 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7776,21 +7911,21 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7802,10 +7937,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7813,21 +7949,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7839,10 +7975,11 @@ def build_get_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7850,21 +7987,21 @@ def build_get_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7876,10 +8013,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7887,21 +8025,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7914,10 +8052,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7926,21 +8065,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7953,10 +8092,11 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7965,21 +8105,21 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7992,10 +8132,11 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8004,21 +8145,21 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8031,10 +8172,11 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8043,21 +8185,21 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8069,10 +8211,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8080,21 +8223,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8107,10 +8250,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8119,21 +8263,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8149,12 +8293,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8163,23 +8307,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8194,10 +8338,11 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8206,21 +8351,21 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8233,10 +8378,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8245,21 +8391,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8274,12 +8420,12 @@ def build_discover_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8287,23 +8433,23 @@ def build_discover_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8317,10 +8463,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8328,21 +8475,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8355,10 +8502,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8367,21 +8515,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8397,12 +8545,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8411,23 +8559,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8442,10 +8590,11 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8454,21 +8603,21 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8484,12 +8633,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8498,23 +8647,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8528,10 +8677,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8539,21 +8689,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8568,12 +8718,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8581,23 +8731,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8611,10 +8761,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8622,21 +8773,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8648,10 +8799,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8659,21 +8811,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8685,10 +8837,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8696,21 +8849,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8723,10 +8876,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8735,21 +8889,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8765,12 +8919,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8779,23 +8933,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8810,10 +8964,11 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8822,21 +8977,21 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8853,12 +9008,12 @@ def build_create_or_update_function_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8868,23 +9023,23 @@ def build_create_or_update_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8900,10 +9055,11 @@ def build_delete_function_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8913,21 +9069,21 @@ def build_delete_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8940,10 +9096,11 @@ def build_list_function_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8952,21 +9109,21 @@ def build_list_function_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8979,10 +9136,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8991,21 +9149,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9017,10 +9175,11 @@ def build_list_host_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9028,21 +9187,21 @@ def build_list_host_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9054,10 +9213,11 @@ def build_list_sync_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9065,21 +9225,21 @@ def build_list_sync_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9091,10 +9251,11 @@ def build_sync_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9102,21 +9263,21 @@ def build_sync_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9133,12 +9294,12 @@ def build_create_or_update_host_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9148,23 +9309,23 @@ def build_create_or_update_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9180,10 +9341,11 @@ def build_delete_host_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9193,21 +9355,21 @@ def build_delete_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9219,10 +9381,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9230,21 +9393,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9257,10 +9420,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9269,21 +9433,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9299,12 +9463,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9313,23 +9477,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9344,10 +9508,11 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9356,21 +9521,21 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9384,10 +9549,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9397,21 +9563,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9428,12 +9594,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9443,23 +9609,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9475,10 +9641,11 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9488,21 +9655,21 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9519,12 +9686,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9534,23 +9701,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9564,10 +9731,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9575,21 +9743,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9601,10 +9769,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9612,21 +9781,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9639,10 +9808,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9651,21 +9821,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9681,12 +9851,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9695,23 +9865,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9726,10 +9896,11 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9738,21 +9909,21 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9768,12 +9939,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9782,23 +9953,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9812,10 +9983,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9823,21 +9995,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9850,10 +10022,11 @@ def build_get_instance_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9862,21 +10035,21 @@ def build_get_instance_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9889,10 +10062,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9901,21 +10075,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9931,12 +10105,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9945,23 +10119,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9976,10 +10150,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9988,21 +10163,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10015,10 +10190,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10027,21 +10203,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10055,10 +10231,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10068,21 +10245,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10096,10 +10273,11 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10109,21 +10287,21 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10137,10 +10315,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10150,21 +10329,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10178,10 +10357,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10191,21 +10371,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10220,10 +10400,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10234,21 +10415,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10262,10 +10443,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10275,21 +10457,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10301,10 +10483,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10312,21 +10495,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10338,10 +10521,11 @@ def build_list_site_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10349,21 +10533,21 @@ def build_list_site_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10375,10 +10559,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10386,21 +10571,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10412,10 +10597,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10423,21 +10609,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10449,10 +10635,11 @@ def build_get_swift_virtual_network_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10460,21 +10647,21 @@ def build_get_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10489,12 +10676,12 @@ def build_create_or_update_swift_virtual_network_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10502,23 +10689,23 @@ def build_create_or_update_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10532,10 +10719,11 @@ def build_delete_swift_virtual_network_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10543,21 +10731,21 @@ def build_delete_swift_virtual_network_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10572,12 +10760,12 @@ def build_update_swift_virtual_network_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10585,23 +10773,23 @@ def build_update_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10616,10 +10804,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10628,21 +10817,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10655,10 +10844,11 @@ def build_get_network_trace_operation_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10667,21 +10857,21 @@ def build_get_network_trace_operation_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10697,10 +10887,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10708,27 +10899,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10744,10 +10935,11 @@ def build_start_web_site_network_trace_operation_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10755,27 +10947,27 @@ def build_start_web_site_network_trace_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10787,10 +10979,11 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10798,21 +10991,21 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10825,10 +11018,11 @@ def build_get_network_traces_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10837,21 +11031,21 @@ def build_get_network_traces_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10864,10 +11058,11 @@ def build_get_network_trace_operation_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10876,21 +11071,21 @@ def build_get_network_trace_operation_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10903,10 +11098,11 @@ def build_get_network_traces_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10915,21 +11111,21 @@ def build_get_network_traces_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10941,10 +11137,11 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10952,21 +11149,21 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10980,10 +11177,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10991,23 +11189,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11019,10 +11217,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11030,21 +11229,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11056,10 +11255,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11067,21 +11267,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11094,10 +11294,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11106,21 +11307,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11136,12 +11337,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11150,23 +11351,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11181,10 +11382,11 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11193,21 +11395,21 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11223,12 +11425,12 @@ def build_update_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11237,23 +11439,23 @@ def build_update_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11267,10 +11469,11 @@ def build_get_private_access_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11278,21 +11481,21 @@ def build_get_private_access_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11307,12 +11510,12 @@ def build_put_private_access_vnet_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11320,23 +11523,23 @@ def build_put_private_access_vnet_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11350,10 +11553,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11361,21 +11565,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11390,12 +11594,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11403,23 +11607,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11433,10 +11637,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11444,21 +11649,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11469,31 +11674,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11505,10 +11711,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11516,21 +11723,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11543,10 +11750,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11555,21 +11763,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11582,10 +11790,11 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11594,21 +11803,21 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11621,10 +11830,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11633,21 +11843,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11660,10 +11870,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11672,21 +11883,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11700,10 +11911,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11713,21 +11925,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11740,10 +11952,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11752,21 +11965,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11778,10 +11991,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11789,21 +12003,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11816,10 +12030,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11828,21 +12043,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11858,12 +12073,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11872,23 +12087,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11903,10 +12118,11 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11915,21 +12131,21 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11944,12 +12160,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11957,23 +12173,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11987,10 +12203,11 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11998,21 +12215,21 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12027,10 +12244,11 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12038,25 +12256,25 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12071,12 +12289,12 @@ def build_restore_from_backup_blob_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12084,23 +12302,23 @@ def build_restore_from_backup_blob_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12117,12 +12335,12 @@ def build_restore_from_deleted_app_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12130,23 +12348,23 @@ def build_restore_from_deleted_app_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12163,12 +12381,12 @@ def build_restore_snapshot_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12176,23 +12394,23 @@ def build_restore_snapshot_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12206,10 +12424,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12217,21 +12436,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12244,10 +12463,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12256,21 +12476,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12283,10 +12503,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12295,21 +12516,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12322,10 +12543,11 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12334,21 +12556,21 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12363,12 +12585,12 @@ def build_copy_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12376,23 +12598,23 @@ def build_copy_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12409,12 +12631,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12422,23 +12644,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12455,12 +12677,12 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12468,23 +12690,23 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12498,10 +12720,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12509,21 +12732,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12535,10 +12758,11 @@ def build_list_snapshots_from_dr_secondary_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12546,21 +12770,21 @@ def build_list_snapshots_from_dr_secondary_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12572,10 +12796,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12583,21 +12808,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12612,12 +12837,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12625,23 +12850,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12655,10 +12880,11 @@ def build_delete_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12666,21 +12892,21 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12695,12 +12921,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12708,23 +12934,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12738,10 +12964,11 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12749,21 +12976,21 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12779,10 +13006,11 @@ def build_start_network_trace_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12790,27 +13018,27 @@ def build_start_network_trace_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12822,10 +13050,11 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12833,21 +13062,21 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12859,10 +13088,11 @@ def build_stop_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12870,21 +13100,21 @@ def build_stop_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12896,10 +13126,11 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12907,21 +13138,21 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12933,10 +13164,11 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12944,21 +13176,21 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12970,10 +13202,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12981,21 +13214,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13008,10 +13241,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13020,21 +13254,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13047,10 +13281,11 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13059,21 +13294,21 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13086,10 +13321,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13098,21 +13334,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13126,10 +13362,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13139,21 +13376,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13166,10 +13403,11 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13178,21 +13416,21 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13206,10 +13444,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13217,23 +13456,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13245,10 +13484,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13256,21 +13496,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13283,10 +13523,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13295,21 +13536,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13325,12 +13566,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13339,23 +13580,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13370,10 +13611,11 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13382,21 +13624,21 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13412,12 +13654,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13426,23 +13668,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13458,10 +13700,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13471,21 +13714,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13502,12 +13745,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13517,23 +13760,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13552,12 +13795,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13567,23 +13810,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13597,10 +13840,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13608,21 +13852,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13635,10 +13879,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13647,21 +13892,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13675,35 +13920,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13719,35 +13964,35 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13760,31 +14005,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13795,31 +14041,32 @@ def build_list_snapshots_from_dr_secondary_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13830,31 +14077,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13868,35 +14116,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13909,31 +14157,32 @@ def build_delete_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13947,35 +14196,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13988,31 +14237,32 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14027,37 +14277,38 @@ def build_start_network_trace_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14068,31 +14319,32 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14103,31 +14355,32 @@ def build_stop_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14138,31 +14391,32 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14173,31 +14427,32 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14208,31 +14463,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14244,10 +14500,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14255,21 +14512,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14281,10 +14538,11 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14292,21 +14550,21 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14318,10 +14576,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14329,21 +14588,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14356,10 +14615,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14368,21 +14628,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14394,10 +14654,11 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14405,21 +14666,21 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14432,33 +14693,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14469,31 +14731,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14505,10 +14768,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14516,21 +14780,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14545,12 +14809,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14558,23 +14822,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14588,10 +14852,11 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14599,21 +14864,21 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14628,12 +14893,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14641,23 +14906,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14672,10 +14937,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14684,21 +14950,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14714,12 +14980,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14728,23 +14994,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14762,12 +15028,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14776,23 +15042,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14805,31 +15071,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14841,10 +15108,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14852,25 +15120,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -14899,13 +15167,15 @@ def list( ) -> Iterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14916,6 +15186,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -14925,6 +15196,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14942,7 +15214,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14956,7 +15232,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -14967,7 +15243,7 @@ def list_by_resource_group( ) -> Iterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -14979,6 +15255,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14990,6 +15268,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -15001,6 +15280,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -15019,7 +15299,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15033,7 +15317,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -15044,7 +15328,7 @@ def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -15061,17 +15345,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15088,7 +15379,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -15104,6 +15395,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -15112,6 +15404,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -15119,7 +15412,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15137,7 +15434,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15151,8 +15448,8 @@ def begin_create_or_update( """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. + 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 @@ -15173,8 +15470,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -15186,6 +15484,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15210,13 +15509,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15226,16 +15524,16 @@ def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -15248,11 +15546,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -15260,7 +15561,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -15271,7 +15576,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15285,8 +15590,8 @@ def update( """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. + 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 @@ -15306,6 +15611,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -15314,6 +15620,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -15321,7 +15628,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15340,7 +15651,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15353,13 +15664,13 @@ def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -15372,18 +15683,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15398,11 +15716,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15411,7 +15729,7 @@ def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -15430,6 +15748,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -15438,6 +15757,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -15445,7 +15765,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15456,7 +15780,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -15469,7 +15793,7 @@ def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -15489,6 +15813,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -15497,6 +15822,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -15504,7 +15830,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15519,7 +15849,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -15531,7 +15861,7 @@ def list_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -15543,6 +15873,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15555,6 +15887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -15566,6 +15899,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15583,7 +15917,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15597,7 +15935,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def get_backup_status( @@ -15609,7 +15947,7 @@ def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -15628,18 +15966,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15654,11 +15999,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15667,7 +16012,7 @@ def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -15686,18 +16031,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15708,7 +16060,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -15724,9 +16076,9 @@ def list_backup_status_secrets( 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. + 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 @@ -15747,6 +16099,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -15756,6 +16109,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -15763,7 +16117,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15778,10 +16136,10 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - def _restore_initial( + def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15795,6 +16153,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -15804,6 +16163,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -15811,7 +16171,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15821,11 +16185,11 @@ def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore( + def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15835,7 +16199,7 @@ def begin_restore( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -15857,8 +16221,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -15871,6 +16236,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15892,10 +16258,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def get_basic_publishing_credentials_policies( @@ -15906,8 +16271,7 @@ def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -15924,17 +16288,24 @@ def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15949,7 +16320,7 @@ def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace @@ -15961,7 +16332,7 @@ def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -15978,17 +16349,24 @@ def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16003,7 +16381,7 @@ def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16016,7 +16394,7 @@ def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -16036,6 +16414,7 @@ def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16044,6 +16423,7 @@ def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -16051,7 +16431,11 @@ def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16066,7 +16450,7 @@ def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16078,7 +16462,7 @@ def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -16095,17 +16479,24 @@ def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16120,7 +16511,7 @@ def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16133,7 +16524,7 @@ def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -16153,6 +16544,7 @@ def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16161,6 +16553,7 @@ def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -16168,7 +16561,11 @@ def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16183,7 +16580,7 @@ def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16195,7 +16592,7 @@ def list_configurations( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -16208,6 +16605,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16220,6 +16619,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -16231,6 +16631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16248,7 +16649,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16262,7 +16667,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -16274,7 +16679,7 @@ def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -16293,6 +16698,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -16301,6 +16707,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -16308,7 +16715,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16323,7 +16734,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -16335,7 +16746,7 @@ def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -16352,17 +16763,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16377,7 +16795,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -16390,7 +16808,7 @@ def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -16409,6 +16827,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -16417,6 +16836,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -16424,7 +16844,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16439,7 +16863,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -16451,7 +16875,7 @@ def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -16468,17 +16892,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16493,7 +16924,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -16506,7 +16937,7 @@ def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -16526,6 +16957,7 @@ def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -16534,6 +16966,7 @@ def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -16541,7 +16974,11 @@ def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16556,7 +16993,7 @@ def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -16568,7 +17005,7 @@ def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -16585,17 +17022,24 @@ def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16610,7 +17054,7 @@ def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -16623,7 +17067,7 @@ def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -16642,6 +17086,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16650,6 +17095,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -16657,7 +17103,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16672,11 +17122,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16684,7 +17134,7 @@ def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -16701,17 +17151,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16722,7 +17179,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -16734,7 +17191,7 @@ def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -16751,17 +17208,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16776,7 +17240,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -16788,7 +17252,7 @@ def get_app_settings_key_vault_references( ) -> "_models.KeyVaultReferenceCollection": """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -16805,17 +17269,24 @@ def get_app_settings_key_vault_references( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_app_settings_key_vault_references_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16830,7 +17301,7 @@ def get_app_settings_key_vault_references( return deserialized - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace @@ -16843,7 +17314,7 @@ def get_app_setting_key_vault_reference( ) -> "_models.KeyVaultReferenceResource": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -16862,18 +17333,25 @@ def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16888,7 +17366,7 @@ def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -16901,7 +17379,7 @@ def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -16920,6 +17398,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -16928,6 +17407,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -16935,7 +17415,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16950,7 +17434,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -16962,7 +17446,7 @@ def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -16979,17 +17463,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17004,7 +17495,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -17016,7 +17507,7 @@ def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -17033,17 +17524,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17058,7 +17556,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -17071,7 +17569,7 @@ def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -17091,6 +17589,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -17099,6 +17598,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -17106,7 +17606,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17121,7 +17625,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -17134,7 +17638,7 @@ def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -17153,6 +17657,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -17161,6 +17666,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -17168,7 +17674,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17183,7 +17693,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -17195,7 +17705,7 @@ def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -17212,17 +17722,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17237,7 +17754,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -17252,17 +17769,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17276,7 +17800,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -17288,7 +17812,7 @@ def begin_list_publishing_credentials( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -17306,7 +17830,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -17317,6 +17842,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -17340,10 +17866,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -17355,7 +17880,7 @@ def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -17374,6 +17899,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -17382,6 +17908,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -17389,7 +17916,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17404,7 +17935,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -17416,7 +17947,7 @@ def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -17433,17 +17964,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17458,7 +17996,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -17470,8 +18008,7 @@ def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -17488,17 +18025,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17513,7 +18057,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -17527,8 +18071,8 @@ def update_slot_configuration_names( """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. + 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 @@ -17547,6 +18091,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -17555,6 +18100,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -17562,7 +18108,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17577,7 +18127,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -17590,8 +18140,8 @@ def get_configuration( """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. + 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 @@ -17608,17 +18158,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17633,7 +18190,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17646,7 +18203,7 @@ def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -17665,6 +18222,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -17673,6 +18231,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -17680,7 +18239,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17695,7 +18258,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17708,7 +18271,7 @@ def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -17727,6 +18290,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -17735,6 +18299,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -17742,7 +18307,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17757,7 +18326,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17770,8 +18339,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -17784,6 +18353,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17796,6 +18367,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -17807,6 +18379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17824,7 +18397,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17838,7 +18415,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -17850,7 +18427,7 @@ def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -17869,18 +18446,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17895,11 +18479,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17908,7 +18492,7 @@ def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -17927,18 +18511,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -17949,7 +18540,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -17961,7 +18552,7 @@ def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -17978,17 +18569,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18004,7 +18602,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -18016,7 +18614,7 @@ def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -18033,17 +18631,24 @@ def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18059,7 +18664,7 @@ def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -18071,7 +18676,7 @@ def list_continuous_web_jobs( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -18084,6 +18689,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18096,6 +18703,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -18107,6 +18715,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18124,7 +18733,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18138,7 +18751,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -18150,7 +18763,7 @@ def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -18169,18 +18782,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18197,11 +18817,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18210,7 +18830,7 @@ def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -18229,18 +18849,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18251,11 +18878,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18264,7 +18891,7 @@ def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -18283,18 +18910,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18305,11 +18939,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18318,7 +18952,7 @@ def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -18337,18 +18971,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18359,7 +19000,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -18371,7 +19012,7 @@ def list_deployments( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -18383,6 +19024,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18395,6 +19038,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -18406,6 +19050,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18423,7 +19068,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18437,7 +19086,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -18449,7 +19098,7 @@ def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -18468,18 +19117,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18494,7 +19150,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -18508,7 +19164,7 @@ def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -18529,6 +19185,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -18538,6 +19195,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -18545,7 +19203,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18560,11 +19222,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18573,7 +19235,7 @@ def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -18592,18 +19254,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18614,7 +19283,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -18627,7 +19296,7 @@ def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -18647,18 +19316,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18673,7 +19349,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -18687,8 +19363,8 @@ def discover_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. - 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. + 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 @@ -18708,6 +19384,7 @@ def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -18716,6 +19393,7 @@ def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -18723,7 +19401,11 @@ def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18738,7 +19420,7 @@ def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -18750,7 +19432,7 @@ def list_domain_ownership_identifiers( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -18762,6 +19444,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18774,6 +19458,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -18785,6 +19470,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18802,7 +19488,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18816,7 +19506,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -18828,7 +19518,7 @@ def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -18847,18 +19537,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18873,7 +19570,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -18887,8 +19584,7 @@ def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -18909,6 +19605,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -18918,6 +19615,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -18925,7 +19623,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18940,11 +19642,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18953,7 +19655,7 @@ def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -18972,18 +19674,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18994,7 +19703,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19008,8 +19717,7 @@ def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19030,6 +19738,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19039,6 +19748,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -19046,7 +19756,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19061,7 +19775,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19073,7 +19787,7 @@ def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -19090,17 +19804,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19115,7 +19836,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -19131,6 +19852,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -19139,6 +19861,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -19146,7 +19869,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -19162,7 +19889,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -19175,7 +19902,7 @@ def begin_create_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -19196,8 +19923,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -19209,6 +19937,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19233,10 +19962,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -19247,7 +19975,7 @@ def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -19264,17 +19992,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19291,7 +20026,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -19303,7 +20038,7 @@ def list_functions( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -19316,6 +20051,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19328,6 +20065,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -19339,6 +20077,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19356,7 +20095,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19370,7 +20113,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -19381,7 +20124,7 @@ def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -19398,17 +20141,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19423,7 +20173,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -19436,7 +20186,7 @@ def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -19455,18 +20205,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19483,7 +20240,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -19500,6 +20257,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -19509,6 +20267,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -19516,7 +20275,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -19530,7 +20293,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -19544,7 +20307,7 @@ def begin_create_function( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -19567,8 +20330,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -19581,6 +20345,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19605,13 +20370,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19620,7 +20384,7 @@ def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -19639,18 +20403,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19661,7 +20432,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -19676,7 +20447,7 @@ def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -19699,6 +20470,7 @@ def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -19709,6 +20481,7 @@ def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -19716,7 +20489,11 @@ def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -19735,11 +20512,11 @@ def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret( + def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19749,7 +20526,7 @@ def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -19770,6 +20547,8 @@ def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -19777,12 +20556,17 @@ def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19793,7 +20577,7 @@ def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -19806,7 +20590,7 @@ def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -19825,18 +20609,25 @@ def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19851,7 +20642,7 @@ def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -19864,7 +20655,7 @@ def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -19883,18 +20674,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19909,7 +20707,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -19921,7 +20719,7 @@ def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -19938,17 +20736,24 @@ def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19963,11 +20768,11 @@ def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status( + def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19975,7 +20780,7 @@ def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -19992,17 +20797,24 @@ def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20013,11 +20825,11 @@ def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions( + def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20025,7 +20837,7 @@ def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -20042,17 +20854,24 @@ def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20063,7 +20882,7 @@ def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace @@ -20078,7 +20897,7 @@ def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -20101,6 +20920,7 @@ def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -20111,6 +20931,7 @@ def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -20118,7 +20939,11 @@ def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -20137,11 +20962,11 @@ def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret( + def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20151,7 +20976,7 @@ def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -20172,6 +20997,8 @@ def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -20179,12 +21006,17 @@ def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20195,7 +21027,7 @@ def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -20207,7 +21039,7 @@ def list_host_name_bindings( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -20220,6 +21052,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20232,6 +21066,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -20243,6 +21078,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20260,7 +21096,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20274,7 +21114,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -20286,7 +21126,7 @@ def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -20305,18 +21145,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20331,7 +21178,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -20345,7 +21192,7 @@ def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -20367,6 +21214,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -20376,6 +21224,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -20383,7 +21232,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20398,11 +21251,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20411,7 +21264,7 @@ def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -20430,18 +21283,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20452,7 +21312,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -20466,7 +21326,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -20487,6 +21347,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -20494,12 +21356,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20514,7 +21381,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20529,7 +21396,7 @@ def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -20552,6 +21419,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -20562,6 +21430,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -20569,7 +21438,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20584,11 +21457,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20598,7 +21471,7 @@ def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -20619,6 +21492,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -20626,12 +21501,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20642,7 +21522,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20657,7 +21537,7 @@ def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -20680,6 +21560,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -20690,6 +21571,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -20697,7 +21579,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20712,7 +21598,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20724,7 +21610,7 @@ def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -20741,17 +21627,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20766,7 +21659,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -20778,8 +21671,7 @@ def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -20796,17 +21688,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20821,7 +21720,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -20834,7 +21733,7 @@ def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -20853,18 +21752,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20879,7 +21785,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -20893,8 +21799,7 @@ def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -20915,6 +21820,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -20924,6 +21830,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -20931,7 +21838,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20946,11 +21857,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20959,7 +21870,7 @@ def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -20978,18 +21889,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21000,7 +21918,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21014,8 +21932,7 @@ def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21036,6 +21953,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21045,6 +21963,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -21052,7 +21971,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21067,7 +21990,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21079,7 +22002,7 @@ def list_instance_identifiers( ) -> Iterable["_models.WebAppInstanceCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -21092,6 +22015,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21104,6 +22029,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -21115,6 +22041,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21132,7 +22059,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21146,7 +22077,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_info( @@ -21158,7 +22089,7 @@ def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -21177,18 +22108,25 @@ def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21203,7 +22141,7 @@ def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -21216,7 +22154,7 @@ def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -21235,18 +22173,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21261,7 +22206,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -21278,6 +22223,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -21287,6 +22233,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -21294,7 +22241,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -21310,7 +22261,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -21324,7 +22275,7 @@ def begin_create_instance_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -21347,8 +22298,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -21361,6 +22313,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21385,10 +22338,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -21400,7 +22352,7 @@ def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -21419,18 +22371,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21447,7 +22406,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -21461,8 +22420,8 @@ def list_instance_processes( """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. + 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 @@ -21477,6 +22436,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21490,6 +22451,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -21502,6 +22464,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21519,7 +22482,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21533,7 +22500,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -21546,8 +22513,7 @@ def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21569,6 +22535,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -21576,12 +22544,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21598,11 +22571,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21613,8 +22586,8 @@ def delete_instance_process( """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. + 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 @@ -21636,6 +22609,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -21643,12 +22618,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21659,7 +22639,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -21673,8 +22653,7 @@ def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -21696,6 +22675,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -21703,12 +22684,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21725,7 +22711,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -21740,8 +22726,8 @@ def list_instance_process_modules( """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. + 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 @@ -21759,6 +22745,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21773,6 +22761,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -21786,6 +22775,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21803,7 +22793,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21817,7 +22811,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -21831,8 +22825,7 @@ def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21856,6 +22849,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -21864,12 +22859,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21886,7 +22886,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -21900,8 +22900,7 @@ def list_instance_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -21919,6 +22918,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21933,6 +22934,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -21946,6 +22948,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21963,7 +22966,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21977,7 +22984,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable( @@ -21988,7 +22995,7 @@ def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -22005,17 +23012,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22030,7 +23044,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -22042,7 +23056,7 @@ def list_site_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -22054,6 +23068,8 @@ def list_site_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22066,6 +23082,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -22077,6 +23094,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22094,7 +23112,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22108,7 +23130,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers( @@ -22119,7 +23141,7 @@ def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -22136,17 +23158,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22161,7 +23190,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore def _migrate_storage_initial( @@ -22178,6 +23207,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -22186,6 +23216,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -22194,7 +23225,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22208,7 +23243,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -22222,7 +23257,7 @@ def begin_migrate_storage( ) -> LROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -22246,8 +23281,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -22260,6 +23296,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22284,10 +23321,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -22302,6 +23338,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -22310,6 +23347,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -22317,7 +23355,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22331,7 +23373,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -22344,7 +23386,7 @@ def begin_migrate_my_sql( ) -> LROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -22364,8 +23406,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -22377,6 +23420,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22401,10 +23445,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -22416,8 +23459,8 @@ def get_migrate_my_sql_status( """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. + 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 @@ -22434,17 +23477,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22459,7 +23509,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -22471,7 +23521,7 @@ def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -22488,17 +23538,24 @@ def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22513,7 +23570,7 @@ def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22529,9 +23586,9 @@ def create_or_update_swift_virtual_network_connection( 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 + 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. @@ -22551,6 +23608,7 @@ def create_or_update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -22559,6 +23617,7 @@ def create_or_update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection.metadata['url'], @@ -22566,7 +23625,11 @@ def create_or_update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22581,11 +23644,11 @@ def create_or_update_swift_virtual_network_connection( return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network( + def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22593,7 +23656,7 @@ def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -22610,17 +23673,24 @@ def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22631,7 +23701,7 @@ def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22647,9 +23717,9 @@ def update_swift_virtual_network_connection( 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 + 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. @@ -22669,6 +23739,7 @@ def update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -22677,6 +23748,7 @@ def update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection.metadata['url'], @@ -22684,7 +23756,11 @@ def update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22699,7 +23775,7 @@ def update_swift_virtual_network_connection( return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22712,7 +23788,7 @@ def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -22731,18 +23807,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22759,7 +23842,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -22772,8 +23855,7 @@ def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -22792,18 +23874,25 @@ def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22822,7 +23911,7 @@ def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -22837,17 +23926,17 @@ def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -22860,11 +23949,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -22873,7 +23965,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22888,7 +23984,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_initial( @@ -22906,11 +24002,14 @@ def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -22919,7 +24018,11 @@ def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22937,7 +24040,7 @@ def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -22952,17 +24055,17 @@ def begin_start_web_site_network_trace_operation( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -22977,7 +24080,8 @@ def begin_start_web_site_network_trace_operation( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -22991,6 +24095,7 @@ def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23014,13 +24119,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace( + def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23028,7 +24132,7 @@ def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -23045,17 +24149,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23066,7 +24177,7 @@ def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace @@ -23079,8 +24190,7 @@ def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23099,18 +24209,25 @@ def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23125,7 +24242,7 @@ def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -23138,8 +24255,7 @@ def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23158,18 +24274,25 @@ def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23188,7 +24311,7 @@ def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -23201,8 +24324,7 @@ def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23221,18 +24343,25 @@ def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23247,11 +24376,11 @@ def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23259,8 +24388,7 @@ def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -23277,17 +24405,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23298,7 +24433,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -23311,7 +24446,7 @@ def list_perf_mon_counters( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -23319,7 +24454,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -23328,6 +24463,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23340,6 +24477,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -23352,6 +24490,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -23370,7 +24509,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23384,7 +24527,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -23395,7 +24538,7 @@ def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -23412,17 +24555,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23437,7 +24587,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -23449,7 +24599,7 @@ def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -23466,17 +24616,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23491,7 +24648,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -23504,7 +24661,7 @@ def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -23523,18 +24680,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23549,7 +24713,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23563,7 +24727,7 @@ def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -23584,6 +24748,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -23593,6 +24758,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -23600,7 +24766,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23615,11 +24785,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23628,7 +24798,7 @@ def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -23647,18 +24817,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23669,7 +24846,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23683,7 +24860,7 @@ def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -23704,6 +24881,7 @@ def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -23713,6 +24891,7 @@ def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -23720,7 +24899,11 @@ def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23735,7 +24918,7 @@ def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23748,8 +24931,8 @@ def get_private_access( """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. + 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 @@ -23766,17 +24949,24 @@ def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23791,7 +24981,7 @@ def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -23805,8 +24995,8 @@ def put_private_access_vnet( """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. + 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 @@ -23825,6 +25015,7 @@ def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -23833,6 +25024,7 @@ def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -23840,7 +25032,11 @@ def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23855,7 +25051,7 @@ def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -23868,8 +25064,8 @@ def list_processes( """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. + 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 @@ -23881,6 +25077,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23893,6 +25091,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -23904,6 +25103,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23921,7 +25121,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23935,7 +25139,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -23947,8 +25151,7 @@ def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -23967,18 +25170,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23995,11 +25205,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24009,8 +25219,8 @@ def delete_process( """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. + 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 @@ -24029,18 +25239,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -24051,7 +25268,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -24064,8 +25281,7 @@ def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -24084,18 +25300,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24112,7 +25335,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -24126,8 +25349,8 @@ def list_process_modules( """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. + 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 @@ -24142,6 +25365,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24155,6 +25380,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -24167,6 +25393,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24184,7 +25411,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24198,7 +25429,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -24211,8 +25442,7 @@ def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -24233,6 +25463,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -24240,12 +25472,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24262,7 +25499,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -24275,8 +25512,7 @@ def list_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -24291,6 +25527,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24304,6 +25542,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -24316,6 +25555,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24333,7 +25573,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24347,7 +25591,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -24358,7 +25602,7 @@ def list_public_certificates( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -24371,6 +25615,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24383,6 +25629,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -24394,6 +25641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24411,7 +25659,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24425,7 +25677,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -24437,7 +25689,7 @@ def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -24456,18 +25708,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24482,7 +25741,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -24496,7 +25755,7 @@ def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -24518,6 +25777,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -24527,6 +25787,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -24534,7 +25795,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24549,11 +25814,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24562,7 +25827,7 @@ def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -24581,18 +25846,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24603,7 +25875,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -24616,7 +25888,7 @@ def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -24637,6 +25909,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -24645,6 +25918,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -24652,7 +25926,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24667,11 +25945,11 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24680,8 +25958,8 @@ def reset_production_slot_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. + 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 @@ -24698,17 +25976,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24719,11 +26004,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24733,17 +26018,18 @@ def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -24756,11 +26042,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -24768,7 +26057,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24779,10 +26072,10 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - def _restore_from_backup_blob_initial( + def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24795,6 +26088,7 @@ def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -24803,6 +26097,7 @@ def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -24810,7 +26105,11 @@ def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24820,11 +26119,11 @@ def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob( + def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24833,7 +26132,7 @@ def begin_restore_from_backup_blob( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -24853,8 +26152,9 @@ def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24866,6 +26166,7 @@ def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24887,12 +26188,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_initial( + def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24905,6 +26205,7 @@ def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -24913,6 +26214,7 @@ def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -24920,7 +26222,11 @@ def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24930,11 +26236,11 @@ def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app( + def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24943,7 +26249,7 @@ def begin_restore_from_deleted_app( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -24963,8 +26269,9 @@ def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24976,6 +26283,7 @@ def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24997,12 +26305,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_initial( + def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25015,6 +26322,7 @@ def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -25023,6 +26331,7 @@ def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -25030,7 +26339,11 @@ def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25040,11 +26353,11 @@ def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot( + def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25053,7 +26366,7 @@ def begin_restore_snapshot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -25074,8 +26387,9 @@ def begin_restore_snapshot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25087,6 +26401,7 @@ def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25108,10 +26423,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -25122,7 +26436,7 @@ def list_site_extensions( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -25135,6 +26449,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25147,6 +26463,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -25158,6 +26475,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25175,7 +26493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25189,7 +26511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -25201,7 +26523,7 @@ def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -25220,18 +26542,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25248,7 +26577,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -25264,18 +26593,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -25294,7 +26630,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -25307,7 +26643,7 @@ def begin_install_site_extension( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -25328,7 +26664,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -25340,6 +26677,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25363,13 +26701,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25378,7 +26715,7 @@ def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -25397,18 +26734,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -25419,10 +26763,10 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore - def _copy_production_slot_initial( + def _copy_production_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25435,6 +26779,7 @@ def _copy_production_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -25443,6 +26788,7 @@ def _copy_production_slot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_production_slot_initial.metadata['url'], @@ -25450,7 +26796,11 @@ def _copy_production_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25460,11 +26810,11 @@ def _copy_production_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_production_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + _copy_production_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace - def begin_copy_production_slot( + def begin_copy_production_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25473,7 +26823,7 @@ def begin_copy_production_slot( ) -> LROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -25494,8 +26844,9 @@ def begin_copy_production_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25507,6 +26858,7 @@ def begin_copy_production_slot( resource_group_name=resource_group_name, name=name, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25528,10 +26880,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + begin_copy_production_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace def list_slots( @@ -25542,7 +26893,7 @@ def list_slots( ) -> Iterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -25553,6 +26904,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25565,6 +26918,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -25576,6 +26930,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25593,7 +26948,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25607,7 +26966,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -25619,7 +26978,7 @@ def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -25638,18 +26997,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25666,7 +27032,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -25683,6 +27049,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -25692,6 +27059,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -25699,7 +27067,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25717,7 +27089,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -25732,8 +27104,8 @@ def begin_create_or_update_slot( """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. + 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 @@ -25757,8 +27129,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -25771,6 +27144,7 @@ def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25795,13 +27169,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25812,7 +27185,7 @@ def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -25821,11 +27194,11 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -25838,12 +27211,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -25851,7 +27227,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -25862,7 +27242,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -25877,8 +27257,8 @@ def update_slot( """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. + 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 @@ -25901,6 +27281,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -25910,6 +27291,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -25917,7 +27299,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25936,7 +27322,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -25950,7 +27336,7 @@ def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -25958,7 +27344,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -25971,19 +27357,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25998,11 +27391,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26012,7 +27405,7 @@ def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -26034,6 +27427,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -26043,6 +27437,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -26050,7 +27445,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26061,7 +27460,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -26075,7 +27474,7 @@ def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -26098,6 +27497,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -26107,6 +27507,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -26114,7 +27515,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26129,7 +27534,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -26142,7 +27547,7 @@ def list_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -26157,6 +27562,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26170,6 +27577,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -26182,6 +27590,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26199,7 +27608,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26213,7 +27626,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def get_backup_status_slot( @@ -26226,7 +27639,7 @@ def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -26248,6 +27661,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -26255,12 +27670,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26275,11 +27695,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26289,7 +27709,7 @@ def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -26311,6 +27731,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -26318,12 +27740,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26334,7 +27761,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -26351,9 +27778,9 @@ def list_backup_status_secrets_slot( 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. + 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 @@ -26376,6 +27803,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -26386,6 +27814,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -26393,7 +27822,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26408,10 +27841,10 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - def _restore_slot_initial( + def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26426,6 +27859,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -26436,6 +27870,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -26443,7 +27878,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26453,11 +27892,11 @@ def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore_slot( + def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26468,7 +27907,7 @@ def begin_restore_slot( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -26493,8 +27932,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26508,6 +27948,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26529,10 +27970,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -26544,7 +27984,7 @@ def list_configurations_slot( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -26560,6 +28000,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26573,6 +28015,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -26585,6 +28028,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26602,7 +28046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26616,7 +28064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -26629,7 +28077,7 @@ def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -26651,6 +28099,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -26660,6 +28109,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -26667,7 +28117,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26682,7 +28136,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -26695,7 +28149,7 @@ def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -26715,18 +28169,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26741,7 +28202,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -26755,7 +28216,7 @@ def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -26776,6 +28237,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -26785,6 +28247,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -26792,7 +28255,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26807,7 +28274,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -26820,7 +28287,7 @@ def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -26840,18 +28307,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26866,7 +28340,7 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace @@ -26880,7 +28354,7 @@ def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -26903,6 +28377,7 @@ def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -26912,6 +28387,7 @@ def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -26919,7 +28395,11 @@ def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26934,7 +28414,7 @@ def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -26947,7 +28427,7 @@ def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -26967,18 +28447,25 @@ def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26993,7 +28480,7 @@ def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -27007,7 +28494,7 @@ def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -27029,6 +28516,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27038,6 +28526,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -27045,7 +28534,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27060,11 +28553,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27073,7 +28566,7 @@ def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -27093,18 +28586,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27115,7 +28615,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -27128,7 +28628,7 @@ def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -27148,18 +28648,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27174,7 +28681,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -27188,7 +28695,7 @@ def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -27210,6 +28717,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -27219,6 +28727,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -27226,7 +28735,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27241,7 +28754,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -27254,7 +28767,7 @@ def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -27274,18 +28787,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27300,7 +28820,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -27313,7 +28833,7 @@ def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -27333,18 +28853,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27359,7 +28886,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -27373,7 +28900,7 @@ def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -27396,6 +28923,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -27405,6 +28933,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -27412,7 +28941,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27427,7 +28960,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -27441,7 +28974,7 @@ def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -27463,6 +28996,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -27472,6 +29006,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -27479,7 +29014,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27494,7 +29033,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -27507,7 +29046,7 @@ def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -27527,18 +29066,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27553,7 +29099,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -27569,18 +29115,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27594,7 +29147,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -27607,7 +29160,7 @@ def begin_list_publishing_credentials_slot( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -27628,7 +29181,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -27640,6 +29194,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -27663,10 +29218,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -27679,7 +29233,7 @@ def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -27700,6 +29254,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -27709,6 +29264,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -27716,7 +29272,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27731,7 +29291,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -27744,7 +29304,7 @@ def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -27763,18 +29323,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27789,7 +29356,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -27803,8 +29370,8 @@ def get_configuration_slot( """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. + 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 @@ -27824,18 +29391,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27850,7 +29424,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -27864,7 +29438,7 @@ def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -27886,6 +29460,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -27895,6 +29470,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -27902,7 +29478,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27917,7 +29497,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -27931,7 +29511,7 @@ def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -27953,6 +29533,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -27962,6 +29543,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -27969,7 +29551,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27984,7 +29570,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -27998,8 +29584,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -28015,6 +29601,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28028,6 +29616,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -28040,6 +29629,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28057,7 +29647,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28071,7 +29665,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -28084,7 +29678,7 @@ def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -28106,6 +29700,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -28113,12 +29709,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28133,11 +29734,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28147,7 +29748,7 @@ def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -28169,6 +29770,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -28176,12 +29779,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -28192,7 +29800,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -28205,7 +29813,7 @@ def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -28224,18 +29832,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28251,7 +29866,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -28264,7 +29879,7 @@ def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -28283,18 +29898,25 @@ def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28310,7 +29932,7 @@ def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -28323,7 +29945,7 @@ def list_continuous_web_jobs_slot( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -28339,6 +29961,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28352,6 +29976,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -28364,6 +29989,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28381,7 +30007,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28395,7 +30025,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -28408,7 +30038,7 @@ def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -28430,6 +30060,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28437,12 +30069,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28459,11 +30096,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28473,7 +30110,7 @@ def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -28495,6 +30132,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28502,12 +30141,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28518,11 +30162,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28532,7 +30176,7 @@ def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -28554,6 +30198,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28561,12 +30207,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28577,11 +30228,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28591,7 +30242,7 @@ def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -28613,6 +30264,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28620,12 +30273,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28636,7 +30294,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -28649,7 +30307,7 @@ def list_deployments_slot( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -28664,6 +30322,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28677,6 +30337,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -28689,6 +30350,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28706,7 +30368,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28720,7 +30386,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -28733,7 +30399,7 @@ def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -28755,6 +30421,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -28762,12 +30430,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28782,7 +30455,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -28797,7 +30470,7 @@ def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -28821,6 +30494,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -28831,6 +30505,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -28838,7 +30513,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28853,11 +30532,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28867,7 +30546,7 @@ def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -28889,6 +30568,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -28896,12 +30577,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28912,7 +30598,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -28926,7 +30612,7 @@ def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -28949,6 +30635,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -28956,12 +30644,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28976,7 +30669,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -28991,8 +30684,8 @@ def discover_backup_slot( """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. + 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 @@ -29015,6 +30708,7 @@ def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -29024,6 +30718,7 @@ def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -29031,7 +30726,11 @@ def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29046,7 +30745,7 @@ def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -29059,7 +30758,7 @@ def list_domain_ownership_identifiers_slot( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -29074,6 +30773,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29087,6 +30788,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -29099,6 +30801,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29116,7 +30819,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29130,7 +30837,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -29143,7 +30850,7 @@ def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -29165,6 +30872,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -29172,12 +30881,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29192,7 +30906,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29207,8 +30921,7 @@ def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -29232,6 +30945,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -29242,6 +30956,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -29249,7 +30964,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29264,11 +30983,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29278,7 +30997,7 @@ def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -29300,6 +31019,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -29307,12 +31028,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -29323,7 +31049,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29338,8 +31064,7 @@ def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -29363,6 +31088,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -29373,6 +31099,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -29380,7 +31107,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29395,7 +31126,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29408,7 +31139,7 @@ def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -29427,18 +31158,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29453,7 +31191,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -29470,6 +31208,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -29479,6 +31218,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -29486,7 +31226,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -29502,7 +31246,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -29516,7 +31260,7 @@ def begin_create_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -29539,8 +31283,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -29553,6 +31298,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -29577,10 +31323,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -29592,7 +31337,7 @@ def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -29611,18 +31356,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29639,7 +31391,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -29652,7 +31404,7 @@ def list_instance_functions_slot( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -29667,6 +31419,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29680,6 +31434,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -29692,6 +31447,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29709,7 +31465,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29723,7 +31483,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -29735,7 +31495,7 @@ def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -29754,18 +31514,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29780,7 +31547,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -29794,7 +31561,7 @@ def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -29815,6 +31582,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -29822,12 +31591,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29844,7 +31618,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -29862,6 +31636,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -29872,6 +31647,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -29879,7 +31655,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -29893,7 +31673,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -29908,7 +31688,7 @@ def begin_create_instance_function_slot( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -29933,8 +31713,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -29948,6 +31729,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -29972,13 +31754,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29988,7 +31769,7 @@ def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -30009,6 +31790,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -30016,12 +31799,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30032,7 +31820,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -30048,7 +31836,7 @@ def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -30073,6 +31861,7 @@ def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -30084,6 +31873,7 @@ def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -30091,7 +31881,11 @@ def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -30110,11 +31904,11 @@ def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret_slot( + def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30125,7 +31919,7 @@ def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -30148,6 +31942,8 @@ def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -30156,12 +31952,17 @@ def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30172,7 +31973,7 @@ def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -30186,7 +31987,7 @@ def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -30207,6 +32008,8 @@ def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -30214,12 +32017,17 @@ def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30234,7 +32042,7 @@ def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -30248,7 +32056,7 @@ def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -30269,6 +32077,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -30276,12 +32086,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30296,7 +32111,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -30309,7 +32124,7 @@ def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -30328,18 +32143,25 @@ def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30354,11 +32176,11 @@ def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status_slot( + def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30367,7 +32189,7 @@ def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -30386,18 +32208,25 @@ def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30408,11 +32237,11 @@ def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions_slot( + def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30421,7 +32250,7 @@ def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -30440,18 +32269,25 @@ def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30462,7 +32298,7 @@ def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace @@ -30478,7 +32314,7 @@ def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -30503,6 +32339,7 @@ def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -30514,6 +32351,7 @@ def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -30521,7 +32359,11 @@ def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -30540,11 +32382,11 @@ def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret_slot( + def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30555,7 +32397,7 @@ def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -30578,6 +32420,8 @@ def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -30586,12 +32430,17 @@ def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30602,7 +32451,7 @@ def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -30615,7 +32464,7 @@ def list_host_name_bindings_slot( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -30631,6 +32480,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30644,6 +32495,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -30656,6 +32508,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30673,7 +32526,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30687,7 +32544,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -30700,7 +32557,7 @@ def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -30722,6 +32579,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -30729,12 +32588,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30749,7 +32613,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -30764,7 +32628,7 @@ def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -30789,6 +32653,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -30799,6 +32664,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -30806,7 +32672,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30821,11 +32691,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30835,7 +32705,7 @@ def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -30857,6 +32727,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -30864,12 +32736,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30880,7 +32757,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -30895,7 +32772,7 @@ def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -30918,6 +32795,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -30926,12 +32805,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30946,7 +32830,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -30962,7 +32846,7 @@ def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -30987,6 +32871,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -30998,6 +32883,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -31005,7 +32891,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31020,11 +32910,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31035,7 +32925,7 @@ def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -31058,6 +32948,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -31066,12 +32958,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31082,7 +32979,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -31098,7 +32995,7 @@ def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -31123,6 +33020,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -31134,6 +33032,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -31141,7 +33040,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31156,7 +33059,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -31169,7 +33072,7 @@ def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -31188,18 +33091,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31214,7 +33124,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -31227,8 +33137,7 @@ def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -31248,18 +33157,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31274,7 +33190,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -31288,7 +33204,7 @@ def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -31310,6 +33226,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -31317,12 +33235,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31337,7 +33260,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31352,8 +33275,7 @@ def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -31377,6 +33299,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -31387,6 +33310,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -31394,7 +33318,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31409,11 +33337,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31423,7 +33351,7 @@ def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -31445,6 +33373,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -31452,12 +33382,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31468,7 +33403,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31483,8 +33418,7 @@ def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -31508,6 +33442,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -31518,6 +33453,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -31525,7 +33461,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31540,7 +33480,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31553,7 +33493,7 @@ def list_instance_identifiers_slot( ) -> Iterable["_models.WebAppInstanceCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -31569,6 +33509,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebAppInstanceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31582,6 +33524,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -31594,6 +33537,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31611,7 +33555,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31625,7 +33573,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_info_slot( @@ -31638,7 +33586,7 @@ def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -31660,6 +33608,8 @@ def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -31667,12 +33617,17 @@ def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31687,7 +33642,7 @@ def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -31701,7 +33656,7 @@ def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -31722,6 +33677,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -31729,12 +33686,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31749,7 +33711,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -31767,6 +33729,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -31777,6 +33740,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -31784,7 +33748,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -31800,7 +33768,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -31815,7 +33783,7 @@ def begin_create_instance_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -31840,8 +33808,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -31855,6 +33824,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -31879,10 +33849,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -31895,7 +33864,7 @@ def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -31916,6 +33885,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -31923,12 +33894,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31945,7 +33921,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -31960,8 +33936,8 @@ def list_instance_processes_slot( """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. + 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 @@ -31979,6 +33955,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31993,6 +33971,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -32006,6 +33985,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32023,7 +34003,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32037,7 +34021,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -32051,8 +34035,7 @@ def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -32077,6 +34060,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -32085,12 +34070,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32107,11 +34097,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32123,8 +34113,8 @@ def delete_instance_process_slot( """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. + 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 @@ -32149,6 +34139,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -32157,12 +34149,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -32173,7 +34170,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -32188,8 +34185,7 @@ def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -32214,6 +34210,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -32222,12 +34220,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32244,7 +34247,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -32260,8 +34263,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -32282,6 +34285,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32297,6 +34302,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -32311,6 +34317,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32328,7 +34335,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32342,7 +34353,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -32357,8 +34368,7 @@ def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -32385,6 +34395,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -32394,12 +34406,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32416,7 +34433,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -32431,8 +34448,7 @@ def list_instance_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -32453,6 +34469,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32468,6 +34486,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -32482,6 +34501,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32499,7 +34519,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32513,7 +34537,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable_slot( @@ -32525,7 +34549,7 @@ def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -32545,18 +34569,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32571,7 +34602,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -32584,7 +34615,7 @@ def list_site_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -32599,6 +34630,8 @@ def list_site_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32612,6 +34645,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -32624,6 +34658,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32641,7 +34676,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32655,7 +34694,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers_slot( @@ -32667,7 +34706,7 @@ def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -32686,18 +34725,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32712,7 +34758,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -32726,8 +34772,8 @@ def get_migrate_my_sql_status_slot( """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. + 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 @@ -32746,18 +34792,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32772,7 +34825,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -32785,7 +34838,7 @@ def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -32805,18 +34858,25 @@ def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32831,7 +34891,7 @@ def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -32848,9 +34908,9 @@ def create_or_update_swift_virtual_network_connection_slot( 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 + 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. @@ -32873,6 +34933,7 @@ def create_or_update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -32882,6 +34943,7 @@ def create_or_update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_slot.metadata['url'], @@ -32889,7 +34951,11 @@ def create_or_update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32904,11 +34970,11 @@ def create_or_update_swift_virtual_network_connection_slot( 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'} # type: ignore + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network_slot( + def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32917,7 +34983,7 @@ def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -32937,18 +35003,25 @@ def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32959,7 +35032,7 @@ def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -32976,9 +35049,9 @@ def update_swift_virtual_network_connection_slot( 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 + 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. @@ -33001,6 +35074,7 @@ def update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -33010,6 +35084,7 @@ def update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_slot.metadata['url'], @@ -33017,7 +35092,11 @@ def update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33032,7 +35111,7 @@ def update_swift_virtual_network_connection_slot( return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -33046,7 +35125,7 @@ def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -33068,6 +35147,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -33075,12 +35156,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33097,7 +35183,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -33111,8 +35197,7 @@ def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33134,6 +35219,8 @@ def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -33141,12 +35228,17 @@ def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33165,7 +35257,7 @@ def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -33181,7 +35273,7 @@ def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -33189,11 +35281,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -33206,12 +35298,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -33220,7 +35315,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33235,7 +35334,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_slot_initial( @@ -33254,12 +35353,15 @@ def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -33268,7 +35370,11 @@ def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33286,7 +35392,7 @@ def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -33302,7 +35408,7 @@ def begin_start_web_site_network_trace_operation_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -33310,11 +35416,11 @@ def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -33329,7 +35435,8 @@ def begin_start_web_site_network_trace_operation_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -33344,6 +35451,7 @@ def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -33367,13 +35475,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace_slot( + def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33382,7 +35489,7 @@ def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -33401,18 +35508,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -33423,7 +35537,7 @@ def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace @@ -33437,8 +35551,7 @@ def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33460,6 +35573,8 @@ def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -33467,12 +35582,17 @@ def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33487,7 +35607,7 @@ def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -33501,8 +35621,7 @@ def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33524,6 +35643,8 @@ def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -33531,12 +35652,17 @@ def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33555,7 +35681,7 @@ def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -33569,8 +35695,7 @@ def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33592,6 +35717,8 @@ def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -33599,12 +35726,17 @@ def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33619,11 +35751,11 @@ def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33632,8 +35764,7 @@ def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -33653,18 +35784,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -33675,7 +35813,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -33689,7 +35827,7 @@ def list_perf_mon_counters_slot( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -33699,7 +35837,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -33708,6 +35846,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33721,6 +35861,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -33734,6 +35875,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -33752,7 +35894,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33766,7 +35912,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -33778,7 +35924,7 @@ def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -33797,18 +35943,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33823,7 +35976,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -33836,7 +35989,7 @@ def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -33856,18 +36009,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33882,7 +36042,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -33896,7 +36056,7 @@ def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -33918,6 +36078,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -33925,12 +36087,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33945,7 +36112,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -33960,7 +36127,7 @@ def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -33984,6 +36151,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -33994,6 +36162,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -34001,7 +36170,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34016,11 +36189,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34030,7 +36203,7 @@ def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -34052,6 +36225,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -34059,12 +36234,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34075,7 +36255,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -34090,7 +36270,7 @@ def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -34114,6 +36294,7 @@ def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -34124,6 +36305,7 @@ def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -34131,7 +36313,11 @@ def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34146,7 +36332,7 @@ def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -34160,8 +36346,8 @@ def get_private_access_slot( """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. + 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 @@ -34180,18 +36366,25 @@ def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34206,7 +36399,7 @@ def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -34221,8 +36414,8 @@ def put_private_access_vnet_slot( """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. + 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 @@ -34243,6 +36436,7 @@ def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -34252,6 +36446,7 @@ def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -34259,7 +36454,11 @@ def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34274,7 +36473,7 @@ def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -34287,7 +36486,7 @@ def get_private_endpoint_connection( ) -> "_models.PrivateEndpointConnectionResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34306,18 +36505,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34332,7 +36538,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -34349,6 +36555,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -34358,6 +36565,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -34365,7 +36573,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -34383,7 +36595,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -34397,7 +36609,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.PrivateEndpointConnectionResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -34422,8 +36634,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.PrivateEndpointConnectionResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -34436,6 +36649,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -34460,10 +36674,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -34478,18 +36691,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -34510,7 +36730,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -34523,7 +36743,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34543,7 +36763,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -34555,6 +36776,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -34578,10 +36800,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -34592,7 +36813,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34609,17 +36830,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34634,7 +36862,7 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -34648,8 +36876,8 @@ def list_processes_slot( """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. + 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 @@ -34664,6 +36892,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34677,6 +36907,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -34689,6 +36920,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34706,7 +36938,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34720,7 +36956,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -34733,8 +36969,7 @@ def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34756,6 +36991,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -34763,12 +37000,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34785,11 +37027,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34800,8 +37042,8 @@ def delete_process_slot( """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. + 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 @@ -34823,6 +37065,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -34830,12 +37074,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -34846,7 +37095,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -34860,8 +37109,7 @@ def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -34883,6 +37131,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -34890,12 +37140,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34912,7 +37167,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -34927,8 +37182,8 @@ def list_process_modules_slot( """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. + 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 @@ -34946,6 +37201,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34960,6 +37217,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -34973,6 +37231,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34990,7 +37249,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35004,7 +37267,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -35018,8 +37281,7 @@ def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -35043,6 +37305,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -35051,12 +37315,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35073,7 +37342,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -35087,8 +37356,7 @@ def list_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -35106,6 +37374,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35120,6 +37390,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -35133,6 +37404,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35150,7 +37422,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35164,7 +37440,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -35176,7 +37452,7 @@ def list_public_certificates_slot( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -35192,6 +37468,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35205,6 +37483,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -35217,6 +37496,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35234,7 +37514,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35248,7 +37532,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -35261,7 +37545,7 @@ def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -35283,6 +37567,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -35290,12 +37576,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35310,7 +37601,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -35325,7 +37616,7 @@ def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -35350,6 +37641,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -35360,6 +37652,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -35367,7 +37660,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35382,11 +37679,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35396,7 +37693,7 @@ def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -35418,6 +37715,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -35425,12 +37724,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35441,7 +37745,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -35455,7 +37759,7 @@ def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -35479,6 +37783,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -35488,6 +37793,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -35495,7 +37801,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35510,11 +37820,11 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35524,8 +37834,8 @@ def reset_slot_configuration_slot( """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. + 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 @@ -35545,18 +37855,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35567,11 +37884,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35582,7 +37899,7 @@ def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -35592,10 +37909,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -35608,12 +37926,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -35621,7 +37942,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35632,10 +37957,10 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - def _restore_from_backup_blob_slot_initial( + def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35649,6 +37974,7 @@ def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -35658,6 +37984,7 @@ def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -35665,7 +37992,11 @@ def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35675,11 +38006,11 @@ def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob_slot( + def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35689,7 +38020,7 @@ def begin_restore_from_backup_blob_slot( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -35712,8 +38043,9 @@ def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -35726,6 +38058,7 @@ def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -35747,12 +38080,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_slot_initial( + def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35766,6 +38098,7 @@ def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -35775,6 +38108,7 @@ def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -35782,7 +38116,11 @@ def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35792,11 +38130,11 @@ def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app_slot( + def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35806,7 +38144,7 @@ def begin_restore_from_deleted_app_slot( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -35828,8 +38166,9 @@ def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -35842,6 +38181,7 @@ def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -35863,12 +38203,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_slot_initial( + def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35882,6 +38221,7 @@ def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -35891,6 +38231,7 @@ def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -35898,7 +38239,11 @@ def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35908,11 +38253,11 @@ def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot_slot( + def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35922,7 +38267,7 @@ def begin_restore_snapshot_slot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -35945,8 +38290,9 @@ def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -35959,6 +38305,7 @@ def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -35980,10 +38327,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -35995,7 +38341,7 @@ def list_site_extensions_slot( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -36011,6 +38357,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36024,6 +38372,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -36036,6 +38385,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36053,7 +38403,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36067,7 +38421,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -36080,7 +38434,7 @@ def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -36102,6 +38456,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -36109,12 +38465,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36131,7 +38492,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -36148,6 +38509,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -36155,12 +38518,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -36179,7 +38547,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -36193,7 +38561,7 @@ def begin_install_site_extension_slot( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -36217,7 +38585,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -36230,6 +38599,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -36253,13 +38623,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36269,7 +38638,7 @@ def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -36291,6 +38660,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -36298,12 +38669,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -36314,10 +38690,10 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore - def _copy_slot_initial( + def _copy_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36331,6 +38707,7 @@ def _copy_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -36340,6 +38717,7 @@ def _copy_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_slot_initial.metadata['url'], @@ -36347,7 +38725,11 @@ def _copy_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36357,11 +38739,11 @@ def _copy_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + _copy_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace - def begin_copy_slot( + def begin_copy_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36371,7 +38753,7 @@ def begin_copy_slot( ) -> LROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -36395,8 +38777,9 @@ def begin_copy_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36409,6 +38792,7 @@ def begin_copy_slot( name=name, slot=slot, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36430,10 +38814,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + begin_copy_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace def list_slot_differences_slot( @@ -36446,7 +38829,7 @@ def list_slot_differences_slot( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -36464,6 +38847,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -36480,6 +38864,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -36495,6 +38880,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -36514,7 +38900,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36528,9 +38918,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36544,6 +38934,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -36553,6 +38944,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -36560,7 +38952,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36570,11 +38966,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36584,7 +38980,7 @@ def begin_swap_slot( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -36607,8 +39003,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36621,6 +39018,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36642,10 +39040,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -36657,7 +39054,7 @@ def list_snapshots_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -36670,6 +39067,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36683,6 +39082,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -36695,6 +39095,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36712,7 +39113,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36726,7 +39131,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -36738,7 +39143,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -36751,6 +39156,8 @@ def list_snapshots_from_dr_secondary_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36764,6 +39171,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -36776,6 +39184,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36793,7 +39202,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36807,7 +39220,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control_slot( @@ -36819,7 +39232,7 @@ def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -36839,18 +39252,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -36872,7 +39292,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -36889,6 +39309,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -36898,6 +39319,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -36905,7 +39327,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -36926,7 +39352,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -36940,7 +39366,7 @@ def begin_create_or_update_source_control_slot( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -36964,8 +39390,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -36978,6 +39405,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37002,13 +39430,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37017,7 +39444,7 @@ def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -37037,18 +39464,25 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -37059,7 +39493,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -37073,7 +39507,7 @@ def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -37095,6 +39529,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -37104,6 +39539,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -37111,7 +39547,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37133,11 +39573,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37146,7 +39586,7 @@ def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -37166,18 +39606,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37188,7 +39635,7 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore def _start_network_trace_slot_initial( @@ -37207,12 +39654,15 @@ def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -37221,7 +39671,11 @@ def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37239,7 +39693,7 @@ def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace @@ -37255,7 +39709,7 @@ def begin_start_network_trace_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -37263,11 +39717,11 @@ def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -37282,7 +39736,8 @@ def begin_start_network_trace_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -37297,6 +39752,7 @@ def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -37320,13 +39776,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37335,7 +39790,7 @@ def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -37355,18 +39810,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37377,11 +39839,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def stop_network_trace_slot( + def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37390,7 +39852,7 @@ def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -37409,18 +39871,25 @@ def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37431,11 +39900,11 @@ def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37444,7 +39913,7 @@ def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -37463,18 +39932,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37485,11 +39961,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37498,7 +39974,7 @@ def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -37517,18 +39993,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -37539,7 +40022,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -37552,7 +40035,7 @@ def list_triggered_web_jobs_slot( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -37568,6 +40051,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37581,6 +40066,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -37593,6 +40079,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37610,7 +40097,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37624,7 +40115,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -37637,7 +40128,7 @@ def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -37659,6 +40150,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -37666,12 +40159,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37688,11 +40186,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37702,7 +40200,7 @@ def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -37724,6 +40222,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -37731,12 +40231,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37747,7 +40252,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -37761,7 +40266,7 @@ def list_triggered_web_job_history_slot( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -37779,6 +40284,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37793,6 +40300,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -37806,6 +40314,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37823,7 +40332,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37837,7 +40350,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -37851,8 +40364,7 @@ def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -37876,6 +40388,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -37884,12 +40398,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37906,11 +40425,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37920,7 +40439,7 @@ def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -37942,6 +40461,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -37949,12 +40470,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37965,7 +40491,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -37979,7 +40505,7 @@ def list_usages_slot( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -37991,7 +40517,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -38000,6 +40526,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38013,6 +40541,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -38026,6 +40555,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -38044,7 +40574,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38058,7 +40592,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -38070,7 +40604,7 @@ def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -38090,18 +40624,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38116,7 +40657,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -38130,7 +40671,7 @@ def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -38152,6 +40693,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -38159,12 +40702,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38179,7 +40727,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38195,8 +40743,8 @@ def create_or_update_vnet_connection_slot( """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). + 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 @@ -38220,6 +40768,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -38230,6 +40779,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -38237,7 +40787,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38252,11 +40806,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38266,8 +40820,7 @@ def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -38289,6 +40842,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -38296,12 +40851,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38312,7 +40872,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38328,8 +40888,8 @@ def update_vnet_connection_slot( """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). + 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 @@ -38353,6 +40913,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -38363,6 +40924,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -38370,7 +40932,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38385,7 +40951,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38400,7 +40966,7 @@ def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -38424,6 +40990,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -38432,12 +41000,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38454,7 +41027,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38470,7 +41043,7 @@ def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -38496,6 +41069,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -38507,6 +41081,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -38514,7 +41089,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38529,7 +41108,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38545,7 +41124,7 @@ def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -38571,6 +41150,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -38582,6 +41162,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -38589,7 +41170,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38604,7 +41189,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38617,7 +41202,7 @@ def list_web_jobs_slot( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -38631,6 +41216,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38644,6 +41231,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -38656,6 +41244,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38673,7 +41262,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38687,7 +41280,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -38700,7 +41293,7 @@ def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -38722,6 +41315,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -38729,12 +41324,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38749,7 +41349,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -38762,7 +41362,7 @@ def list_slot_differences_from_production( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -38777,6 +41377,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -38792,6 +41393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -38806,6 +41408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -38825,7 +41428,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38839,9 +41446,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38854,6 +41461,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -38862,6 +41470,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -38869,7 +41478,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38879,11 +41492,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38892,7 +41505,7 @@ def begin_swap_slot_with_production( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -38912,8 +41525,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38925,6 +41539,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38946,10 +41561,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -38960,7 +41574,7 @@ def list_snapshots( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -38971,6 +41585,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38983,6 +41599,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -38994,6 +41611,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39011,7 +41629,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39025,7 +41647,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -39036,7 +41658,7 @@ def list_snapshots_from_dr_secondary( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -39047,6 +41669,8 @@ def list_snapshots_from_dr_secondary( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39059,6 +41683,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -39070,6 +41695,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39087,7 +41713,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39101,7 +41731,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control( @@ -39112,7 +41742,7 @@ def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -39129,17 +41759,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39161,7 +41798,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -39177,6 +41814,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39185,6 +41823,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -39192,7 +41831,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39213,7 +41856,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39226,7 +41869,7 @@ def begin_create_or_update_source_control( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -39247,8 +41890,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2019_08_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -39260,6 +41904,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -39284,13 +41929,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39298,7 +41942,7 @@ def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -39315,17 +41959,24 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -39336,7 +41987,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39349,7 +42000,7 @@ def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -39368,6 +42019,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39376,6 +42028,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -39383,7 +42036,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39405,11 +42062,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39417,7 +42074,7 @@ def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -39434,17 +42091,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39455,7 +42119,7 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore def _start_network_trace_initial( @@ -39473,11 +42137,14 @@ def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -39486,7 +42153,11 @@ def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39504,7 +42175,7 @@ def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace @@ -39519,17 +42190,17 @@ def begin_start_network_trace( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -39544,7 +42215,8 @@ def begin_start_network_trace( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2019_08_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -39558,6 +42230,7 @@ def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -39581,13 +42254,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39595,7 +42267,7 @@ def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -39612,17 +42284,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39633,11 +42312,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def stop_network_trace( + def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39645,7 +42324,7 @@ def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -39662,17 +42341,24 @@ def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39683,11 +42369,11 @@ def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39695,7 +42381,7 @@ def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -39712,17 +42398,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39733,11 +42426,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39745,7 +42438,7 @@ def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -39762,17 +42455,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -39783,7 +42483,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -39795,7 +42495,7 @@ def list_triggered_web_jobs( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -39808,6 +42508,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39820,6 +42522,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -39831,6 +42534,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39848,7 +42552,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39862,7 +42570,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -39874,7 +42582,7 @@ def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39893,18 +42601,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39921,11 +42636,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39934,7 +42649,7 @@ def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39953,18 +42668,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39975,7 +42697,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -39988,7 +42710,7 @@ def list_triggered_web_job_history( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -40003,6 +42725,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40016,6 +42740,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -40028,6 +42753,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40045,7 +42771,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40059,7 +42789,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -40072,8 +42802,7 @@ def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -40094,6 +42823,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -40101,12 +42832,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40123,11 +42859,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40136,7 +42872,7 @@ def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -40155,18 +42891,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40177,7 +42920,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -40190,7 +42933,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -40199,7 +42942,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -40208,6 +42951,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40220,6 +42965,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -40232,6 +42978,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -40250,7 +42997,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40264,7 +43015,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -40275,7 +43026,7 @@ def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -40292,17 +43043,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40317,7 +43075,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -40330,7 +43088,7 @@ def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -40349,18 +43107,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40375,7 +43140,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40390,8 +43155,8 @@ def create_or_update_vnet_connection( """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). + 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 @@ -40412,6 +43177,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40421,6 +43187,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -40428,7 +43195,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40443,11 +43214,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40456,8 +43227,7 @@ def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -40476,18 +43246,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40498,7 +43275,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40513,8 +43290,8 @@ def update_vnet_connection( """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). + 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 @@ -40535,6 +43312,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40544,6 +43322,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -40551,7 +43330,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40566,7 +43349,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40580,7 +43363,7 @@ def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -40601,6 +43384,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -40608,12 +43393,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40630,7 +43420,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40645,7 +43435,7 @@ def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40668,6 +43458,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40678,6 +43469,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -40685,7 +43477,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40700,7 +43496,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40715,7 +43511,7 @@ def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40738,6 +43534,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40748,6 +43545,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -40755,7 +43553,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40770,7 +43572,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40782,7 +43584,7 @@ def list_web_jobs( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -40793,6 +43595,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40805,6 +43609,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -40816,6 +43621,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40833,7 +43639,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40847,7 +43657,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -40859,7 +43669,7 @@ def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -40878,18 +43688,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40904,5 +43721,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_site_management_client_operations.py index c9d6e45d05ef..dcbca964c5e4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2019_08_01/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,34 @@ def build_list_billing_meters_request( os_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') if os_type is not None: - query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,33 +231,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,29 +268,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -300,37 +305,38 @@ def build_list_geo_regions_request( linux_dynamic_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: - query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + _query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') if linux_dynamic_workers_enabled is not None: - query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -342,33 +348,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -379,29 +385,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -410,29 +417,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2019-08-01" + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -444,33 +452,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,34 +493,34 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -527,34 +535,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -569,34 +577,34 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2019-08-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -611,7 +619,7 @@ def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -624,14 +632,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -646,7 +661,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -657,7 +672,7 @@ def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2019_08_01.models.User @@ -672,11 +687,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -684,7 +701,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -699,7 +720,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -709,7 +730,7 @@ def list_source_controls( ) -> Iterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -718,6 +739,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -727,6 +750,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -735,6 +759,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -752,7 +777,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -766,7 +795,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -776,7 +805,7 @@ def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -791,15 +820,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -814,7 +850,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -826,7 +862,7 @@ def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -843,12 +879,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -856,7 +894,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -871,7 +913,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -883,11 +925,11 @@ def list_billing_meters( ) -> Iterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -895,6 +937,8 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -905,6 +949,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -916,6 +961,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -935,7 +981,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -949,7 +999,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace def check_name_availability( @@ -961,13 +1011,13 @@ def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2019_08_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -980,6 +1030,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -987,6 +1038,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -994,7 +1046,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1009,7 +1065,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -1019,7 +1075,7 @@ def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -1032,15 +1088,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1055,7 +1118,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -1069,24 +1132,26 @@ def list_geo_regions( ) -> Iterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2019_08_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1097,6 +1162,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1110,6 +1176,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1131,7 +1198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1145,7 +1216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1155,7 +1226,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> Iterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2019_08_01.models.NameIdentifier @@ -1165,6 +1236,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1178,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1190,6 +1263,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1209,7 +1283,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1223,7 +1301,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1232,7 +1310,7 @@ def list_premier_add_on_offers( ) -> Iterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -1241,6 +1319,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2019_08_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1251,6 +1331,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1260,6 +1341,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1277,7 +1359,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1291,7 +1377,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1300,7 +1386,7 @@ def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -1313,15 +1399,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1336,7 +1429,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1348,8 +1441,8 @@ def verify_hosting_environment_vnet( """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. + 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 @@ -1364,12 +1457,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1377,7 +1472,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,11 +1491,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1404,7 +1503,7 @@ def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -1421,6 +1520,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1428,6 +1528,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1435,7 +1536,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1446,7 +1551,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1458,7 +1563,7 @@ def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -1475,6 +1580,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1482,6 +1588,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1489,7 +1596,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1504,11 +1615,11 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1516,7 +1627,7 @@ def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -1533,6 +1644,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2019-08-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1540,6 +1652,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1547,7 +1660,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1558,5 +1675,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_configuration.py index ab511a112be4..e0ef0f4a276e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2020-06-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-06-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_metadata.json index d71544cbac3b..a9a7f1a5d7f3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -120,192 +120,192 @@ "get_publishing_user" : { "sync": { "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_publishing_user(\n self,\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "update_publishing_user" : { "sync": { "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_06_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_06_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_06_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_06_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "user_details" }, "list_source_controls" : { "sync": { "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.SourceControlCollection\"]\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_source_controls(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_source_control" : { "sync": { "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type" }, "update_source_control" : { "sync": { "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type, request_message" }, "list_billing_meters" : { "sync": { "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.BillingMeterCollection\"]\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "billing_location, os_type" }, "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, "get_subscription_deployment_locations" : { "sync": { "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.DeploymentLocations\"\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs: Any\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" }, "list_site_identifiers_assigned_to_host_name" : { "sync": { "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.IdentifierCollection\"]\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name_identifier" }, "list_premier_add_on_offers" : { "sync": { "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.PremierAddOnOfferCollection\"]\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_premier_add_on_offers(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_skus" : { "sync": { "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SkuInfos\"\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def list_skus(\n self,\n **kwargs: Any\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "verify_hosting_environment_vnet" : { "sync": { "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.VnetValidationFailureDetails\"\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs: Any\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_06_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "parameters" }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" }, "validate" : { "sync": { "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ValidateResponse\"\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_06_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_06_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs: Any\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_06_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_06_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_06_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, validate_request" }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_06_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" } diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_web_site_management_client.py index b93a303aa4eb..69a3e29c0560 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -64,8 +65,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2020-06-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -103,7 +107,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_configuration.py index 538f33413ed4..21232a308a69 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2020-06-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-06-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_web_site_management_client.py index e6ead5eb0834..e92926a2a7b9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -64,8 +65,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2020-06-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_certificate_orders_operations.py index c6ec29482b8c..7155b88adcc5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,17 +121,17 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -140,12 +147,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -153,7 +162,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -164,7 +177,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -175,7 +188,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -186,6 +199,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -197,6 +212,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -207,6 +223,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -224,7 +241,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +259,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -249,7 +270,7 @@ async def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -266,17 +287,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -291,7 +319,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -307,6 +335,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -315,6 +344,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -322,7 +352,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -340,7 +374,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -353,7 +387,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -376,8 +410,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -389,6 +424,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -413,13 +449,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -427,7 +462,7 @@ async def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -444,17 +479,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -465,7 +507,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -478,7 +520,7 @@ async def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -498,6 +540,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -506,6 +549,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -513,7 +557,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -532,7 +580,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -544,7 +592,7 @@ def list_certificates( ) -> AsyncIterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -557,6 +605,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +619,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -580,6 +631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -597,7 +649,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -611,7 +667,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -623,7 +679,7 @@ async def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -642,18 +698,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -668,7 +731,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -685,6 +748,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -694,6 +758,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -701,7 +766,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -719,7 +788,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -733,7 +802,7 @@ async def begin_create_or_update_certificate( ) -> AsyncLROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -757,8 +826,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -771,6 +841,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -795,13 +866,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -810,7 +880,7 @@ async def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -829,18 +899,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -851,7 +928,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -865,7 +942,7 @@ async def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -887,6 +964,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -896,6 +974,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -903,7 +982,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -922,11 +1005,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -935,7 +1018,7 @@ async def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -955,6 +1038,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -963,6 +1047,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -970,7 +1055,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -981,11 +1070,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -994,7 +1083,7 @@ async def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1014,6 +1103,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1022,6 +1112,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1029,7 +1120,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1040,11 +1135,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1052,7 +1147,7 @@ async def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1069,17 +1164,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1090,11 +1192,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1103,7 +1205,7 @@ async def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1122,6 +1224,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1130,6 +1233,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1137,7 +1241,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1148,7 +1256,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1161,7 +1269,7 @@ async def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1180,6 +1288,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1188,6 +1297,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1195,7 +1305,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,11 +1324,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1222,7 +1336,7 @@ async def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1239,17 +1353,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1260,7 +1381,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1272,7 +1393,7 @@ async def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -1289,17 +1410,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1442,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1326,7 +1454,7 @@ async def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -1343,17 +1471,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,5 +1503,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py index d347513921bd..c727d69a100f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -292,7 +320,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -305,7 +333,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -328,8 +356,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -341,6 +370,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -365,12 +395,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,18 +412,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -404,11 +440,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -417,7 +453,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -438,7 +474,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -450,6 +487,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -470,10 +508,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -485,7 +522,7 @@ async def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -505,6 +542,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -513,6 +551,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -520,7 +559,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -542,7 +585,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -554,7 +597,7 @@ def list_capacities( ) -> AsyncIterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -567,6 +610,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -579,6 +624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -590,6 +636,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -607,7 +654,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +672,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def get_vip_info( @@ -632,7 +683,7 @@ async def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -649,17 +700,24 @@ async def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +732,7 @@ async def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore async def _change_vnet_initial( @@ -690,6 +748,7 @@ async def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -698,6 +757,7 @@ async def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -705,7 +765,11 @@ async def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -723,7 +787,7 @@ async def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -736,7 +800,7 @@ async def begin_change_vnet( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -759,6 +823,7 @@ async def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -774,6 +839,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -788,6 +854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -807,7 +874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -818,7 +889,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -830,6 +901,7 @@ async def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -840,8 +912,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -857,10 +928,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -872,7 +942,7 @@ async def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -889,17 +959,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +991,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -927,7 +1004,7 @@ async def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -946,18 +1023,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -972,7 +1056,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -984,8 +1068,7 @@ def get_inbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -998,6 +1081,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1010,6 +1095,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1021,6 +1107,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1038,7 +1125,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1052,7 +1143,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -1063,7 +1154,7 @@ def list_multi_role_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -1076,6 +1167,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1088,6 +1181,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -1099,6 +1193,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1116,7 +1211,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1130,7 +1229,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1141,7 +1240,7 @@ async def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -1158,17 +1257,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1183,7 +1289,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1199,6 +1305,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1207,6 +1314,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1214,7 +1322,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1344,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1245,7 +1357,7 @@ async def begin_create_or_update_multi_role_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -1267,8 +1379,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1280,6 +1393,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1304,10 +1418,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1319,7 +1432,7 @@ async def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -1338,6 +1451,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1346,6 +1460,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1353,7 +1468,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1372,7 +1491,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1386,8 +1505,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -1402,6 +1521,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1415,6 +1536,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1427,6 +1549,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1444,7 +1567,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1458,7 +1585,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1469,7 +1596,7 @@ def list_multi_role_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -1482,6 +1609,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1494,6 +1623,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1505,6 +1635,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1522,7 +1653,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1671,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1547,7 +1682,7 @@ def list_multi_role_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -1559,6 +1694,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1571,6 +1708,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1582,6 +1720,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1599,7 +1738,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,7 +1756,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1624,7 +1767,7 @@ def list_multi_role_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -1636,6 +1779,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1648,6 +1793,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1805,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1823,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1841,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -1701,7 +1852,7 @@ async def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -1718,17 +1869,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1743,7 +1901,7 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -1755,8 +1913,7 @@ def get_outbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -1769,6 +1926,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1781,6 +1940,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1792,6 +1952,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1809,7 +1970,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1823,10 +1988,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1834,7 +1999,7 @@ async def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -1851,17 +2016,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1872,7 +2044,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -1887,17 +2059,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1915,7 +2094,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -1927,7 +2106,7 @@ async def begin_resume( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -1948,6 +2127,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1960,6 +2141,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -1971,6 +2153,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1988,7 +2171,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1999,7 +2186,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2010,6 +2197,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2019,8 +2207,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2036,10 +2223,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2051,7 +2237,7 @@ def list_app_service_plans( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -2064,6 +2250,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2076,6 +2264,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2087,6 +2276,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2104,7 +2294,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2118,7 +2312,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2130,13 +2324,14 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2144,6 +2339,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2156,6 +2353,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2168,6 +2366,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2186,7 +2385,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2200,7 +2403,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2214,17 +2417,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2242,7 +2452,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2254,7 +2464,7 @@ async def begin_suspend( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -2275,6 +2485,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2287,6 +2499,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2298,6 +2511,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2315,7 +2529,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2326,7 +2544,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2337,6 +2555,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2346,8 +2565,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2363,10 +2581,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2379,7 +2596,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -2388,7 +2605,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2397,6 +2614,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2409,6 +2628,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2421,6 +2641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2439,7 +2660,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2453,7 +2678,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -2464,7 +2689,7 @@ def list_worker_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -2477,6 +2702,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2489,6 +2716,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -2500,6 +2728,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2517,7 +2746,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2531,7 +2764,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -2543,7 +2776,7 @@ async def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -2562,18 +2795,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2588,7 +2828,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -2605,6 +2845,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2614,6 +2855,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -2621,7 +2863,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2639,7 +2885,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -2653,7 +2899,7 @@ async def begin_create_or_update_worker_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -2677,8 +2923,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2691,6 +2938,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2715,10 +2963,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -2731,7 +2978,7 @@ async def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -2752,6 +2999,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2761,6 +3009,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -2768,7 +3017,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2787,7 +3040,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -2801,8 +3054,7 @@ def list_worker_pool_instance_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -2819,6 +3071,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2833,6 +3087,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2846,6 +3101,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2863,7 +3119,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2877,7 +3137,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -2889,7 +3149,7 @@ def list_web_worker_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -2904,6 +3164,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2917,6 +3179,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2929,6 +3192,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2946,7 +3210,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2960,7 +3228,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -2972,7 +3240,7 @@ def list_worker_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -2986,6 +3254,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2999,6 +3269,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3011,6 +3282,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3028,7 +3300,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3042,7 +3318,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3054,7 +3330,7 @@ def list_web_worker_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -3068,6 +3344,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3081,6 +3359,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3093,6 +3372,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3110,7 +3390,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3124,4 +3408,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_plans_operations.py index 9fd9c94b04ef..e858e043f5af 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -131,7 +138,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -142,6 +149,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -153,6 +162,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -163,6 +173,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -180,7 +191,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +209,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -205,7 +220,7 @@ async def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -222,17 +237,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -249,7 +271,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -265,6 +287,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -273,6 +296,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -280,7 +304,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -298,7 +326,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -311,7 +339,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -332,8 +360,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -345,6 +374,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -369,13 +399,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,7 +412,7 @@ async def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -400,17 +429,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -421,7 +457,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -434,7 +470,7 @@ async def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -453,6 +489,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -461,6 +498,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -468,7 +506,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -487,7 +529,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -499,7 +541,7 @@ async def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -516,17 +558,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -541,7 +590,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -555,7 +604,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -576,6 +625,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -583,12 +634,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -603,11 +659,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -617,7 +673,7 @@ async def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -638,6 +694,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -645,12 +703,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -661,7 +724,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -675,7 +738,7 @@ async def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -696,6 +759,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -703,12 +768,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -723,7 +793,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -737,7 +807,7 @@ def list_web_apps_by_hybrid_connection( ) -> AsyncIterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -753,6 +823,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -767,6 +839,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -780,6 +853,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -797,7 +871,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -811,7 +889,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -822,7 +900,7 @@ async def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -839,17 +917,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,7 +949,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -876,7 +961,7 @@ def list_hybrid_connections( ) -> AsyncIterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -889,6 +974,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -901,6 +988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -912,6 +1000,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -929,7 +1018,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -943,10 +1036,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -955,7 +1048,7 @@ async def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -976,18 +1069,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -998,7 +1098,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1013,7 +1113,7 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -1021,12 +1121,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1034,6 +1135,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1046,6 +1149,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1060,6 +1164,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1080,7 +1185,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1094,7 +1203,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1105,7 +1214,7 @@ async def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -1122,17 +1231,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1147,7 +1263,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1160,14 +1276,15 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1176,6 +1293,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1188,6 +1307,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1200,6 +1320,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1218,7 +1339,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1232,7 +1357,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1243,7 +1368,7 @@ async def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -1260,17 +1385,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1285,7 +1417,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1298,7 +1430,7 @@ async def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -1317,18 +1449,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1345,7 +1484,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1359,7 +1498,7 @@ async def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -1380,6 +1519,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1387,12 +1528,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1407,7 +1553,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1422,7 +1568,7 @@ async def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -1445,6 +1591,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1455,6 +1602,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1462,7 +1610,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1477,7 +1629,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1490,8 +1642,7 @@ async def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -1510,18 +1661,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1694,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1550,7 +1708,7 @@ async def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -1571,6 +1729,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1578,12 +1738,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1600,7 +1765,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1615,7 +1780,7 @@ async def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1638,6 +1803,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1648,6 +1814,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1655,7 +1822,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1672,11 +1843,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1686,7 +1857,7 @@ async def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -1707,6 +1878,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1714,12 +1887,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1730,7 +1908,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1745,7 +1923,7 @@ async def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1768,6 +1946,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1778,6 +1957,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1785,7 +1965,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1802,11 +1986,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1815,7 +1999,7 @@ async def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -1834,18 +2018,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1856,5 +2047,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py index 111a5e04a07a..d7895e7e70c7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificates_operations.py index a8fd629882c3..fb84592cdbbd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,7 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -133,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -196,7 +211,7 @@ async def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -213,17 +228,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +260,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -251,7 +273,7 @@ async def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -270,6 +292,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -278,6 +301,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -285,7 +309,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,11 +328,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -312,7 +340,7 @@ async def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -329,17 +357,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -350,7 +385,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -363,7 +398,7 @@ async def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -382,6 +417,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -390,6 +426,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -397,7 +434,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -412,5 +453,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py index d1aad7b8f163..d2da6866d280 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -122,7 +129,7 @@ def list_by_location( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -133,6 +140,8 @@ def list_by_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace_async async def get_deleted_web_app_by_location( @@ -196,7 +211,7 @@ async def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -213,17 +228,24 @@ async def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,5 +260,5 @@ async def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_diagnostics_operations.py index bf4a7c18ffc1..69ccaff35646 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list_hosting_environment_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -138,7 +145,7 @@ async def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -146,11 +153,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -163,12 +170,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -177,7 +187,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +206,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -204,7 +218,7 @@ def list_site_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -217,6 +231,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -229,6 +245,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -240,6 +257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,7 +293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -286,7 +308,7 @@ async def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -294,11 +316,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -311,12 +333,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -325,7 +350,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,7 +369,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -352,7 +381,7 @@ def list_site_diagnostic_categories( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -365,6 +394,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -377,6 +408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -388,6 +420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -405,7 +438,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -419,7 +456,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -431,7 +468,7 @@ async def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -450,18 +487,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -476,7 +520,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -489,7 +533,7 @@ def list_site_analyses( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -504,6 +548,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -517,6 +563,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -529,6 +576,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -546,7 +594,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -560,7 +612,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -573,7 +625,7 @@ async def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -594,6 +646,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -601,12 +655,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +680,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -638,7 +697,7 @@ async def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -648,11 +707,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -665,6 +724,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -672,6 +733,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -680,7 +742,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -695,7 +761,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -708,7 +774,7 @@ def list_site_detectors( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -723,6 +789,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +804,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -748,6 +817,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -765,7 +835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -779,7 +853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector( @@ -792,7 +866,7 @@ async def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -813,6 +887,8 @@ async def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -820,12 +896,17 @@ async def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -840,7 +921,7 @@ async def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -857,7 +938,7 @@ async def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -867,11 +948,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -884,6 +965,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -891,6 +974,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -899,7 +983,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +1002,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -927,7 +1015,7 @@ def list_site_detector_responses_slot( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -942,6 +1030,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -955,6 +1045,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -967,6 +1058,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -984,7 +1076,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -998,7 +1094,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1014,7 +1110,7 @@ async def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1024,11 +1120,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1041,6 +1137,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1048,6 +1146,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1056,7 +1155,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1071,7 +1174,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1084,7 +1187,7 @@ def list_site_diagnostic_categories_slot( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1099,6 +1202,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1112,6 +1217,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1124,6 +1230,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1141,7 +1248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1155,7 +1266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1168,7 +1279,7 @@ async def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1189,6 +1300,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1196,12 +1309,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1216,7 +1334,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1230,7 +1348,7 @@ def list_site_analyses_slot( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1247,6 +1365,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1261,6 +1381,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1274,6 +1395,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1291,7 +1413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1305,7 +1431,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1319,7 +1445,7 @@ async def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1342,6 +1468,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1350,12 +1478,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1370,7 +1503,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1388,7 +1521,7 @@ async def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1400,11 +1533,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1417,6 +1550,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1425,6 +1560,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1433,7 +1569,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1448,7 +1588,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1462,7 +1602,7 @@ def list_site_detectors_slot( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1479,6 +1619,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1493,6 +1635,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1506,6 +1649,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1523,7 +1667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1537,7 +1685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_slot( @@ -1551,7 +1699,7 @@ async def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1574,6 +1722,8 @@ async def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1582,12 +1732,17 @@ async def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1602,7 +1757,7 @@ async def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -1620,7 +1775,7 @@ async def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1632,11 +1787,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1649,6 +1804,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1657,6 +1814,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1665,7 +1823,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1680,5 +1842,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domain_registration_provider_operations.py index 7b576e8461fe..e6e2289277fe 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domains_operations.py index 4b83de124610..a47557526d2a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ async def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -99,7 +104,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -109,7 +114,7 @@ def list( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) @@ -117,6 +122,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -127,6 +134,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -136,6 +144,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -153,7 +162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -167,7 +180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -176,7 +189,7 @@ async def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -189,15 +202,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +232,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -223,7 +243,7 @@ def list_recommendations( ) -> AsyncIterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2020_06_01.models.DomainRecommendationSearchParameters @@ -234,6 +254,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -247,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -259,6 +281,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -278,7 +301,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -292,7 +319,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -302,7 +329,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -312,6 +339,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -323,6 +352,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -333,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -350,7 +381,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -364,7 +399,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -375,7 +410,7 @@ async def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -392,17 +427,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +459,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -433,6 +475,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -441,6 +484,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -448,7 +492,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -466,7 +514,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -479,7 +527,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -500,8 +548,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -513,6 +562,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -537,13 +587,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -552,7 +601,7 @@ async def delete( ) -> None: """Delete a domain. - Description for 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 @@ -572,18 +621,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -594,7 +650,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -607,7 +663,7 @@ async def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -626,6 +682,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -634,6 +691,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -641,7 +699,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -660,7 +722,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -672,7 +734,7 @@ def list_ownership_identifiers( ) -> AsyncIterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -685,6 +747,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -697,6 +761,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -708,6 +773,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -725,7 +791,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -739,7 +809,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -751,7 +821,7 @@ async def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -770,18 +840,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -796,7 +873,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -811,8 +888,8 @@ async def create_or_update_ownership_identifier( """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. + 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 @@ -833,6 +910,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -842,6 +920,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -849,7 +928,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,11 +947,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -877,7 +960,7 @@ async def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -896,18 +979,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -918,7 +1008,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -933,8 +1023,8 @@ async def update_ownership_identifier( """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. + 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 @@ -955,6 +1045,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -964,6 +1055,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -971,7 +1063,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -986,11 +1082,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -998,7 +1094,7 @@ async def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1015,17 +1111,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1036,5 +1139,5 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_provider_operations.py index d60df08ed95a..9449dd615537 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,9 +52,9 @@ def get_available_stacks( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_06_01.models.Enum4 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -115,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -125,8 +131,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -135,6 +141,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +152,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -152,6 +161,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -169,7 +179,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -183,7 +197,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -193,9 +207,9 @@ def get_available_stacks_on_prem( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_06_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -204,6 +218,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -214,6 +230,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -224,6 +241,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -242,7 +260,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -256,4 +278,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_recommendations_operations.py index 6233a2ec97e5..7e1471600232 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,14 +54,14 @@ def list( ) -> AsyncIterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -125,16 +132,16 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -147,15 +154,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -166,19 +180,18 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -193,16 +206,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -213,7 +233,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -227,7 +247,7 @@ def list_history_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -238,7 +258,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -247,6 +267,8 @@ def list_history_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -259,6 +281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -272,6 +295,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -291,7 +315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -305,7 +333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -318,7 +346,7 @@ def list_recommended_rules_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -328,7 +356,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -337,6 +365,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -349,6 +379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -362,6 +393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -381,7 +413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,10 +431,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_hosting_environment( + async def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -407,7 +443,7 @@ async def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -426,18 +462,25 @@ async def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -448,11 +491,11 @@ async def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_hosting_environment( + async def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -461,7 +504,7 @@ async def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -480,18 +523,25 @@ async def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -502,7 +552,7 @@ async def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -517,7 +567,7 @@ async def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -526,10 +576,10 @@ async def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -542,12 +592,15 @@ async def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -555,7 +608,11 @@ async def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -570,11 +627,11 @@ async def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_hosting_environment( + async def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -584,7 +641,7 @@ async def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -605,19 +662,26 @@ async def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -628,7 +692,7 @@ async def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -642,7 +706,7 @@ def list_history_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -653,7 +717,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -662,6 +726,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -674,6 +740,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -687,6 +754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -706,7 +774,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -720,7 +792,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -733,7 +805,7 @@ def list_recommended_rules_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -743,7 +815,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -752,6 +824,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -764,6 +838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -777,6 +852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -796,7 +872,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -810,10 +890,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -821,7 +901,7 @@ async def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -838,17 +918,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -859,11 +946,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -871,7 +958,7 @@ async def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -888,17 +975,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -909,7 +1003,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -924,7 +1018,7 @@ async def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -933,10 +1027,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -949,12 +1043,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -962,7 +1059,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,11 +1078,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -990,7 +1091,7 @@ async def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1009,18 +1110,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,5 +1139,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_resource_health_metadata_operations.py index 68378072f609..45516d10684e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,8 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -134,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -155,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -197,8 +211,7 @@ def list_by_site( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -211,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -223,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -234,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -251,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -265,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -276,7 +297,7 @@ async def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -293,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -318,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -331,8 +359,7 @@ def list_by_site_slot( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -347,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -372,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -389,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -403,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -415,7 +450,7 @@ async def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -434,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_static_sites_operations.py index 3236cb34daac..f531786404b7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -24,7 +23,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class StaticSitesOperations: +class StaticSitesOperations: # pylint: disable=too-many-public-methods """StaticSitesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ async def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -74,6 +73,7 @@ async def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -81,6 +81,7 @@ async def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -88,7 +89,11 @@ async def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -103,7 +108,7 @@ async def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -113,7 +118,7 @@ def list( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -122,6 +127,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -132,6 +139,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -141,6 +149,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -158,7 +167,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -172,7 +185,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -182,7 +195,7 @@ def get_static_sites_by_resource_group( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -193,6 +206,8 @@ def get_static_sites_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -204,6 +219,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -214,6 +230,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -231,7 +248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -245,7 +266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace_async async def get_static_site( @@ -256,7 +277,7 @@ async def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -273,17 +294,24 @@ async def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -298,7 +326,7 @@ async def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -311,8 +339,7 @@ async def create_or_update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -331,6 +358,7 @@ async def create_or_update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -339,6 +367,7 @@ async def create_or_update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site.metadata['url'], @@ -346,7 +375,11 @@ async def create_or_update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -365,11 +398,11 @@ async def create_or_update_static_site( return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async - async def delete_static_site( + async def delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -377,7 +410,7 @@ async def delete_static_site( ) -> None: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -394,17 +427,24 @@ async def delete_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -415,7 +455,7 @@ async def delete_static_site( if cls: return cls(pipeline_response, None, {}) - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -428,8 +468,7 @@ async def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -448,6 +487,7 @@ async def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -456,6 +496,7 @@ async def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -463,7 +504,11 @@ async def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -482,7 +527,7 @@ async def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -495,7 +540,7 @@ def list_static_site_users( ) -> AsyncIterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -510,6 +555,8 @@ def list_static_site_users( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -523,6 +570,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -535,6 +583,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -552,7 +601,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -566,10 +619,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace_async - async def delete_static_site_user( + async def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -579,7 +632,7 @@ async def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -600,6 +653,8 @@ async def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -607,12 +662,17 @@ async def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -623,7 +683,7 @@ async def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace_async @@ -638,7 +698,7 @@ async def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -662,6 +722,7 @@ async def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -672,6 +733,7 @@ async def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -679,7 +741,11 @@ async def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -694,7 +760,7 @@ async def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -706,7 +772,7 @@ def get_static_site_builds( ) -> AsyncIterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -719,6 +785,8 @@ def get_static_site_builds( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -731,6 +799,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -742,6 +811,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -759,7 +829,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -773,7 +847,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace_async async def get_static_site_build( @@ -785,7 +859,7 @@ async def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -804,18 +878,25 @@ async def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -830,11 +911,11 @@ async def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace_async - async def delete_static_site_build( + async def delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -843,7 +924,7 @@ async def delete_static_site_build( ) -> None: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -862,18 +943,25 @@ async def delete_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -884,7 +972,7 @@ async def delete_static_site_build( if cls: return cls(pipeline_response, None, {}) - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace_async @@ -898,7 +986,7 @@ async def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -919,6 +1007,7 @@ async def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -928,6 +1017,7 @@ async def create_or_update_static_site_build_function_app_settings( name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -935,7 +1025,11 @@ async def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -954,7 +1048,7 @@ async def create_or_update_static_site_build_function_app_settings( 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'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings"} # type: ignore @distributed_trace @@ -967,7 +1061,7 @@ def list_static_site_build_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -982,6 +1076,8 @@ def list_static_site_build_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -995,6 +1091,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -1007,6 +1104,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1024,7 +1122,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1038,7 +1140,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions"} # type: ignore @distributed_trace_async async def list_static_site_build_function_app_settings( @@ -1050,7 +1152,7 @@ async def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -1069,18 +1171,25 @@ async def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1099,7 +1208,7 @@ async def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -1112,7 +1221,7 @@ async def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -1131,6 +1240,7 @@ async def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1139,6 +1249,7 @@ async def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -1146,7 +1257,11 @@ async def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1165,7 +1280,7 @@ async def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace_async @@ -1178,7 +1293,7 @@ async def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -1198,6 +1313,7 @@ async def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -1206,6 +1322,7 @@ async def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -1213,7 +1330,11 @@ async def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1228,7 +1349,7 @@ async def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -1240,7 +1361,7 @@ def list_static_site_custom_domains( ) -> AsyncIterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -1253,6 +1374,8 @@ def list_static_site_custom_domains( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1265,6 +1388,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -1276,6 +1400,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1293,7 +1418,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1307,7 +1436,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace_async async def create_or_update_static_site_custom_domain( @@ -1319,8 +1448,7 @@ async def create_or_update_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -1339,18 +1467,25 @@ async def create_or_update_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_create_or_update_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.create_or_update_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1369,11 +1504,11 @@ async def create_or_update_static_site_custom_domain( return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def delete_static_site_custom_domain( + async def delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1382,7 +1517,7 @@ async def delete_static_site_custom_domain( ) -> None: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1401,18 +1536,25 @@ async def delete_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1423,11 +1565,11 @@ async def delete_static_site_custom_domain( if cls: return cls(pipeline_response, None, {}) - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def validate_custom_domain_can_be_added_to_static_site( + async def validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1436,7 +1578,7 @@ async def validate_custom_domain_can_be_added_to_static_site( ) -> None: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -1455,18 +1597,25 @@ async def validate_custom_domain_can_be_added_to_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_validate_custom_domain_can_be_added_to_static_site_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.validate_custom_domain_can_be_added_to_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1477,11 +1626,11 @@ async def validate_custom_domain_can_be_added_to_static_site( if cls: return cls(pipeline_response, None, {}) - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace_async - async def detach_static_site( + async def detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1489,7 +1638,7 @@ async def detach_static_site( ) -> None: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1506,17 +1655,24 @@ async def detach_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_detach_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1527,7 +1683,7 @@ async def detach_static_site( if cls: return cls(pipeline_response, None, {}) - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace @@ -1539,7 +1695,7 @@ def list_static_site_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -1552,6 +1708,8 @@ def list_static_site_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1564,6 +1722,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -1575,6 +1734,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1592,7 +1752,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1770,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace_async async def list_static_site_function_app_settings( @@ -1617,7 +1781,7 @@ async def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -1634,17 +1798,24 @@ async def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1663,7 +1834,7 @@ async def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -1675,7 +1846,7 @@ async def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -1692,17 +1863,24 @@ async def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1717,11 +1895,11 @@ async def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace_async - async def reset_static_site_api_key( + async def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1730,7 +1908,7 @@ async def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -1750,6 +1928,7 @@ async def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -1758,6 +1937,7 @@ async def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -1765,7 +1945,11 @@ async def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1776,5 +1960,5 @@ async def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_top_level_domains_operations.py index 4eaeda96a178..db47d1079573 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -122,7 +129,7 @@ async def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -137,16 +144,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -161,7 +175,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -173,7 +187,7 @@ def list_agreements( ) -> AsyncIterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -186,6 +200,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -200,6 +215,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -213,6 +229,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -232,7 +249,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -246,4 +267,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_apps_operations.py index c7a72b3b77a2..9550ed20b135 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -137,6 +144,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -148,6 +157,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -159,6 +169,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -246,7 +268,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -262,6 +284,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -270,6 +293,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -277,7 +301,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -295,7 +323,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -309,8 +337,8 @@ async def begin_create_or_update( """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. + 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 @@ -331,8 +359,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -344,6 +373,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -368,13 +398,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -384,16 +413,16 @@ async def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -406,11 +435,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -418,7 +450,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -429,7 +465,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -443,8 +479,8 @@ async def update( """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. + 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 @@ -464,6 +500,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -472,6 +509,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -479,7 +517,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -498,7 +540,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -511,13 +553,13 @@ async def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -530,18 +572,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -556,11 +605,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -569,7 +618,7 @@ async def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -588,6 +637,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -596,6 +646,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -603,7 +654,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -614,7 +669,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -627,7 +682,7 @@ async def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -647,6 +702,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -655,6 +711,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -662,7 +719,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -677,7 +738,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -689,7 +750,7 @@ def list_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -702,6 +763,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -714,6 +777,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -725,6 +789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -742,7 +807,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -756,7 +825,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def get_backup_status( @@ -768,7 +837,7 @@ async def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -787,18 +856,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -813,11 +889,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -826,7 +902,7 @@ async def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -845,18 +921,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -867,7 +950,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -883,9 +966,9 @@ async def list_backup_status_secrets( 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. + 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 @@ -906,6 +989,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -915,6 +999,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -922,7 +1007,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1026,10 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - async def _restore_initial( + async def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -954,6 +1043,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -963,6 +1053,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -970,7 +1061,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -980,11 +1075,11 @@ async def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore( + async def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -994,7 +1089,7 @@ async def begin_restore( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -1016,8 +1111,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1030,6 +1126,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1051,10 +1148,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async async def get_basic_publishing_credentials_policies( @@ -1065,8 +1161,7 @@ async def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -1083,17 +1178,24 @@ async def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1108,7 +1210,7 @@ async def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async @@ -1120,7 +1222,7 @@ async def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -1137,17 +1239,24 @@ async def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1162,7 +1271,7 @@ async def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1175,7 +1284,7 @@ async def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -1195,6 +1304,7 @@ async def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1203,6 +1313,7 @@ async def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -1210,7 +1321,11 @@ async def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1225,7 +1340,7 @@ async def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1237,7 +1352,7 @@ async def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -1254,17 +1369,24 @@ async def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1279,7 +1401,7 @@ async def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -1292,7 +1414,7 @@ async def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -1312,6 +1434,7 @@ async def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1320,6 +1443,7 @@ async def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -1327,7 +1451,11 @@ async def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1342,7 +1470,7 @@ async def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -1354,7 +1482,7 @@ def list_configurations( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -1367,6 +1495,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1379,6 +1509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1390,6 +1521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1407,7 +1539,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1421,7 +1557,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1433,7 +1569,7 @@ async def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -1452,6 +1588,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1460,6 +1597,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1467,7 +1605,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1482,7 +1624,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1494,7 +1636,7 @@ async def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -1511,17 +1653,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1685,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1549,7 +1698,7 @@ async def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -1568,6 +1717,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1576,6 +1726,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1583,7 +1734,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1598,7 +1753,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1610,7 +1765,7 @@ async def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -1627,17 +1782,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1652,7 +1814,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1665,8 +1827,7 @@ async def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -1685,6 +1846,7 @@ async def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -1693,6 +1855,7 @@ async def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -1700,7 +1863,11 @@ async def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1715,7 +1882,7 @@ async def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -1727,7 +1894,7 @@ async def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -1744,17 +1911,24 @@ async def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1769,7 +1943,7 @@ async def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -1782,7 +1956,7 @@ async def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -1802,6 +1976,7 @@ async def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -1810,6 +1985,7 @@ async def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -1817,7 +1993,11 @@ async def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1832,7 +2012,7 @@ async def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -1844,7 +2024,7 @@ async def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -1861,17 +2041,24 @@ async def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1886,7 +2073,7 @@ async def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -1899,7 +2086,7 @@ async def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -1918,6 +2105,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -1926,6 +2114,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -1933,7 +2122,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1948,11 +2141,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1960,7 +2153,7 @@ async def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -1977,17 +2170,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1998,7 +2198,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -2010,7 +2210,7 @@ async def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -2027,17 +2227,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2052,7 +2259,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace_async @@ -2065,7 +2272,7 @@ async def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -2084,6 +2291,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -2092,6 +2300,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -2099,7 +2308,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2114,7 +2327,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -2126,7 +2339,7 @@ async def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -2143,17 +2356,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2168,7 +2388,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -2180,7 +2400,7 @@ async def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -2197,17 +2417,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2222,7 +2449,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2235,7 +2462,7 @@ async def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -2255,6 +2482,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -2263,6 +2491,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -2270,7 +2499,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2285,7 +2518,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2298,7 +2531,7 @@ async def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -2317,6 +2550,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -2325,6 +2559,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -2332,7 +2567,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2347,7 +2586,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -2359,7 +2598,7 @@ async def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -2376,17 +2615,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2401,7 +2647,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -2416,17 +2662,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2440,7 +2693,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -2452,7 +2705,7 @@ async def begin_list_publishing_credentials( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -2470,7 +2723,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2481,6 +2735,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2504,10 +2759,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2519,7 +2773,7 @@ async def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -2538,6 +2792,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2546,6 +2801,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2553,7 +2809,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2568,7 +2828,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2580,7 +2840,7 @@ async def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -2597,17 +2857,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2622,7 +2889,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2634,8 +2901,7 @@ async def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -2652,17 +2918,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2677,7 +2950,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2691,8 +2964,8 @@ async def update_slot_configuration_names( """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. + 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 @@ -2711,6 +2984,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -2719,6 +2993,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -2726,7 +3001,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2741,7 +3020,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2754,8 +3033,8 @@ async def get_configuration( """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. + 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 @@ -2772,17 +3051,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2797,7 +3083,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2810,7 +3096,7 @@ async def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -2829,6 +3115,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2837,6 +3124,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -2844,7 +3132,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2859,7 +3151,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2872,7 +3164,7 @@ async def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -2891,6 +3183,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2899,6 +3192,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -2906,7 +3200,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2921,7 +3219,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -2934,8 +3232,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -2948,6 +3246,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2960,6 +3260,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -2971,6 +3272,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2988,7 +3290,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3002,7 +3308,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -3014,7 +3320,7 @@ async def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -3033,18 +3339,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3059,11 +3372,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3072,7 +3385,7 @@ async def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -3091,18 +3404,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3113,7 +3433,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -3125,7 +3445,7 @@ async def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -3142,17 +3462,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3168,7 +3495,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -3180,7 +3507,7 @@ async def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -3197,17 +3524,24 @@ async def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3223,7 +3557,7 @@ async def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -3235,7 +3569,7 @@ def list_continuous_web_jobs( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -3248,6 +3582,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3260,6 +3596,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -3271,6 +3608,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3288,7 +3626,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3302,7 +3644,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -3314,7 +3656,7 @@ async def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3333,18 +3675,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3361,11 +3710,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3374,7 +3723,7 @@ async def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3393,18 +3742,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3415,11 +3771,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3428,7 +3784,7 @@ async def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -3447,18 +3803,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3469,11 +3832,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3482,7 +3845,7 @@ async def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -3501,18 +3864,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3523,7 +3893,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3535,7 +3905,7 @@ def list_deployments( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -3548,6 +3918,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3560,6 +3932,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3571,6 +3944,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3588,7 +3962,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3602,7 +3980,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3614,7 +3992,7 @@ async def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -3633,18 +4011,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3659,7 +4044,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3673,7 +4058,7 @@ async def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -3694,6 +4079,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -3703,6 +4089,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -3710,7 +4097,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3725,11 +4116,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3738,7 +4129,7 @@ async def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -3757,18 +4148,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3779,7 +4177,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3792,7 +4190,7 @@ async def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -3812,18 +4210,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3838,7 +4243,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -3852,8 +4257,8 @@ async def discover_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. - 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. + 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 @@ -3873,6 +4278,7 @@ async def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -3881,6 +4287,7 @@ async def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -3888,7 +4295,11 @@ async def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3903,7 +4314,7 @@ async def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -3915,7 +4326,7 @@ def list_domain_ownership_identifiers( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -3928,6 +4339,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3940,6 +4353,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -3951,6 +4365,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3968,7 +4383,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3982,7 +4401,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -3994,7 +4413,7 @@ async def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -4013,18 +4432,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4039,7 +4465,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4053,8 +4479,7 @@ async def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4075,6 +4500,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4084,6 +4510,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -4091,7 +4518,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4106,11 +4537,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4119,7 +4550,7 @@ async def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -4138,18 +4569,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4160,7 +4598,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4174,8 +4612,7 @@ async def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4196,6 +4633,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4205,6 +4643,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -4212,7 +4651,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4227,7 +4670,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4239,7 +4682,7 @@ async def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -4256,17 +4699,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4281,7 +4731,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -4297,6 +4747,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -4305,6 +4756,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -4312,7 +4764,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -4328,7 +4784,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -4341,7 +4797,7 @@ async def begin_create_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -4362,8 +4818,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -4375,6 +4832,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4399,10 +4857,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -4413,7 +4870,7 @@ async def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -4430,17 +4887,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4457,7 +4921,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -4469,7 +4933,7 @@ def list_functions( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -4482,6 +4946,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4494,6 +4960,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -4505,6 +4972,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4522,7 +4990,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4536,7 +5008,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -4547,7 +5019,7 @@ async def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -4564,17 +5036,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4589,7 +5068,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -4602,7 +5081,7 @@ async def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -4621,18 +5100,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4649,7 +5135,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -4666,6 +5152,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -4675,6 +5162,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -4682,7 +5170,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4696,7 +5188,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4710,7 +5202,7 @@ async def begin_create_function( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -4733,8 +5225,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -4747,6 +5240,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4771,13 +5265,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4786,7 +5279,7 @@ async def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -4805,18 +5298,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4827,7 +5327,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4842,7 +5342,7 @@ async def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -4865,6 +5365,7 @@ async def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -4875,6 +5376,7 @@ async def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -4882,7 +5384,11 @@ async def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -4901,11 +5407,11 @@ async def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret( + async def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4915,7 +5421,7 @@ async def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -4936,6 +5442,8 @@ async def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -4943,12 +5451,17 @@ async def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4959,7 +5472,7 @@ async def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -4972,7 +5485,7 @@ async def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -4991,18 +5504,25 @@ async def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5017,7 +5537,7 @@ async def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -5030,7 +5550,7 @@ async def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -5049,18 +5569,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5075,7 +5602,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -5087,7 +5614,7 @@ async def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -5104,17 +5631,24 @@ async def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5129,11 +5663,11 @@ async def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status( + async def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5141,7 +5675,7 @@ async def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -5158,17 +5692,24 @@ async def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5179,11 +5720,11 @@ async def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions( + async def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5191,7 +5732,7 @@ async def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -5208,17 +5749,24 @@ async def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5229,7 +5777,7 @@ async def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace_async @@ -5244,7 +5792,7 @@ async def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -5267,6 +5815,7 @@ async def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5277,6 +5826,7 @@ async def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -5284,7 +5834,11 @@ async def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5303,11 +5857,11 @@ async def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret( + async def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5317,7 +5871,7 @@ async def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -5338,6 +5892,8 @@ async def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -5345,12 +5901,17 @@ async def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5361,7 +5922,7 @@ async def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -5373,7 +5934,7 @@ def list_host_name_bindings( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -5386,6 +5947,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5398,6 +5961,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -5409,6 +5973,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5426,7 +5991,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5440,7 +6009,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -5452,7 +6021,7 @@ async def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -5471,18 +6040,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5497,7 +6073,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5511,7 +6087,7 @@ async def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -5533,6 +6109,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -5542,6 +6119,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -5549,7 +6127,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5564,11 +6146,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5577,7 +6159,7 @@ async def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -5596,18 +6178,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5618,7 +6207,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5632,7 +6221,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -5653,6 +6242,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5660,12 +6251,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5680,7 +6276,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5695,7 +6291,7 @@ async def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -5718,6 +6314,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -5728,6 +6325,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -5735,7 +6333,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5750,11 +6352,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5764,7 +6366,7 @@ async def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -5785,6 +6387,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5792,12 +6396,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5808,7 +6417,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5823,7 +6432,7 @@ async def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -5846,6 +6455,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -5856,6 +6466,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -5863,7 +6474,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5878,7 +6493,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5890,7 +6505,7 @@ async def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -5907,17 +6522,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5932,7 +6554,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -5944,8 +6566,7 @@ async def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -5962,17 +6583,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5987,7 +6615,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -6000,7 +6628,7 @@ async def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -6019,18 +6647,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6045,7 +6680,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6059,8 +6694,7 @@ async def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6081,6 +6715,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6090,6 +6725,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -6097,7 +6733,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6112,11 +6752,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6125,7 +6765,7 @@ async def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -6144,18 +6784,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6166,7 +6813,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6180,8 +6827,7 @@ async def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6202,6 +6848,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6211,6 +6858,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -6218,7 +6866,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6233,7 +6885,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -6245,7 +6897,7 @@ def list_instance_identifiers( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -6258,6 +6910,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6270,6 +6924,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -6281,6 +6936,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6298,7 +6954,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6312,7 +6972,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_info( @@ -6324,7 +6984,7 @@ async def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -6343,18 +7003,25 @@ async def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6369,7 +7036,7 @@ async def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -6382,7 +7049,7 @@ async def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -6401,18 +7068,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6427,7 +7101,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -6444,6 +7118,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -6453,6 +7128,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -6460,7 +7136,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -6476,7 +7156,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -6490,7 +7170,7 @@ async def begin_create_instance_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -6513,8 +7193,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -6527,6 +7208,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6551,10 +7233,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -6566,7 +7247,7 @@ async def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -6585,18 +7266,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6613,7 +7301,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -6627,8 +7315,8 @@ def list_instance_processes( """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. + 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 @@ -6644,6 +7332,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6657,6 +7347,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -6669,6 +7360,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6686,7 +7378,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6700,7 +7396,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -6713,8 +7409,7 @@ async def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -6736,6 +7431,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -6743,12 +7440,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6765,11 +7467,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6780,8 +7482,8 @@ async def delete_instance_process( """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. + 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 @@ -6803,6 +7505,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -6810,12 +7514,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -6826,7 +7535,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -6840,8 +7549,7 @@ async def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -6863,6 +7571,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -6870,12 +7580,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6892,7 +7607,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -6907,8 +7622,8 @@ def list_instance_process_modules( """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. + 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 @@ -6926,6 +7641,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6940,6 +7657,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -6953,6 +7671,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6970,7 +7689,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6984,7 +7707,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -6998,8 +7721,7 @@ async def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7023,6 +7745,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -7031,12 +7755,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7053,7 +7782,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -7067,8 +7796,7 @@ def list_instance_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -7086,6 +7814,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7100,6 +7830,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -7113,6 +7844,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7130,7 +7862,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7144,7 +7880,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable( @@ -7155,7 +7891,7 @@ async def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -7172,17 +7908,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7197,7 +7940,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -7209,7 +7952,7 @@ def list_site_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -7222,6 +7965,8 @@ def list_site_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7234,6 +7979,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -7245,6 +7991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7262,7 +8009,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7276,7 +8027,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers( @@ -7287,7 +8038,7 @@ async def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -7304,17 +8055,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7329,7 +8087,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore async def _migrate_storage_initial( @@ -7346,6 +8104,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -7354,6 +8113,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -7362,7 +8122,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7376,7 +8140,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -7390,7 +8154,7 @@ async def begin_migrate_storage( ) -> AsyncLROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -7414,8 +8178,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -7428,6 +8193,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7452,10 +8218,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -7470,6 +8235,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -7478,6 +8244,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -7485,7 +8252,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7499,7 +8270,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -7512,7 +8283,7 @@ async def begin_migrate_my_sql( ) -> AsyncLROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -7533,8 +8304,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -7546,6 +8318,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7570,10 +8343,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -7585,8 +8357,8 @@ async def get_migrate_my_sql_status( """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. + 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 @@ -7603,17 +8375,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7628,7 +8407,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -7640,7 +8419,7 @@ async def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -7657,17 +8436,24 @@ async def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7682,7 +8468,7 @@ async def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7698,9 +8484,9 @@ async def create_or_update_swift_virtual_network_connection( 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 + 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. @@ -7720,6 +8506,7 @@ async def create_or_update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -7728,6 +8515,7 @@ async def create_or_update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection.metadata['url'], @@ -7735,7 +8523,11 @@ async def create_or_update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7750,11 +8542,11 @@ async def create_or_update_swift_virtual_network_connection( return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network( + async def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7762,7 +8554,7 @@ async def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -7779,17 +8571,24 @@ async def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7800,7 +8599,7 @@ async def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7816,9 +8615,9 @@ async def update_swift_virtual_network_connection( 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 + 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. @@ -7838,6 +8637,7 @@ async def update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -7846,6 +8646,7 @@ async def update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection.metadata['url'], @@ -7853,7 +8654,11 @@ async def update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7868,7 +8673,7 @@ async def update_swift_virtual_network_connection( return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7881,7 +8686,7 @@ async def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -7900,18 +8705,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7928,7 +8740,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -7941,8 +8753,7 @@ async def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -7961,18 +8772,25 @@ async def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -7991,7 +8809,7 @@ async def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8006,17 +8824,17 @@ async def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -8029,11 +8847,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8042,7 +8863,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8057,7 +8882,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_initial( @@ -8075,11 +8900,14 @@ async def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8088,7 +8916,11 @@ async def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8106,7 +8938,7 @@ async def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -8121,17 +8953,17 @@ async def begin_start_web_site_network_trace_operation( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -8147,7 +8979,8 @@ async def begin_start_web_site_network_trace_operation( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -8161,6 +8994,7 @@ async def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -8184,13 +9018,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace( + async def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8198,7 +9031,7 @@ async def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -8215,17 +9048,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8236,7 +9076,7 @@ async def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -8249,8 +9089,7 @@ async def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8269,18 +9108,25 @@ async def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8295,7 +9141,7 @@ async def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -8308,8 +9154,7 @@ async def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8328,18 +9173,25 @@ async def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8358,7 +9210,7 @@ async def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8371,8 +9223,7 @@ async def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8391,18 +9242,25 @@ async def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8417,11 +9275,11 @@ async def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8429,8 +9287,7 @@ async def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -8447,17 +9304,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8468,7 +9332,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -8481,7 +9345,7 @@ def list_perf_mon_counters( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -8489,7 +9353,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -8498,6 +9362,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8510,6 +9376,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -8522,6 +9389,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -8540,7 +9408,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8554,7 +9426,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -8565,7 +9437,7 @@ async def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -8582,17 +9454,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8607,7 +9486,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -8619,7 +9498,7 @@ async def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -8636,17 +9515,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8661,7 +9547,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -8674,7 +9560,7 @@ async def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -8693,18 +9579,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8719,7 +9612,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8733,7 +9626,7 @@ async def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -8754,6 +9647,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -8763,6 +9657,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -8770,7 +9665,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8785,11 +9684,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8798,7 +9697,7 @@ async def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -8817,18 +9716,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8839,7 +9745,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8853,7 +9759,7 @@ async def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -8874,6 +9780,7 @@ async def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -8883,6 +9790,7 @@ async def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -8890,7 +9798,11 @@ async def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8905,7 +9817,7 @@ async def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8918,8 +9830,8 @@ async def get_private_access( """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. + 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 @@ -8936,17 +9848,24 @@ async def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8961,7 +9880,7 @@ async def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -8975,8 +9894,8 @@ async def put_private_access_vnet( """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. + 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 @@ -8995,6 +9914,7 @@ async def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -9003,6 +9923,7 @@ async def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -9010,7 +9931,11 @@ async def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9025,7 +9950,7 @@ async def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -9038,8 +9963,8 @@ def list_processes( """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. + 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 @@ -9052,6 +9977,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9064,6 +9991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -9075,6 +10003,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9092,7 +10021,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9106,7 +10039,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -9118,8 +10051,7 @@ async def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9138,18 +10070,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9166,11 +10105,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9180,8 +10119,8 @@ async def delete_process( """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. + 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 @@ -9200,18 +10139,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -9222,7 +10168,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -9235,8 +10181,7 @@ async def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -9255,18 +10200,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9283,7 +10235,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -9297,8 +10249,8 @@ def list_process_modules( """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. + 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 @@ -9313,6 +10265,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9326,6 +10280,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -9338,6 +10293,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9355,7 +10311,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9369,7 +10329,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -9382,8 +10342,7 @@ async def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9404,6 +10363,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -9411,12 +10372,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9433,7 +10399,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -9446,8 +10412,7 @@ def list_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -9462,6 +10427,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9475,6 +10442,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -9487,6 +10455,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9504,7 +10473,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9518,7 +10491,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -9529,7 +10502,7 @@ def list_public_certificates( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -9542,6 +10515,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9554,6 +10529,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -9565,6 +10541,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9582,7 +10559,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9596,7 +10577,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -9608,7 +10589,7 @@ async def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -9627,18 +10608,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9653,7 +10641,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -9667,7 +10655,7 @@ async def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -9689,6 +10677,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -9698,6 +10687,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -9705,7 +10695,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9720,11 +10714,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9733,7 +10727,7 @@ async def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -9752,18 +10746,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -9774,7 +10775,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -9787,7 +10788,7 @@ async def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -9808,6 +10809,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -9816,6 +10818,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -9823,7 +10826,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9838,11 +10845,11 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9851,8 +10858,8 @@ async def reset_production_slot_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. + 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 @@ -9869,17 +10876,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9890,11 +10904,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9904,17 +10918,18 @@ async def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -9927,11 +10942,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -9939,7 +10957,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9950,10 +10972,10 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - async def _restore_from_backup_blob_initial( + async def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9966,6 +10988,7 @@ async def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -9974,6 +10997,7 @@ async def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -9981,7 +11005,11 @@ async def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9991,11 +11019,11 @@ async def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob( + async def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10004,7 +11032,7 @@ async def begin_restore_from_backup_blob( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -10024,8 +11052,9 @@ async def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10037,6 +11066,7 @@ async def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10058,12 +11088,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_initial( + async def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10076,6 +11105,7 @@ async def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -10084,6 +11114,7 @@ async def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -10091,7 +11122,11 @@ async def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10101,11 +11136,11 @@ async def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app( + async def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10114,7 +11149,7 @@ async def begin_restore_from_deleted_app( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -10134,8 +11169,9 @@ async def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10147,6 +11183,7 @@ async def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10168,12 +11205,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_initial( + async def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10186,6 +11222,7 @@ async def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -10194,6 +11231,7 @@ async def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -10201,7 +11239,11 @@ async def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10211,11 +11253,11 @@ async def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot( + async def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10224,7 +11266,7 @@ async def begin_restore_snapshot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -10245,8 +11287,9 @@ async def begin_restore_snapshot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10258,6 +11301,7 @@ async def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10279,10 +11323,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -10293,7 +11336,7 @@ def list_site_extensions( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -10306,6 +11349,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10318,6 +11363,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -10329,6 +11375,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10346,7 +11393,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10360,7 +11411,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -10372,7 +11423,7 @@ async def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -10391,18 +11442,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10419,7 +11477,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -10435,18 +11493,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -10465,7 +11530,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -10478,7 +11543,7 @@ async def begin_install_site_extension( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -10500,7 +11565,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -10512,6 +11578,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -10535,13 +11602,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10550,7 +11616,7 @@ async def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -10569,18 +11635,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -10591,10 +11664,10 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore - async def _copy_production_slot_initial( + async def _copy_production_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10607,6 +11680,7 @@ async def _copy_production_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -10615,6 +11689,7 @@ async def _copy_production_slot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_production_slot_initial.metadata['url'], @@ -10622,7 +11697,11 @@ async def _copy_production_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10632,11 +11711,11 @@ async def _copy_production_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_production_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + _copy_production_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace_async - async def begin_copy_production_slot( + async def begin_copy_production_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10645,7 +11724,7 @@ async def begin_copy_production_slot( ) -> AsyncLROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -10666,8 +11745,9 @@ async def begin_copy_production_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10679,6 +11759,7 @@ async def begin_copy_production_slot( resource_group_name=resource_group_name, name=name, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10700,10 +11781,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + begin_copy_production_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace def list_slots( @@ -10714,7 +11794,7 @@ def list_slots( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -10726,6 +11806,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10738,6 +11820,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -10749,6 +11832,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10766,7 +11850,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10780,7 +11868,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -10792,7 +11880,7 @@ async def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -10811,18 +11899,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10839,7 +11934,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -10856,6 +11951,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -10865,6 +11961,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -10872,7 +11969,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10890,7 +11991,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -10905,8 +12006,8 @@ async def begin_create_or_update_slot( """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. + 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 @@ -10930,8 +12031,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -10944,6 +12046,7 @@ async def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10968,13 +12071,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10985,7 +12087,7 @@ async def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -10994,11 +12096,11 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -11011,12 +12113,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -11024,7 +12129,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -11035,7 +12144,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11050,8 +12159,8 @@ async def update_slot( """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. + 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 @@ -11074,6 +12183,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -11083,6 +12193,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -11090,7 +12201,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11109,7 +12224,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11123,7 +12238,7 @@ async def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -11131,7 +12246,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -11144,19 +12259,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11171,11 +12293,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11185,7 +12307,7 @@ async def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -11207,6 +12329,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -11216,6 +12339,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -11223,7 +12347,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11234,7 +12362,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -11248,7 +12376,7 @@ async def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -11271,6 +12399,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11280,6 +12409,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -11287,7 +12417,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11302,7 +12436,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -11315,7 +12449,7 @@ def list_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -11331,6 +12465,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11344,6 +12480,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -11356,6 +12493,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11373,7 +12511,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11387,7 +12529,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def get_backup_status_slot( @@ -11400,7 +12542,7 @@ async def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -11422,6 +12564,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -11429,12 +12573,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11449,11 +12598,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11463,7 +12612,7 @@ async def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -11485,6 +12634,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -11492,12 +12643,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11508,7 +12664,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -11525,9 +12681,9 @@ async def list_backup_status_secrets_slot( 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. + 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 @@ -11550,6 +12706,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11560,6 +12717,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -11567,7 +12725,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11582,10 +12744,10 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - async def _restore_slot_initial( + async def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11600,6 +12762,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -11610,6 +12773,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -11617,7 +12781,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11627,11 +12795,11 @@ async def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore_slot( + async def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11642,7 +12810,7 @@ async def begin_restore_slot( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -11667,8 +12835,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -11682,6 +12851,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11703,10 +12873,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -11718,7 +12887,7 @@ def list_configurations_slot( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -11734,6 +12903,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11747,6 +12918,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -11759,6 +12931,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11776,7 +12949,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11790,7 +12967,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -11803,7 +12980,7 @@ async def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -11825,6 +13002,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -11834,6 +13012,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -11841,7 +13020,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11856,7 +13039,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -11869,7 +13052,7 @@ async def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -11889,18 +13072,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11915,7 +13105,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -11929,7 +13119,7 @@ async def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -11950,6 +13140,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -11959,6 +13150,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -11966,7 +13158,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11981,7 +13177,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -11994,7 +13190,7 @@ async def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -12014,18 +13210,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12040,7 +13243,7 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -12054,8 +13257,7 @@ async def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -12076,6 +13278,7 @@ async def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -12085,6 +13288,7 @@ async def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -12092,7 +13296,11 @@ async def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12107,7 +13315,7 @@ async def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -12120,7 +13328,7 @@ async def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -12140,18 +13348,25 @@ async def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12166,7 +13381,7 @@ async def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -12180,7 +13395,7 @@ async def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -12203,6 +13418,7 @@ async def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -12212,6 +13428,7 @@ async def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -12219,7 +13436,11 @@ async def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12234,7 +13455,7 @@ async def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -12247,7 +13468,7 @@ async def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -12267,18 +13488,25 @@ async def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12293,7 +13521,7 @@ async def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -12307,7 +13535,7 @@ async def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -12329,6 +13557,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12338,6 +13567,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -12345,7 +13575,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12360,11 +13594,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12373,7 +13607,7 @@ async def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -12393,18 +13627,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12415,7 +13656,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -12428,7 +13669,7 @@ async def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -12448,18 +13689,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12474,7 +13722,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace_async @@ -12488,7 +13736,7 @@ async def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -12510,6 +13758,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -12519,6 +13768,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -12526,7 +13776,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12541,7 +13795,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -12554,7 +13808,7 @@ async def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -12574,18 +13828,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12600,7 +13861,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -12613,7 +13874,7 @@ async def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -12633,18 +13894,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12659,7 +13927,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -12673,7 +13941,7 @@ async def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -12696,6 +13964,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -12705,6 +13974,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -12712,7 +13982,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12727,7 +14001,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -12741,7 +14015,7 @@ async def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -12763,6 +14037,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -12772,6 +14047,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -12779,7 +14055,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12794,7 +14074,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -12807,7 +14087,7 @@ async def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -12827,18 +14107,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12853,7 +14140,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -12869,18 +14156,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12894,7 +14188,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -12907,7 +14201,7 @@ async def begin_list_publishing_credentials_slot( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -12928,7 +14222,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -12940,6 +14235,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -12963,10 +14259,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -12979,7 +14274,7 @@ async def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -13000,6 +14295,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -13009,6 +14305,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -13016,7 +14313,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13031,7 +14332,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -13044,7 +14345,7 @@ async def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -13063,18 +14364,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13089,7 +14397,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -13103,8 +14411,8 @@ async def get_configuration_slot( """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. + 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 @@ -13124,18 +14432,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13150,7 +14465,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -13164,7 +14479,7 @@ async def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -13186,6 +14501,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -13195,6 +14511,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -13202,7 +14519,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13217,7 +14538,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -13231,7 +14552,7 @@ async def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -13253,6 +14574,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -13262,6 +14584,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -13269,7 +14592,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13284,7 +14611,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -13298,8 +14625,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -13315,6 +14642,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13328,6 +14657,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -13340,6 +14670,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13357,7 +14688,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13371,7 +14706,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -13384,7 +14719,7 @@ async def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -13406,6 +14741,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -13413,12 +14750,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13433,11 +14775,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13447,7 +14789,7 @@ async def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -13469,6 +14811,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -13476,12 +14820,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -13492,7 +14841,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -13505,7 +14854,7 @@ async def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -13524,18 +14873,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13551,7 +14907,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -13564,7 +14920,7 @@ async def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -13583,18 +14939,25 @@ async def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13610,7 +14973,7 @@ async def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -13623,7 +14986,7 @@ def list_continuous_web_jobs_slot( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -13639,6 +15002,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13652,6 +15017,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -13664,6 +15030,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13681,7 +15048,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13695,7 +15066,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -13708,7 +15079,7 @@ async def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -13730,6 +15101,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13737,12 +15110,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13759,11 +15137,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13773,7 +15151,7 @@ async def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -13795,6 +15173,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13802,12 +15182,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13818,11 +15203,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13832,7 +15217,7 @@ async def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -13854,6 +15239,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13861,12 +15248,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13877,11 +15269,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13891,7 +15283,7 @@ async def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -13913,6 +15305,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13920,12 +15314,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13936,7 +15335,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -13949,7 +15348,7 @@ def list_deployments_slot( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -13965,6 +15364,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13978,6 +15379,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -13990,6 +15392,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14007,7 +15410,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14021,7 +15428,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -14034,7 +15441,7 @@ async def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -14056,6 +15463,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -14063,12 +15472,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14083,7 +15497,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -14098,7 +15512,7 @@ async def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -14122,6 +15536,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -14132,6 +15547,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -14139,7 +15555,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14154,11 +15574,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14168,7 +15588,7 @@ async def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -14190,6 +15610,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -14197,12 +15619,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14213,7 +15640,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -14227,7 +15654,7 @@ async def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -14250,6 +15677,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -14257,12 +15686,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14277,7 +15711,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -14292,8 +15726,8 @@ async def discover_backup_slot( """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. + 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 @@ -14316,6 +15750,7 @@ async def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -14325,6 +15760,7 @@ async def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -14332,7 +15768,11 @@ async def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14347,7 +15787,7 @@ async def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -14360,7 +15800,7 @@ def list_domain_ownership_identifiers_slot( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -14376,6 +15816,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14389,6 +15831,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -14401,6 +15844,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14418,7 +15862,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14432,7 +15880,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -14445,7 +15893,7 @@ async def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -14467,6 +15915,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -14474,12 +15924,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14494,7 +15949,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14509,8 +15964,7 @@ async def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -14534,6 +15988,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -14544,6 +15999,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -14551,7 +16007,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14566,11 +16026,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14580,7 +16040,7 @@ async def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -14602,6 +16062,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -14609,12 +16071,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14625,7 +16092,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14640,8 +16107,7 @@ async def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -14665,6 +16131,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -14675,6 +16142,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -14682,7 +16150,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14697,7 +16169,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14710,7 +16182,7 @@ async def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -14729,18 +16201,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14755,7 +16234,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -14772,6 +16251,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -14781,6 +16261,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -14788,7 +16269,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -14804,7 +16289,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -14818,7 +16303,7 @@ async def begin_create_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -14841,8 +16326,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -14855,6 +16341,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -14879,10 +16366,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -14894,7 +16380,7 @@ async def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -14913,18 +16399,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14941,7 +16434,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -14954,7 +16447,7 @@ def list_instance_functions_slot( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -14969,6 +16462,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14982,6 +16477,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -14994,6 +16490,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15011,7 +16508,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15025,7 +16526,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -15037,7 +16538,7 @@ async def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -15056,18 +16557,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15082,7 +16590,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -15096,7 +16604,7 @@ async def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -15117,6 +16625,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -15124,12 +16634,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15146,7 +16661,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -15164,6 +16679,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -15174,6 +16690,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -15181,7 +16698,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -15195,7 +16716,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -15210,7 +16731,7 @@ async def begin_create_instance_function_slot( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -15235,8 +16756,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -15250,6 +16772,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15274,13 +16797,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15290,7 +16812,7 @@ async def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -15311,6 +16833,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -15318,12 +16842,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15334,7 +16863,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -15350,7 +16879,7 @@ async def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -15375,6 +16904,7 @@ async def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -15386,6 +16916,7 @@ async def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -15393,7 +16924,11 @@ async def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -15412,11 +16947,11 @@ async def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret_slot( + async def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15427,7 +16962,7 @@ async def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -15450,6 +16985,8 @@ async def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -15458,12 +16995,17 @@ async def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15474,7 +17016,7 @@ async def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -15488,7 +17030,7 @@ async def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -15509,6 +17051,8 @@ async def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -15516,12 +17060,17 @@ async def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15536,7 +17085,7 @@ async def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -15550,7 +17099,7 @@ async def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -15571,6 +17120,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -15578,12 +17129,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15598,7 +17154,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -15611,7 +17167,7 @@ async def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -15630,18 +17186,25 @@ async def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15656,11 +17219,11 @@ async def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status_slot( + async def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15669,7 +17232,7 @@ async def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -15688,18 +17251,25 @@ async def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -15710,11 +17280,11 @@ async def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions_slot( + async def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15723,7 +17293,7 @@ async def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -15742,18 +17312,25 @@ async def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -15764,7 +17341,7 @@ async def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace_async @@ -15780,7 +17357,7 @@ async def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -15805,6 +17382,7 @@ async def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -15816,6 +17394,7 @@ async def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -15823,7 +17402,11 @@ async def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -15842,11 +17425,11 @@ async def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret_slot( + async def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15857,7 +17440,7 @@ async def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -15880,6 +17463,8 @@ async def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -15888,12 +17473,17 @@ async def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15904,7 +17494,7 @@ async def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -15917,7 +17507,7 @@ def list_host_name_bindings_slot( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -15933,6 +17523,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15946,6 +17538,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -15958,6 +17551,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15975,7 +17569,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15989,7 +17587,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -16002,7 +17600,7 @@ async def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -16024,6 +17622,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -16031,12 +17631,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16051,7 +17656,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -16066,7 +17671,7 @@ async def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -16091,6 +17696,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -16101,6 +17707,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -16108,7 +17715,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16123,11 +17734,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16137,7 +17748,7 @@ async def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -16159,6 +17770,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -16166,12 +17779,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16182,7 +17800,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -16197,7 +17815,7 @@ async def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -16220,6 +17838,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -16228,12 +17848,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16248,7 +17873,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16264,7 +17889,7 @@ async def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -16289,6 +17914,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -16300,6 +17926,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -16307,7 +17934,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16322,11 +17953,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16337,7 +17968,7 @@ async def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -16360,6 +17991,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -16368,12 +18001,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16384,7 +18022,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16400,7 +18038,7 @@ async def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -16425,6 +18063,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -16436,6 +18075,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -16443,7 +18083,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16458,7 +18102,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16471,7 +18115,7 @@ async def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -16490,18 +18134,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16516,7 +18167,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -16529,8 +18180,7 @@ async def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -16550,18 +18200,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16576,7 +18233,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -16590,7 +18247,7 @@ async def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -16612,6 +18269,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -16619,12 +18278,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16639,7 +18303,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -16654,8 +18318,7 @@ async def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -16679,6 +18342,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -16689,6 +18353,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -16696,7 +18361,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16711,11 +18380,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16725,7 +18394,7 @@ async def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -16747,6 +18416,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -16754,12 +18425,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16770,7 +18446,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -16785,8 +18461,7 @@ async def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -16810,6 +18485,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -16820,6 +18496,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -16827,7 +18504,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16842,7 +18523,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -16855,7 +18536,7 @@ def list_instance_identifiers_slot( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -16871,6 +18552,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16884,6 +18567,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -16896,6 +18580,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16913,7 +18598,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16927,7 +18616,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_info_slot( @@ -16940,7 +18629,7 @@ async def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -16962,6 +18651,8 @@ async def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -16969,12 +18660,17 @@ async def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16989,7 +18685,7 @@ async def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -17003,7 +18699,7 @@ async def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -17024,6 +18720,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -17031,12 +18729,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17051,7 +18754,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -17069,6 +18772,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -17079,6 +18783,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -17086,7 +18791,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -17102,7 +18811,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -17117,7 +18826,7 @@ async def begin_create_instance_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -17142,8 +18851,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -17157,6 +18867,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -17181,10 +18892,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -17197,7 +18907,7 @@ async def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -17218,6 +18928,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -17225,12 +18937,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17247,7 +18964,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -17262,8 +18979,8 @@ def list_instance_processes_slot( """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. + 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 @@ -17282,6 +18999,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17296,6 +19015,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -17309,6 +19029,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17326,7 +19047,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17340,7 +19065,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -17354,8 +19079,7 @@ async def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -17380,6 +19104,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -17388,12 +19114,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17410,11 +19141,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17426,8 +19157,8 @@ async def delete_instance_process_slot( """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. + 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 @@ -17452,6 +19183,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -17460,12 +19193,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -17476,7 +19214,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -17491,8 +19229,7 @@ async def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -17517,6 +19254,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -17525,12 +19264,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17547,7 +19291,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -17563,8 +19307,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -17585,6 +19329,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17600,6 +19346,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -17614,6 +19361,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17631,7 +19379,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17645,7 +19397,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -17660,8 +19412,7 @@ async def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -17688,6 +19439,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -17697,12 +19450,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17719,7 +19477,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -17734,8 +19492,7 @@ def list_instance_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -17756,6 +19513,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17771,6 +19530,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -17785,6 +19545,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17802,7 +19563,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17816,7 +19581,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable_slot( @@ -17828,7 +19593,7 @@ async def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -17848,18 +19613,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17874,7 +19646,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -17887,7 +19659,7 @@ def list_site_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -17903,6 +19675,8 @@ def list_site_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17916,6 +19690,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -17928,6 +19703,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17945,7 +19721,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17959,7 +19739,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers_slot( @@ -17971,7 +19751,7 @@ async def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -17990,18 +19770,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18016,7 +19803,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace_async @@ -18030,8 +19817,8 @@ async def get_migrate_my_sql_status_slot( """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. + 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 @@ -18050,18 +19837,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18076,7 +19870,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -18089,7 +19883,7 @@ async def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -18109,18 +19903,25 @@ async def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18135,7 +19936,7 @@ async def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18152,9 +19953,9 @@ async def create_or_update_swift_virtual_network_connection_slot( 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 + 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. @@ -18177,6 +19978,7 @@ async def create_or_update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -18186,6 +19988,7 @@ async def create_or_update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_slot.metadata['url'], @@ -18193,7 +19996,11 @@ async def create_or_update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18208,11 +20015,11 @@ async def create_or_update_swift_virtual_network_connection_slot( 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'} # type: ignore + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network_slot( + async def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18221,7 +20028,7 @@ async def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -18241,18 +20048,25 @@ async def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18263,7 +20077,7 @@ async def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18280,9 +20094,9 @@ async def update_swift_virtual_network_connection_slot( 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 + 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. @@ -18305,6 +20119,7 @@ async def update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -18314,6 +20129,7 @@ async def update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_slot.metadata['url'], @@ -18321,7 +20137,11 @@ async def update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18336,7 +20156,7 @@ async def update_swift_virtual_network_connection_slot( return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18350,7 +20170,7 @@ async def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -18372,6 +20192,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -18379,12 +20201,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18401,7 +20228,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -18415,8 +20242,7 @@ async def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18438,6 +20264,8 @@ async def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -18445,12 +20273,17 @@ async def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18469,7 +20302,7 @@ async def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -18485,7 +20318,7 @@ async def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -18493,11 +20326,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -18510,12 +20343,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18524,7 +20360,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18539,7 +20379,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_slot_initial( @@ -18558,12 +20398,15 @@ async def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18572,7 +20415,11 @@ async def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18590,7 +20437,7 @@ async def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -18606,7 +20453,7 @@ async def begin_start_web_site_network_trace_operation_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -18614,11 +20461,11 @@ async def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -18634,7 +20481,8 @@ async def begin_start_web_site_network_trace_operation_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -18649,6 +20497,7 @@ async def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -18672,13 +20521,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace_slot( + async def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18687,7 +20535,7 @@ async def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -18706,18 +20554,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18728,7 +20583,7 @@ async def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -18742,8 +20597,7 @@ async def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18765,6 +20619,8 @@ async def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -18772,12 +20628,17 @@ async def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18792,7 +20653,7 @@ async def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -18806,8 +20667,7 @@ async def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18829,6 +20689,8 @@ async def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -18836,12 +20698,17 @@ async def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18860,7 +20727,7 @@ async def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -18874,8 +20741,7 @@ async def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18897,6 +20763,8 @@ async def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -18904,12 +20772,17 @@ async def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18924,11 +20797,11 @@ async def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18937,8 +20810,7 @@ async def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -18958,18 +20830,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18980,7 +20859,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -18994,7 +20873,7 @@ def list_perf_mon_counters_slot( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -19004,7 +20883,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -19013,6 +20892,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19026,6 +20907,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -19039,6 +20921,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -19057,7 +20940,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19071,7 +20958,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -19083,7 +20970,7 @@ async def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -19102,18 +20989,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19128,7 +21022,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -19141,7 +21035,7 @@ async def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -19161,18 +21055,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19187,7 +21088,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -19201,7 +21102,7 @@ async def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -19223,6 +21124,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -19230,12 +21133,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19250,7 +21158,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19265,7 +21173,7 @@ async def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -19289,6 +21197,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -19299,6 +21208,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -19306,7 +21216,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19321,11 +21235,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19335,7 +21249,7 @@ async def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -19357,6 +21271,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -19364,12 +21280,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19380,7 +21301,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19395,7 +21316,7 @@ async def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -19419,6 +21340,7 @@ async def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -19429,6 +21351,7 @@ async def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -19436,7 +21359,11 @@ async def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19451,7 +21378,7 @@ async def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19465,8 +21392,8 @@ async def get_private_access_slot( """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. + 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 @@ -19485,18 +21412,25 @@ async def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19511,7 +21445,7 @@ async def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -19526,8 +21460,8 @@ async def put_private_access_vnet_slot( """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. + 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 @@ -19548,6 +21482,7 @@ async def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -19557,6 +21492,7 @@ async def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -19564,7 +21500,11 @@ async def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19579,7 +21519,7 @@ async def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -19592,7 +21532,7 @@ async def get_private_endpoint_connection( ) -> "_models.PrivateEndpointConnectionResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19611,18 +21551,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19637,7 +21584,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -19654,6 +21601,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -19663,6 +21611,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -19670,7 +21619,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19688,7 +21641,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -19702,7 +21655,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.PrivateEndpointConnectionResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -19727,8 +21680,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.PrivateEndpointConnectionResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -19741,6 +21695,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19765,10 +21720,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -19783,18 +21737,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -19815,7 +21776,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -19828,7 +21789,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19848,7 +21809,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -19860,6 +21822,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -19883,10 +21846,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -19897,7 +21859,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19914,17 +21876,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19939,7 +21908,7 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -19953,8 +21922,8 @@ def list_processes_slot( """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. + 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 @@ -19970,6 +21939,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19983,6 +21954,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -19995,6 +21967,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20012,7 +21985,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20026,7 +22003,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -20039,8 +22016,7 @@ async def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -20062,6 +22038,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -20069,12 +22047,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20091,11 +22074,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20106,8 +22089,8 @@ async def delete_process_slot( """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. + 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 @@ -20129,6 +22112,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -20136,12 +22121,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20152,7 +22142,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -20166,8 +22156,7 @@ async def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -20189,6 +22178,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -20196,12 +22187,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20218,7 +22214,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -20233,8 +22229,8 @@ def list_process_modules_slot( """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. + 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 @@ -20252,6 +22248,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20266,6 +22264,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -20279,6 +22278,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20296,7 +22296,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20310,7 +22314,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -20324,8 +22328,7 @@ async def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -20349,6 +22352,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -20357,12 +22362,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20379,7 +22389,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -20393,8 +22403,7 @@ def list_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -20412,6 +22421,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20426,6 +22437,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -20439,6 +22451,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20456,7 +22469,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20470,7 +22487,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -20482,7 +22499,7 @@ def list_public_certificates_slot( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -20498,6 +22515,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20511,6 +22530,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -20523,6 +22543,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20540,7 +22561,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20554,7 +22579,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -20567,7 +22592,7 @@ async def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -20589,6 +22614,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -20596,12 +22623,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20616,7 +22648,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -20631,7 +22663,7 @@ async def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -20656,6 +22688,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -20666,6 +22699,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -20673,7 +22707,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20688,11 +22726,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20702,7 +22740,7 @@ async def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -20724,6 +22762,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -20731,12 +22771,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20747,7 +22792,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -20761,7 +22806,7 @@ async def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -20785,6 +22830,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -20794,6 +22840,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -20801,7 +22848,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20816,11 +22867,11 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20830,8 +22881,8 @@ async def reset_slot_configuration_slot( """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. + 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 @@ -20851,18 +22902,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20873,11 +22931,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20888,7 +22946,7 @@ async def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -20898,10 +22956,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -20914,12 +22973,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -20927,7 +22989,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20938,10 +23004,10 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - async def _restore_from_backup_blob_slot_initial( + async def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20955,6 +23021,7 @@ async def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -20964,6 +23031,7 @@ async def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -20971,7 +23039,11 @@ async def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20981,11 +23053,11 @@ async def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob_slot( + async def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20995,7 +23067,7 @@ async def begin_restore_from_backup_blob_slot( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -21018,8 +23090,9 @@ async def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21032,6 +23105,7 @@ async def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21053,12 +23127,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_slot_initial( + async def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21072,6 +23145,7 @@ async def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -21081,6 +23155,7 @@ async def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -21088,7 +23163,11 @@ async def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21098,11 +23177,11 @@ async def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app_slot( + async def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21112,7 +23191,7 @@ async def begin_restore_from_deleted_app_slot( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -21134,8 +23213,9 @@ async def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21148,6 +23228,7 @@ async def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21169,12 +23250,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_slot_initial( + async def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21188,6 +23268,7 @@ async def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -21197,6 +23278,7 @@ async def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -21204,7 +23286,11 @@ async def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21214,11 +23300,11 @@ async def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot_slot( + async def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21228,7 +23314,7 @@ async def begin_restore_snapshot_slot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -21251,8 +23337,9 @@ async def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21265,6 +23352,7 @@ async def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21286,10 +23374,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -21301,7 +23388,7 @@ def list_site_extensions_slot( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -21317,6 +23404,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21330,6 +23419,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -21342,6 +23432,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21359,7 +23450,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21373,7 +23468,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -21386,7 +23481,7 @@ async def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -21408,6 +23503,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -21415,12 +23512,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21437,7 +23539,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -21454,6 +23556,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -21461,12 +23565,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -21485,7 +23594,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -21499,7 +23608,7 @@ async def begin_install_site_extension_slot( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -21524,7 +23633,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -21537,6 +23647,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -21560,13 +23671,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21576,7 +23686,7 @@ async def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -21598,6 +23708,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -21605,12 +23717,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21621,10 +23738,10 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore - async def _copy_slot_initial( + async def _copy_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21638,6 +23755,7 @@ async def _copy_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -21647,6 +23765,7 @@ async def _copy_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_slot_initial.metadata['url'], @@ -21654,7 +23773,11 @@ async def _copy_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21664,11 +23787,11 @@ async def _copy_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + _copy_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace_async - async def begin_copy_slot( + async def begin_copy_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21678,7 +23801,7 @@ async def begin_copy_slot( ) -> AsyncLROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -21702,8 +23825,9 @@ async def begin_copy_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21716,6 +23840,7 @@ async def begin_copy_slot( name=name, slot=slot, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21737,10 +23862,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + begin_copy_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace def list_slot_differences_slot( @@ -21753,7 +23877,7 @@ def list_slot_differences_slot( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -21771,6 +23895,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -21787,6 +23912,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -21802,6 +23928,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -21821,7 +23948,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21835,9 +23966,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21851,6 +23982,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -21860,6 +23992,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -21867,7 +24000,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21877,11 +24014,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21891,7 +24028,7 @@ async def begin_swap_slot( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -21914,8 +24051,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21928,6 +24066,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21949,10 +24088,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -21964,7 +24102,7 @@ def list_snapshots_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -21978,6 +24116,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21991,6 +24131,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -22003,6 +24144,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22020,7 +24162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22034,7 +24180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -22046,7 +24192,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -22060,6 +24206,8 @@ def list_snapshots_from_dr_secondary_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22073,6 +24221,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -22085,6 +24234,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22102,7 +24252,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22116,7 +24270,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -22128,7 +24282,7 @@ async def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -22148,18 +24302,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22181,7 +24342,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -22198,6 +24359,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -22207,6 +24369,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -22214,7 +24377,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22235,7 +24402,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -22249,7 +24416,7 @@ async def begin_create_or_update_source_control_slot( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -22274,8 +24441,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -22288,6 +24456,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22312,13 +24481,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22327,7 +24495,7 @@ async def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -22347,18 +24515,25 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -22369,7 +24544,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -22383,7 +24558,7 @@ async def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -22405,6 +24580,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -22414,6 +24590,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -22421,7 +24598,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22443,11 +24624,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22456,7 +24637,7 @@ async def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -22476,18 +24657,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22498,7 +24686,7 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore async def _start_network_trace_slot_initial( @@ -22517,12 +24705,15 @@ async def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -22531,7 +24722,11 @@ async def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22549,7 +24744,7 @@ async def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -22565,7 +24760,7 @@ async def begin_start_network_trace_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -22573,11 +24768,11 @@ async def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -22593,7 +24788,8 @@ async def begin_start_network_trace_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -22608,6 +24804,7 @@ async def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -22631,13 +24828,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22646,7 +24842,7 @@ async def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -22666,18 +24862,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22688,11 +24891,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace_slot( + async def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22701,7 +24904,7 @@ async def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -22720,18 +24923,25 @@ async def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22742,11 +24952,11 @@ async def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22755,7 +24965,7 @@ async def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -22774,18 +24984,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22796,11 +25013,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22809,7 +25026,7 @@ async def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -22828,18 +25045,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -22850,7 +25074,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -22863,7 +25087,7 @@ def list_triggered_web_jobs_slot( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -22879,6 +25103,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22892,6 +25118,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -22904,6 +25131,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22921,7 +25149,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22935,7 +25167,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -22948,7 +25180,7 @@ async def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -22970,6 +25202,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -22977,12 +25211,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22999,11 +25238,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23013,7 +25252,7 @@ async def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -23035,6 +25274,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -23042,12 +25283,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23058,7 +25304,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -23072,7 +25318,7 @@ def list_triggered_web_job_history_slot( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -23090,6 +25336,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23104,6 +25352,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -23117,6 +25366,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23134,7 +25384,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23148,7 +25402,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -23162,8 +25416,7 @@ async def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -23187,6 +25440,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -23195,12 +25450,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23217,11 +25477,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23231,7 +25491,7 @@ async def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -23253,6 +25513,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -23260,12 +25522,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23276,7 +25543,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -23290,7 +25557,7 @@ def list_usages_slot( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -23302,7 +25569,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -23311,6 +25578,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23324,6 +25593,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -23337,6 +25607,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -23355,7 +25626,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23369,7 +25644,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -23381,7 +25656,7 @@ async def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -23401,18 +25676,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23427,7 +25709,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -23441,7 +25723,7 @@ async def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -23463,6 +25745,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -23470,12 +25754,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23490,7 +25779,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23506,8 +25795,8 @@ async def create_or_update_vnet_connection_slot( """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). + 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 @@ -23531,6 +25820,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -23541,6 +25831,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -23548,7 +25839,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23563,11 +25858,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23577,8 +25872,7 @@ async def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -23600,6 +25894,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -23607,12 +25903,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23623,7 +25924,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23639,8 +25940,8 @@ async def update_vnet_connection_slot( """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). + 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 @@ -23664,6 +25965,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -23674,6 +25976,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -23681,7 +25984,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23696,7 +26003,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23711,7 +26018,7 @@ async def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -23735,6 +26042,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -23743,12 +26052,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23765,7 +26079,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -23781,7 +26095,7 @@ async def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -23807,6 +26121,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -23818,6 +26133,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -23825,7 +26141,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23840,7 +26160,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -23856,7 +26176,7 @@ async def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -23882,6 +26202,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -23893,6 +26214,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -23900,7 +26222,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23915,7 +26241,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -23928,7 +26254,7 @@ def list_web_jobs_slot( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -23943,6 +26269,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23956,6 +26284,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -23968,6 +26297,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23985,7 +26315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23999,7 +26333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -24012,7 +26346,7 @@ async def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -24034,6 +26368,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -24041,12 +26377,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24061,7 +26402,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -24074,7 +26415,7 @@ def list_slot_differences_from_production( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -24089,6 +26430,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -24104,6 +26446,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -24118,6 +26461,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -24137,7 +26481,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24151,9 +26499,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24166,6 +26514,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -24174,6 +26523,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -24181,7 +26531,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24191,11 +26545,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24204,7 +26558,7 @@ async def begin_swap_slot_with_production( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -24224,8 +26578,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24237,6 +26592,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24258,10 +26614,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -24272,7 +26627,7 @@ def list_snapshots( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -24284,6 +26639,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24296,6 +26653,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -24307,6 +26665,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24324,7 +26683,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24338,7 +26701,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -24349,7 +26712,7 @@ def list_snapshots_from_dr_secondary( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -24361,6 +26724,8 @@ def list_snapshots_from_dr_secondary( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24373,6 +26738,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -24384,6 +26750,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24401,7 +26768,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24415,7 +26786,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control( @@ -24426,7 +26797,7 @@ async def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -24443,17 +26814,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24475,7 +26853,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -24491,6 +26869,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -24499,6 +26878,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -24506,7 +26886,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24527,7 +26911,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -24540,7 +26924,7 @@ async def begin_create_or_update_source_control( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -24562,8 +26946,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -24575,6 +26960,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24599,13 +26985,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24613,7 +26998,7 @@ async def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -24630,17 +27015,24 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -24651,7 +27043,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -24664,7 +27056,7 @@ async def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -24683,6 +27075,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -24691,6 +27084,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -24698,7 +27092,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24720,11 +27118,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24732,7 +27130,7 @@ async def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -24749,17 +27147,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24770,7 +27175,7 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore async def _start_network_trace_initial( @@ -24788,11 +27193,14 @@ async def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -24801,7 +27209,11 @@ async def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24819,7 +27231,7 @@ async def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -24834,17 +27246,17 @@ async def begin_start_network_trace( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -24860,7 +27272,8 @@ async def begin_start_network_trace( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -24874,6 +27287,7 @@ async def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -24897,13 +27311,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24911,7 +27324,7 @@ async def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -24928,17 +27341,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24949,11 +27369,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace( + async def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24961,7 +27381,7 @@ async def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -24978,17 +27398,24 @@ async def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24999,11 +27426,11 @@ async def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25011,7 +27438,7 @@ async def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -25028,17 +27455,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25049,11 +27483,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25061,7 +27495,7 @@ async def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -25078,17 +27512,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -25099,7 +27540,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -25111,7 +27552,7 @@ def list_triggered_web_jobs( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -25124,6 +27565,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25136,6 +27579,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -25147,6 +27591,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25164,7 +27609,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25178,7 +27627,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -25190,7 +27639,7 @@ async def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -25209,18 +27658,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25237,11 +27693,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25250,7 +27706,7 @@ async def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -25269,18 +27725,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -25291,7 +27754,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -25304,7 +27767,7 @@ def list_triggered_web_job_history( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -25319,6 +27782,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25332,6 +27797,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -25344,6 +27810,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25361,7 +27828,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25375,7 +27846,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -25388,8 +27859,7 @@ async def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -25410,6 +27880,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -25417,12 +27889,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25439,11 +27916,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25452,7 +27929,7 @@ async def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -25471,18 +27948,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25493,7 +27977,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -25506,7 +27990,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -25515,7 +27999,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -25524,6 +28008,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25536,6 +28022,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -25548,6 +28035,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -25566,7 +28054,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25580,7 +28072,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -25591,7 +28083,7 @@ async def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -25608,17 +28100,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25633,7 +28132,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -25646,7 +28145,7 @@ async def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -25665,18 +28164,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25691,7 +28197,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25706,8 +28212,8 @@ async def create_or_update_vnet_connection( """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). + 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 @@ -25728,6 +28234,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -25737,6 +28244,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -25744,7 +28252,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25759,11 +28271,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25772,8 +28284,7 @@ async def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -25792,18 +28303,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25814,7 +28332,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25829,8 +28347,8 @@ async def update_vnet_connection( """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). + 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 @@ -25851,6 +28369,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -25860,6 +28379,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -25867,7 +28387,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25882,7 +28406,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25896,7 +28420,7 @@ async def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -25917,6 +28441,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -25924,12 +28450,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25946,7 +28477,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25961,7 +28492,7 @@ async def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -25984,6 +28515,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25994,6 +28526,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -26001,7 +28534,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26016,7 +28553,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -26031,7 +28568,7 @@ async def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -26054,6 +28591,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -26064,6 +28602,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -26071,7 +28610,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26086,7 +28629,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -26098,7 +28641,7 @@ def list_web_jobs( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -26110,6 +28653,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26122,6 +28667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -26133,6 +28679,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26150,7 +28697,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26164,7 +28715,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -26176,7 +28727,7 @@ async def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -26195,18 +28746,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26221,5 +28779,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_site_management_client_operations.py index ea210efc7cf3..ec3aaf12c31f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -33,7 +32,7 @@ async def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -68,7 +74,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -79,7 +85,7 @@ async def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2020_06_01.models.User @@ -94,11 +100,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -106,7 +114,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +133,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -131,7 +143,7 @@ def list_source_controls( ) -> AsyncIterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -140,6 +152,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -149,6 +163,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -157,6 +172,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -174,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -188,7 +208,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -198,7 +218,7 @@ async def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -213,15 +233,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -236,7 +263,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -248,7 +275,7 @@ async def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -265,12 +292,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -278,7 +307,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -293,7 +326,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -305,11 +338,11 @@ def list_billing_meters( ) -> AsyncIterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -318,6 +351,8 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -328,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -339,6 +375,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -358,7 +395,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -372,7 +413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace_async async def check_name_availability( @@ -384,13 +425,13 @@ async def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -403,6 +444,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -410,6 +452,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -417,7 +460,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -432,7 +479,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace_async @@ -442,7 +489,7 @@ async def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -455,15 +502,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -478,7 +532,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -492,18 +546,18 @@ def list_geo_regions( ) -> AsyncIterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -511,6 +565,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -521,6 +577,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -534,6 +591,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -555,7 +613,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -569,7 +631,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -579,7 +641,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> AsyncIterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier @@ -590,6 +652,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -603,6 +666,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -615,6 +679,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -634,7 +699,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -648,7 +717,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -657,7 +726,7 @@ def list_premier_add_on_offers( ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -666,6 +735,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -676,6 +747,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -685,6 +757,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -702,7 +775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -716,7 +793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -725,7 +802,7 @@ async def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -738,15 +815,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -761,7 +845,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -773,8 +857,8 @@ async def verify_hosting_environment_vnet( """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. + 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 @@ -789,12 +873,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -802,7 +888,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -817,11 +907,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -829,7 +919,7 @@ async def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -846,6 +936,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -853,6 +944,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -860,7 +952,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -871,7 +967,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -883,7 +979,7 @@ async def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -900,6 +996,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -907,6 +1004,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -914,7 +1012,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -929,11 +1031,11 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -941,7 +1043,7 @@ async def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -958,6 +1060,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -965,6 +1068,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -972,7 +1076,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -983,5 +1091,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_certificate_orders_operations.py index 0b53b6f24ae0..5dba30635124 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,33 +68,33 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -105,30 +106,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -297,31 +301,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -333,10 +338,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -344,21 +350,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -373,12 +379,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -386,23 +392,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -416,10 +422,11 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -427,21 +434,21 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -456,12 +463,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -469,23 +476,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -501,35 +508,35 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -545,35 +552,35 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -586,31 +593,32 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -624,35 +632,35 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -668,35 +676,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -709,31 +717,32 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -744,31 +753,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -779,35 +789,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -836,7 +847,7 @@ def list( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -845,6 +856,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -855,6 +868,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -864,6 +878,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -881,7 +896,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -895,17 +914,17 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -921,12 +940,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -934,7 +955,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -945,7 +970,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -956,7 +981,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -967,6 +992,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -978,6 +1005,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -988,6 +1016,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1005,7 +1034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1019,7 +1052,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1030,7 +1063,7 @@ def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -1047,17 +1080,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1072,7 +1112,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1088,6 +1128,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1096,6 +1137,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1103,7 +1145,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1121,7 +1167,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1134,7 +1180,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -1157,8 +1203,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1170,6 +1217,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1194,13 +1242,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1208,7 +1255,7 @@ def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -1225,17 +1272,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1246,7 +1300,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1259,7 +1313,7 @@ def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -1279,6 +1333,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1287,6 +1342,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1294,7 +1350,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1313,7 +1373,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1325,7 +1385,7 @@ def list_certificates( ) -> Iterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -1338,6 +1398,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1350,6 +1412,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1361,6 +1424,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1378,7 +1442,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,7 +1460,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1404,7 +1472,7 @@ def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -1423,18 +1491,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1449,7 +1524,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1466,6 +1541,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1475,6 +1551,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1482,7 +1559,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1500,7 +1581,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1514,7 +1595,7 @@ def begin_create_or_update_certificate( ) -> LROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1538,8 +1619,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1552,6 +1634,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1576,13 +1659,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1591,7 +1673,7 @@ def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -1610,18 +1692,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1632,7 +1721,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1646,7 +1735,7 @@ def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1668,6 +1757,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1677,6 +1767,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1684,7 +1775,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1703,11 +1798,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1716,7 +1811,7 @@ def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -1736,6 +1831,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1744,6 +1840,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1751,7 +1848,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1762,11 +1863,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1775,7 +1876,7 @@ def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1795,6 +1896,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1803,6 +1905,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1810,7 +1913,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1821,11 +1928,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1833,7 +1940,7 @@ def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1850,17 +1957,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1871,11 +1985,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1884,7 +1998,7 @@ def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1903,6 +2017,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1911,6 +2026,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1918,7 +2034,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1929,7 +2049,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1942,7 +2062,7 @@ def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1961,6 +2081,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1969,6 +2090,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1976,7 +2098,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1991,11 +2117,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -2003,7 +2129,7 @@ def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -2020,17 +2146,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2041,7 +2174,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2053,7 +2186,7 @@ def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -2070,17 +2203,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2095,7 +2235,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2107,7 +2247,7 @@ def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -2124,17 +2264,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2149,5 +2296,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_environments_operations.py index d46bc836e5ba..00bd7b771cd1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,33 +183,34 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -296,31 +301,32 @@ def build_get_vip_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -334,35 +340,35 @@ def build_change_vnet_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -375,31 +381,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -411,10 +418,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -422,21 +430,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -447,31 +455,32 @@ def build_get_inbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -482,31 +491,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -517,31 +527,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -555,35 +566,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -599,35 +610,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -641,10 +652,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -652,21 +664,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -677,31 +689,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -712,31 +725,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -747,31 +761,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -782,31 +797,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -817,31 +833,32 @@ def build_get_outbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -852,31 +869,32 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -887,31 +905,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -922,31 +941,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -959,33 +979,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -996,31 +1017,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1033,33 +1055,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1070,31 +1093,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1106,10 +1130,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1117,21 +1142,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1146,12 +1171,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1159,23 +1184,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1192,12 +1217,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1205,23 +1230,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1236,10 +1261,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1248,21 +1274,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1274,10 +1300,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1285,21 +1312,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1311,10 +1338,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1322,21 +1350,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1348,10 +1376,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1359,25 +1388,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1406,7 +1435,7 @@ def list( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -1415,6 +1444,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1425,6 +1456,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1434,6 +1466,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1451,7 +1484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1465,7 +1502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1475,7 +1512,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -1486,6 +1523,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1497,6 +1536,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1507,6 +1547,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1524,7 +1565,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1538,7 +1583,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1549,7 +1594,7 @@ def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -1566,17 +1611,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1591,7 +1643,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1607,6 +1659,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1615,6 +1668,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1622,7 +1676,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1643,7 +1701,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1656,7 +1714,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -1679,8 +1737,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1692,6 +1751,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1716,12 +1776,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1734,18 +1793,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1755,11 +1821,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1768,7 +1834,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -1789,7 +1855,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1801,6 +1868,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1821,10 +1889,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -1836,7 +1903,7 @@ def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -1856,6 +1923,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -1864,6 +1932,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1871,7 +1940,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1893,7 +1966,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1905,7 +1978,7 @@ def list_capacities( ) -> Iterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -1918,6 +1991,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1930,6 +2005,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -1941,6 +2017,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1958,7 +2035,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1972,7 +2053,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def get_vip_info( @@ -1983,7 +2064,7 @@ def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -2000,17 +2081,24 @@ def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2025,7 +2113,7 @@ def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore def _change_vnet_initial( @@ -2041,6 +2129,7 @@ def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -2049,6 +2138,7 @@ def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -2056,7 +2146,11 @@ def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2074,7 +2168,7 @@ def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2087,7 +2181,7 @@ def begin_change_vnet( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -2110,6 +2204,7 @@ def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -2125,6 +2220,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -2139,6 +2235,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -2158,7 +2255,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2169,7 +2270,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2181,6 +2282,7 @@ def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2191,8 +2293,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -2208,10 +2309,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2223,7 +2323,7 @@ def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -2240,17 +2340,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2265,7 +2372,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2278,7 +2385,7 @@ def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -2297,18 +2404,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2323,7 +2437,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2335,8 +2449,7 @@ def get_inbound_network_dependencies_endpoints( ) -> Iterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -2349,6 +2462,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2361,6 +2476,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2372,6 +2488,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2389,7 +2506,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2403,7 +2524,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2414,7 +2535,7 @@ def list_multi_role_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -2426,6 +2547,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2438,6 +2561,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2449,6 +2573,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2466,7 +2591,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2480,7 +2609,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2491,7 +2620,7 @@ def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -2508,17 +2637,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2533,7 +2669,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2549,6 +2685,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2557,6 +2694,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2564,7 +2702,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2582,7 +2724,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2595,7 +2737,7 @@ def begin_create_or_update_multi_role_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -2616,8 +2758,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2629,6 +2772,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2653,10 +2797,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -2668,7 +2811,7 @@ def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -2687,6 +2830,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2695,6 +2839,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -2702,7 +2847,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2721,7 +2870,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2735,8 +2884,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -2751,6 +2900,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2764,6 +2915,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2776,6 +2928,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2793,7 +2946,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2807,7 +2964,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -2818,7 +2975,7 @@ def list_multi_role_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -2831,6 +2988,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2843,6 +3002,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2854,6 +3014,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2871,7 +3032,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2885,7 +3050,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -2896,7 +3061,7 @@ def list_multi_role_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -2907,6 +3072,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2919,6 +3086,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -2930,6 +3098,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2947,7 +3116,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2961,7 +3134,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -2972,7 +3145,7 @@ def list_multi_role_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -2983,6 +3156,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2995,6 +3170,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3006,6 +3182,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3023,7 +3200,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3037,7 +3218,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3048,7 +3229,7 @@ def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -3065,17 +3246,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3090,7 +3278,7 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -3102,8 +3290,7 @@ def get_outbound_network_dependencies_endpoints( ) -> Iterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -3116,6 +3303,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3128,6 +3317,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -3139,6 +3329,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3156,7 +3347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3170,10 +3365,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3181,7 +3376,7 @@ def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -3198,17 +3393,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -3219,7 +3421,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -3234,17 +3436,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3262,7 +3471,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3274,7 +3483,7 @@ def begin_resume( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -3295,6 +3504,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3307,6 +3518,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -3318,6 +3530,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3335,7 +3548,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3346,7 +3563,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3357,6 +3574,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3366,8 +3584,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3383,10 +3600,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3398,7 +3614,7 @@ def list_app_service_plans( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -3411,6 +3627,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3423,6 +3641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -3434,6 +3653,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3451,7 +3671,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3465,7 +3689,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -3477,19 +3701,22 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3502,6 +3729,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -3514,6 +3742,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -3532,7 +3761,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3546,7 +3779,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -3560,17 +3793,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3588,7 +3828,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -3600,7 +3840,7 @@ def begin_suspend( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -3621,6 +3861,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3633,6 +3875,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -3644,6 +3887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3661,7 +3905,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3672,7 +3920,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3683,6 +3931,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3692,8 +3941,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3709,10 +3957,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -3725,7 +3972,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -3734,7 +3981,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -3743,6 +3990,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3755,6 +4004,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -3767,6 +4017,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -3785,7 +4036,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3799,7 +4054,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -3810,7 +4065,7 @@ def list_worker_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -3822,6 +4077,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3834,6 +4091,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -3845,6 +4103,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3862,7 +4121,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3876,7 +4139,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -3888,7 +4151,7 @@ def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -3907,18 +4170,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3933,7 +4203,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -3950,6 +4220,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3959,6 +4230,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -3966,7 +4238,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3984,7 +4260,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -3998,7 +4274,7 @@ def begin_create_or_update_worker_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -4021,8 +4297,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4035,6 +4312,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4059,10 +4337,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4075,7 +4352,7 @@ def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -4096,6 +4373,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4105,6 +4383,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4112,7 +4391,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4131,7 +4414,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4145,8 +4428,7 @@ def list_worker_pool_instance_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -4163,6 +4445,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4177,6 +4461,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4190,6 +4475,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4207,7 +4493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4221,7 +4511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -4233,7 +4523,7 @@ def list_web_worker_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -4248,6 +4538,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4261,6 +4553,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4273,6 +4566,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4290,7 +4584,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4304,7 +4602,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -4316,7 +4614,7 @@ def list_worker_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -4329,6 +4627,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4342,6 +4642,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -4354,6 +4655,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4371,7 +4673,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4385,7 +4691,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -4397,7 +4703,7 @@ def list_web_worker_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -4410,6 +4716,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4423,6 +4731,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -4435,6 +4744,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4452,7 +4762,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4466,4 +4780,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_plans_operations.py index b4de5dc44dbc..db3015d65b11 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,31 +185,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +303,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -310,21 +316,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -337,10 +343,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -349,21 +356,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -376,10 +383,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -388,21 +396,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -415,10 +423,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -427,21 +436,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -452,31 +461,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -487,31 +497,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -524,33 +535,34 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -565,37 +577,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,31 +619,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -643,33 +657,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -680,31 +695,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -716,10 +732,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -727,21 +744,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -754,10 +771,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -766,21 +784,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -796,12 +814,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -810,23 +828,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -840,10 +858,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -851,21 +870,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -878,10 +897,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -890,21 +910,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -920,12 +940,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -934,23 +954,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -965,10 +985,11 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -977,21 +998,21 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1028,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1021,23 +1042,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1051,10 +1072,11 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1062,25 +1084,25 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1110,7 +1132,7 @@ def list( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -1123,6 +1145,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1133,6 +1157,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1143,6 +1168,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1161,7 +1187,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1175,7 +1205,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1185,7 +1215,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -1196,6 +1226,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1207,6 +1239,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1217,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1234,7 +1268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1248,7 +1286,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1259,7 +1297,7 @@ def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -1276,17 +1314,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1303,7 +1348,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1319,6 +1364,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1327,6 +1373,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1334,7 +1381,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1352,7 +1403,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1365,7 +1416,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -1386,8 +1437,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1399,6 +1451,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1423,13 +1476,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1437,7 +1489,7 @@ def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -1454,17 +1506,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1475,7 +1534,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1488,7 +1547,7 @@ def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -1507,6 +1566,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1515,6 +1575,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1522,7 +1583,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1541,7 +1606,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1553,7 +1618,7 @@ def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -1570,17 +1635,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1595,7 +1667,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1609,7 +1681,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -1630,6 +1702,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1637,12 +1711,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1657,11 +1736,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1671,7 +1750,7 @@ def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -1692,6 +1771,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1699,12 +1780,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1715,7 +1801,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1729,7 +1815,7 @@ def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -1750,6 +1836,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1757,12 +1845,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1777,7 +1870,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1791,7 +1884,7 @@ def list_web_apps_by_hybrid_connection( ) -> Iterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -1806,6 +1899,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1820,6 +1915,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1833,6 +1929,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1850,7 +1947,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1864,7 +1965,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1875,7 +1976,7 @@ def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -1892,17 +1993,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1917,7 +2025,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1929,7 +2037,7 @@ def list_hybrid_connections( ) -> Iterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -1942,6 +2050,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1954,6 +2064,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -1965,6 +2076,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1982,7 +2094,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1996,10 +2112,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2008,7 +2124,7 @@ def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -2029,18 +2145,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2051,7 +2174,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2066,7 +2189,7 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -2074,18 +2197,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2098,6 +2224,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2112,6 +2239,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2132,7 +2260,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2146,7 +2278,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2157,7 +2289,7 @@ def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -2174,17 +2306,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2199,7 +2338,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2212,14 +2351,15 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2228,6 +2368,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2240,6 +2382,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2252,6 +2395,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2270,7 +2414,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2284,7 +2432,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2295,7 +2443,7 @@ def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -2312,17 +2460,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2337,7 +2492,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2350,7 +2505,7 @@ def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -2369,18 +2524,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2397,7 +2559,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2411,7 +2573,7 @@ def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -2432,6 +2594,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2439,12 +2603,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2459,7 +2628,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2474,7 +2643,7 @@ def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -2497,6 +2666,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2507,6 +2677,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2514,7 +2685,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2529,7 +2704,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2542,8 +2717,7 @@ def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -2562,18 +2736,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2588,7 +2769,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2602,7 +2783,7 @@ def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -2623,6 +2804,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2630,12 +2813,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2652,7 +2840,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2667,7 +2855,7 @@ def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2690,6 +2878,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2700,6 +2889,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2707,7 +2897,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2724,11 +2918,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2738,7 +2932,7 @@ def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -2759,6 +2953,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2766,12 +2962,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2782,7 +2983,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2797,7 +2998,7 @@ def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2820,6 +3021,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2830,6 +3032,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -2837,7 +3040,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2854,11 +3061,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2867,7 +3074,7 @@ def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -2886,18 +3093,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2908,5 +3122,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificate_registration_provider_operations.py index e6b19305cc55..d36068a65fcc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificates_operations.py index b39f05fcc97f..a777a5c1cac8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -135,35 +138,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,31 +179,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -214,35 +218,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -277,7 +281,7 @@ def list( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -285,6 +289,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -295,6 +301,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -304,6 +311,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -321,7 +329,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -335,7 +347,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -345,7 +357,7 @@ def list_by_resource_group( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -355,6 +367,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -366,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -376,6 +391,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -393,7 +409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -407,7 +427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -418,7 +438,7 @@ def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -435,17 +455,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,7 +487,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -473,7 +500,7 @@ def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -492,6 +519,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -500,6 +528,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -507,7 +536,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -522,11 +555,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -534,7 +567,7 @@ def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -551,17 +584,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -572,7 +612,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -585,7 +625,7 @@ def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -604,6 +644,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -612,6 +653,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -619,7 +661,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -634,5 +680,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_deleted_web_apps_operations.py index b5014a8f8790..e52e94eab594 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_get_deleted_web_app_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -153,7 +156,7 @@ def list( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -162,6 +165,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -172,6 +177,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -181,6 +187,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -198,7 +205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -222,7 +233,7 @@ def list_by_location( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -233,6 +244,8 @@ def list_by_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -244,6 +257,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -254,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -271,7 +286,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -285,7 +304,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace def get_deleted_web_app_by_location( @@ -296,7 +315,7 @@ def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -313,17 +332,24 @@ def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,5 +364,5 @@ def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_diagnostics_operations.py index f92b40f70f8d..615d350bb401 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -967,7 +989,7 @@ def list_hosting_environment_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1049,7 +1079,7 @@ def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -1057,11 +1087,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1074,12 +1104,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1088,7 +1121,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1103,7 +1140,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1115,7 +1152,7 @@ def list_site_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1128,6 +1165,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1140,6 +1179,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1151,6 +1191,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1168,7 +1209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1182,7 +1227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1197,7 +1242,7 @@ def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1205,11 +1250,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1222,12 +1267,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1236,7 +1284,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1303,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1263,7 +1315,7 @@ def list_site_diagnostic_categories( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1276,6 +1328,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1288,6 +1342,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1299,6 +1354,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1316,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1330,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1342,7 +1402,7 @@ def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1361,18 +1421,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1454,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1400,7 +1467,7 @@ def list_site_analyses( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1415,6 +1482,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1428,6 +1497,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1440,6 +1510,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1457,7 +1528,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,7 +1546,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1484,7 +1559,7 @@ def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1505,6 +1580,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1512,12 +1589,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1614,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1549,7 +1631,7 @@ def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1559,11 +1641,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1576,6 +1658,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1583,6 +1667,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1591,7 +1676,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1695,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1619,7 +1708,7 @@ def list_site_detectors( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1634,6 +1723,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1647,6 +1738,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1751,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1769,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1787,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1703,7 +1800,7 @@ def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1724,6 +1821,8 @@ def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -1731,12 +1830,17 @@ def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1751,7 +1855,7 @@ def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1768,7 +1872,7 @@ def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1778,11 +1882,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1795,6 +1899,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1802,6 +1908,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1810,7 +1917,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1825,7 +1936,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1838,7 +1949,7 @@ def list_site_detector_responses_slot( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1853,6 +1964,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1866,6 +1979,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1878,6 +1992,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1895,7 +2010,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1909,7 +2028,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1925,7 +2044,7 @@ def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1935,11 +2054,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1952,6 +2071,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1959,6 +2080,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1967,7 +2089,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1982,7 +2108,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1995,7 +2121,7 @@ def list_site_diagnostic_categories_slot( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -2010,6 +2136,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2023,6 +2151,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2164,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2182,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2200,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2079,7 +2213,7 @@ def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -2100,6 +2234,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2107,12 +2243,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2127,7 +2268,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2141,7 +2282,7 @@ def list_site_analyses_slot( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -2158,6 +2299,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2172,6 +2315,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2185,6 +2329,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2202,7 +2347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2216,7 +2365,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2230,7 +2379,7 @@ def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -2253,6 +2402,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2261,12 +2412,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2281,7 +2437,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2299,7 +2455,7 @@ def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2311,11 +2467,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2328,6 +2484,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2336,6 +2494,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2344,7 +2503,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2359,7 +2522,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2373,7 +2536,7 @@ def list_site_detectors_slot( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2390,6 +2553,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2404,6 +2569,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2417,6 +2583,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2434,7 +2601,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2448,7 +2619,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2462,7 +2633,7 @@ def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2485,6 +2656,8 @@ def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2493,12 +2666,17 @@ def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2513,7 +2691,7 @@ def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2531,7 +2709,7 @@ def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2543,11 +2721,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2560,6 +2738,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2568,6 +2748,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2576,7 +2757,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2591,5 +2776,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domain_registration_provider_operations.py index 1c30415163ec..721457bdd7f1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domains_operations.py index bb446b8c487f..0af12ab36647 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,33 +295,34 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,35 +336,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -372,31 +377,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -408,10 +414,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -419,21 +426,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -448,12 +455,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -461,23 +468,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -491,10 +498,11 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -502,21 +510,21 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -531,12 +539,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -544,23 +552,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -573,31 +581,32 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,7 +640,7 @@ def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier @@ -646,12 +655,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -659,7 +670,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +689,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -684,13 +699,15 @@ def list( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -701,6 +718,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -710,6 +728,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -727,7 +746,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -741,7 +764,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -750,7 +773,7 @@ def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -763,15 +786,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -786,7 +816,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -797,7 +827,7 @@ def list_recommendations( ) -> Iterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2020_06_01.models.DomainRecommendationSearchParameters @@ -808,6 +838,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -821,6 +852,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -833,6 +865,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -852,7 +885,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -866,7 +903,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -876,7 +913,7 @@ def list_by_resource_group( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -885,6 +922,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -896,6 +935,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -906,6 +946,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -923,7 +964,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,7 +982,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -948,7 +993,7 @@ def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -965,17 +1010,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -990,7 +1042,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -1006,6 +1058,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -1014,6 +1067,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1021,7 +1075,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1039,7 +1097,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1052,7 +1110,7 @@ def begin_create_or_update( ) -> LROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -1072,8 +1130,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1085,6 +1144,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1109,13 +1169,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1124,7 +1183,7 @@ def delete( ) -> None: """Delete a domain. - Description for 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 @@ -1144,18 +1203,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1166,7 +1232,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1179,7 +1245,7 @@ def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -1198,6 +1264,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1206,6 +1273,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1213,7 +1281,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1304,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1244,7 +1316,7 @@ def list_ownership_identifiers( ) -> Iterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -1257,6 +1329,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1269,6 +1343,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1280,6 +1355,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1297,7 +1373,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1311,7 +1391,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1323,7 +1403,7 @@ def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -1342,18 +1422,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,7 +1455,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1383,8 +1470,8 @@ def create_or_update_ownership_identifier( """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. + 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 @@ -1405,6 +1492,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1414,6 +1502,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1421,7 +1510,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1436,11 +1529,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1449,7 +1542,7 @@ def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -1468,18 +1561,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1490,7 +1590,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1505,8 +1605,8 @@ def update_ownership_identifier( """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. + 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 @@ -1527,6 +1627,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1536,6 +1637,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1543,7 +1645,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1558,11 +1664,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1570,7 +1676,7 @@ def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1587,17 +1693,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1608,5 +1721,5 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py index d4fcba760034..2aad0518bbe7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum4"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,24 +59,25 @@ def build_get_available_stacks_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -86,31 +88,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum5"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -144,9 +147,9 @@ def get_available_stacks( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_06_01.models.Enum4 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -155,6 +158,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +169,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -173,6 +179,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -191,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -205,7 +216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -215,8 +226,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -224,6 +235,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -233,6 +246,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -241,6 +255,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -258,7 +273,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -272,7 +291,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -282,9 +301,9 @@ def get_available_stacks_on_prem( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_06_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -293,6 +312,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -303,6 +324,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -313,6 +335,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -331,7 +354,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -345,4 +372,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_recommendations_operations.py index d358e10ad007..d891c6b3289c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,29 +69,30 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -100,30 +102,31 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,36 @@ def build_list_history_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +183,36 @@ def build_list_recommended_rules_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,32 +225,33 @@ def build_disable_all_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,32 +264,33 @@ def build_reset_all_filters_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +305,11 @@ def build_get_rule_details_by_hosting_environment_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), @@ -309,25 +317,25 @@ def build_get_rule_details_by_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -341,10 +349,11 @@ def build_disable_recommendation_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -352,22 +361,22 @@ def build_disable_recommendation_for_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -381,35 +390,36 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -423,35 +433,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -462,31 +473,32 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -497,31 +509,32 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,10 +549,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -547,25 +561,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -577,10 +591,11 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -588,21 +603,21 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -637,14 +652,14 @@ def list( ) -> Iterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -653,6 +668,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -663,6 +680,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -674,6 +692,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -693,7 +712,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -707,16 +730,16 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -729,15 +752,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -748,19 +778,18 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -775,16 +804,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -795,7 +831,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -809,7 +845,7 @@ def list_history_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -820,7 +856,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -829,6 +865,8 @@ def list_history_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -841,6 +879,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -854,6 +893,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -873,7 +913,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -887,7 +931,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -900,7 +944,7 @@ def list_recommended_rules_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -910,7 +954,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -919,6 +963,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -931,6 +977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -944,6 +991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -963,7 +1011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,10 +1029,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_hosting_environment( + def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -989,7 +1041,7 @@ def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1008,18 +1060,25 @@ def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1030,11 +1089,11 @@ def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_hosting_environment( + def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1043,7 +1102,7 @@ def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1062,18 +1121,25 @@ def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1084,7 +1150,7 @@ def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1099,7 +1165,7 @@ def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1108,10 +1174,10 @@ def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1124,12 +1190,15 @@ def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -1137,7 +1206,11 @@ def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1152,11 +1225,11 @@ def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_hosting_environment( + def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1166,7 +1239,7 @@ def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1187,19 +1260,26 @@ def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,7 +1290,7 @@ def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -1224,7 +1304,7 @@ def list_history_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -1235,7 +1315,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1244,6 +1324,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1256,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -1269,6 +1352,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -1288,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1302,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -1315,7 +1403,7 @@ def list_recommended_rules_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -1325,7 +1413,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1334,6 +1422,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1346,6 +1436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -1359,6 +1450,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -1378,7 +1470,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,10 +1488,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1403,7 +1499,7 @@ def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1420,17 +1516,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1441,11 +1544,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1453,7 +1556,7 @@ def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1470,17 +1573,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1491,7 +1601,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1506,7 +1616,7 @@ def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1515,10 +1625,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1531,12 +1641,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -1544,7 +1657,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1559,11 +1676,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1572,7 +1689,7 @@ def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1591,18 +1708,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,5 +1737,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_resource_health_metadata_operations.py index 36b69c0bca85..d298c92cda30 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -262,7 +268,7 @@ def list( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -331,8 +345,7 @@ def list_by_resource_group( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -343,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -354,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -364,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -381,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -406,8 +427,7 @@ def list_by_site( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -420,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -432,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -443,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -460,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -474,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -485,7 +513,7 @@ def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -502,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -527,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -540,8 +575,7 @@ def list_by_site_slot( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -556,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -581,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -598,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -624,7 +666,7 @@ def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -643,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_static_sites_operations.py index 2cfd600d50fb..243f3da1edda 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,34 +35,34 @@ def build_preview_workflow_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -105,30 +106,31 @@ def build_get_static_sites_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -298,10 +302,11 @@ def build_list_static_site_users_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -309,21 +314,21 @@ def build_list_static_site_users_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -336,10 +341,11 @@ def build_delete_static_site_user_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -348,21 +354,21 @@ def build_delete_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -378,12 +384,12 @@ def build_update_static_site_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -392,23 +398,23 @@ def build_update_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -421,31 +427,32 @@ def build_get_static_site_builds_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -457,10 +464,11 @@ def build_get_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -468,21 +476,21 @@ def build_get_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -494,10 +502,11 @@ def build_delete_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -505,21 +514,21 @@ def build_delete_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -534,12 +543,12 @@ def build_create_or_update_static_site_build_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -547,23 +556,23 @@ def build_create_or_update_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -577,10 +586,11 @@ def build_list_static_site_build_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -588,21 +598,21 @@ def build_list_static_site_build_functions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -614,10 +624,11 @@ def build_list_static_site_build_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -625,21 +636,21 @@ def build_list_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -653,35 +664,35 @@ def build_create_or_update_static_site_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -697,35 +708,35 @@ def build_create_user_roles_invitation_link_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -738,31 +749,32 @@ def build_list_static_site_custom_domains_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -774,10 +786,11 @@ def build_create_or_update_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -785,21 +798,21 @@ def build_create_or_update_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -811,10 +824,11 @@ def build_delete_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -822,21 +836,21 @@ def build_delete_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -848,10 +862,11 @@ def build_validate_custom_domain_can_be_added_to_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -859,21 +874,21 @@ def build_validate_custom_domain_can_be_added_to_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -884,31 +899,32 @@ def build_detach_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -919,31 +935,32 @@ def build_list_static_site_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -954,31 +971,32 @@ def build_list_static_site_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -989,31 +1007,32 @@ def build_list_static_site_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1027,41 +1046,41 @@ def build_reset_static_site_api_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs ) -class StaticSitesOperations(object): +class StaticSitesOperations(object): # pylint: disable=too-many-public-methods """StaticSitesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1092,7 +1111,7 @@ def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -1111,6 +1130,7 @@ def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -1118,6 +1138,7 @@ def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -1125,7 +1146,11 @@ def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1140,7 +1165,7 @@ def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -1150,7 +1175,7 @@ def list( ) -> Iterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -1158,6 +1183,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1168,6 +1195,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1177,6 +1205,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1194,7 +1223,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1208,7 +1241,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -1218,7 +1251,7 @@ def get_static_sites_by_resource_group( ) -> Iterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -1228,6 +1261,8 @@ def get_static_sites_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1239,6 +1274,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1249,6 +1285,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1266,7 +1303,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1280,7 +1321,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_site( @@ -1291,7 +1332,7 @@ def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -1308,17 +1349,24 @@ def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1333,7 +1381,7 @@ def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1346,8 +1394,7 @@ def create_or_update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -1366,6 +1413,7 @@ def create_or_update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -1374,6 +1422,7 @@ def create_or_update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site.metadata['url'], @@ -1381,7 +1430,11 @@ def create_or_update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1400,11 +1453,11 @@ def create_or_update_static_site( return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace - def delete_static_site( + def delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1412,7 +1465,7 @@ def delete_static_site( ) -> None: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1429,17 +1482,24 @@ def delete_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1450,7 +1510,7 @@ def delete_static_site( if cls: return cls(pipeline_response, None, {}) - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1463,8 +1523,7 @@ def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -1483,6 +1542,7 @@ def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -1491,6 +1551,7 @@ def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -1498,7 +1559,11 @@ def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1517,7 +1582,7 @@ def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1530,7 +1595,7 @@ def list_static_site_users( ) -> Iterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -1545,6 +1610,8 @@ def list_static_site_users( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1558,6 +1625,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -1570,6 +1638,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1587,7 +1656,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1601,10 +1674,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace - def delete_static_site_user( + def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1614,7 +1687,7 @@ def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -1635,6 +1708,8 @@ def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -1642,12 +1717,17 @@ def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1658,7 +1738,7 @@ def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -1673,7 +1753,7 @@ def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -1697,6 +1777,7 @@ def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -1707,6 +1788,7 @@ def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -1714,7 +1796,11 @@ def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1729,7 +1815,7 @@ def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -1741,7 +1827,7 @@ def get_static_site_builds( ) -> Iterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -1754,6 +1840,8 @@ def get_static_site_builds( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1766,6 +1854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -1777,6 +1866,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1794,7 +1884,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1808,7 +1902,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace def get_static_site_build( @@ -1820,7 +1914,7 @@ def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -1839,18 +1933,25 @@ def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1865,11 +1966,11 @@ def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace - def delete_static_site_build( + def delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1878,7 +1979,7 @@ def delete_static_site_build( ) -> None: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1897,18 +1998,25 @@ def delete_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1919,7 +2027,7 @@ def delete_static_site_build( if cls: return cls(pipeline_response, None, {}) - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace @@ -1933,7 +2041,7 @@ def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -1954,6 +2062,7 @@ def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1963,6 +2072,7 @@ def create_or_update_static_site_build_function_app_settings( name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -1970,7 +2080,11 @@ def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1989,7 +2103,7 @@ def create_or_update_static_site_build_function_app_settings( 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'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings"} # type: ignore @distributed_trace @@ -2002,7 +2116,7 @@ def list_static_site_build_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -2017,6 +2131,8 @@ def list_static_site_build_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2030,6 +2146,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -2042,6 +2159,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2059,7 +2177,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2073,7 +2195,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions"} # type: ignore @distributed_trace def list_static_site_build_function_app_settings( @@ -2085,7 +2207,7 @@ def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2104,18 +2226,25 @@ def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2134,7 +2263,7 @@ def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -2147,7 +2276,7 @@ def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -2166,6 +2295,7 @@ def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -2174,6 +2304,7 @@ def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -2181,7 +2312,11 @@ def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2200,7 +2335,7 @@ def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace @@ -2213,7 +2348,7 @@ def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -2233,6 +2368,7 @@ def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -2241,6 +2377,7 @@ def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -2248,7 +2385,11 @@ def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2263,7 +2404,7 @@ def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -2275,7 +2416,7 @@ def list_static_site_custom_domains( ) -> Iterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -2288,6 +2429,8 @@ def list_static_site_custom_domains( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2300,6 +2443,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -2311,6 +2455,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2328,7 +2473,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2342,7 +2491,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace def create_or_update_static_site_custom_domain( @@ -2354,8 +2503,7 @@ def create_or_update_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -2374,18 +2522,25 @@ def create_or_update_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_create_or_update_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.create_or_update_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2404,11 +2559,11 @@ def create_or_update_static_site_custom_domain( return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def delete_static_site_custom_domain( + def delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2417,7 +2572,7 @@ def delete_static_site_custom_domain( ) -> None: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2436,18 +2591,25 @@ def delete_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2458,11 +2620,11 @@ def delete_static_site_custom_domain( if cls: return cls(pipeline_response, None, {}) - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def validate_custom_domain_can_be_added_to_static_site( + def validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2471,7 +2633,7 @@ def validate_custom_domain_can_be_added_to_static_site( ) -> None: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -2490,18 +2652,25 @@ def validate_custom_domain_can_be_added_to_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_validate_custom_domain_can_be_added_to_static_site_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.validate_custom_domain_can_be_added_to_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2512,11 +2681,11 @@ def validate_custom_domain_can_be_added_to_static_site( if cls: return cls(pipeline_response, None, {}) - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace - def detach_static_site( + def detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2524,7 +2693,7 @@ def detach_static_site( ) -> None: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2541,17 +2710,24 @@ def detach_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_detach_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2562,7 +2738,7 @@ def detach_static_site( if cls: return cls(pipeline_response, None, {}) - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace @@ -2574,7 +2750,7 @@ def list_static_site_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -2587,6 +2763,8 @@ def list_static_site_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2599,6 +2777,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -2610,6 +2789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2627,7 +2807,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2641,7 +2825,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace def list_static_site_function_app_settings( @@ -2652,7 +2836,7 @@ def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2669,17 +2853,24 @@ def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2698,7 +2889,7 @@ def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -2710,7 +2901,7 @@ def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -2727,17 +2918,24 @@ def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2752,11 +2950,11 @@ def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace - def reset_static_site_api_key( + def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2765,7 +2963,7 @@ def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -2785,6 +2983,7 @@ def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -2793,6 +2992,7 @@ def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -2800,7 +3000,11 @@ def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2811,5 +3015,5 @@ def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_top_level_domains_operations.py index 3ace7436a406..8ed7616020a6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -161,7 +163,7 @@ def list( ) -> Iterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -220,7 +230,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -230,7 +240,7 @@ def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -245,16 +255,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,7 +286,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -281,7 +298,7 @@ def list_agreements( ) -> Iterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -294,6 +311,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -308,6 +326,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -321,6 +340,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -340,7 +360,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,4 +378,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_apps_operations.py index dde02fc14203..65c7191ae350 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,35 +188,36 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,35 +231,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -270,33 +274,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -310,35 +315,35 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -354,35 +359,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -395,31 +400,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -431,10 +437,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -442,21 +449,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -468,10 +475,11 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -479,21 +487,21 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -508,12 +516,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -521,23 +529,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -554,12 +562,12 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -567,23 +575,23 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -596,31 +604,32 @@ def build_get_basic_publishing_credentials_policies_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,31 +640,32 @@ def build_get_ftp_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -669,35 +679,35 @@ def build_update_ftp_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -710,31 +720,32 @@ def build_get_scm_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -748,35 +759,35 @@ def build_update_scm_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -789,31 +800,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -827,35 +839,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -868,31 +880,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -906,35 +919,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -947,31 +960,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -985,35 +999,35 @@ def build_update_auth_settings_v2_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1026,31 +1040,32 @@ def build_get_auth_settings_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1064,35 +1079,35 @@ def build_update_azure_storage_accounts_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1105,31 +1120,32 @@ def build_list_azure_storage_accounts_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1143,35 +1159,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1184,31 +1200,32 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1219,31 +1236,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1257,35 +1275,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1298,31 +1316,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1333,31 +1352,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1371,35 +1391,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1415,35 +1435,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1456,31 +1476,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1491,31 +1512,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1529,35 +1551,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1570,31 +1592,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1605,31 +1628,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1643,35 +1667,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1684,31 +1708,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1722,35 +1747,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1766,35 +1791,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1807,31 +1832,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1843,10 +1869,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1854,21 +1881,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1880,10 +1907,11 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1891,21 +1919,21 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1916,31 +1944,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1951,31 +1980,32 @@ def build_get_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1986,31 +2016,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2022,10 +2053,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2033,21 +2065,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2059,10 +2091,11 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2070,21 +2103,21 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2096,10 +2129,11 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2107,21 +2141,21 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2133,10 +2167,11 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2144,21 +2179,21 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2169,31 +2204,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2205,10 +2241,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2216,21 +2253,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2245,12 +2282,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2258,23 +2295,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2288,10 +2325,11 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2299,21 +2337,21 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2325,10 +2363,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2336,21 +2375,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2364,35 +2403,35 @@ def build_discover_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2405,31 +2444,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2441,10 +2481,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2452,21 +2493,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2481,12 +2522,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2494,23 +2535,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2524,10 +2565,11 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2535,21 +2577,21 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2564,12 +2606,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2577,23 +2619,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2606,31 +2648,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2644,35 +2687,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2685,31 +2728,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2720,31 +2764,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2755,31 +2800,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2791,10 +2837,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2802,21 +2849,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2831,12 +2878,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2844,23 +2891,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2874,10 +2921,11 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2885,21 +2933,21 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2915,12 +2963,12 @@ def build_create_or_update_function_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2929,23 +2977,23 @@ def build_create_or_update_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2960,10 +3008,11 @@ def build_delete_function_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2972,21 +3021,21 @@ def build_delete_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2998,10 +3047,11 @@ def build_list_function_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3009,21 +3059,21 @@ def build_list_function_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3035,10 +3085,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3046,21 +3097,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3071,31 +3122,32 @@ def build_list_host_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3106,31 +3158,32 @@ def build_list_sync_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3141,31 +3194,32 @@ def build_sync_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3181,12 +3235,12 @@ def build_create_or_update_host_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3195,23 +3249,23 @@ def build_create_or_update_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3226,10 +3280,11 @@ def build_delete_host_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3238,21 +3293,21 @@ def build_delete_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3263,31 +3318,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3299,10 +3355,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3310,21 +3367,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3339,12 +3396,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3352,23 +3409,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3382,10 +3439,11 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3393,21 +3451,21 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3420,10 +3478,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3432,21 +3491,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3462,12 +3521,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3476,23 +3535,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3507,10 +3566,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3519,21 +3579,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3549,12 +3609,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3563,23 +3623,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3592,31 +3652,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3627,31 +3688,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3663,10 +3725,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3674,21 +3737,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3703,12 +3766,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3716,23 +3779,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3746,10 +3809,11 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3757,21 +3821,21 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3786,12 +3850,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3799,23 +3863,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3828,31 +3892,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3864,10 +3929,11 @@ def build_get_instance_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3875,21 +3941,21 @@ def build_get_instance_info_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3901,10 +3967,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3912,21 +3979,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3941,12 +4008,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3954,23 +4021,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3984,10 +4051,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3995,21 +4063,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4021,10 +4089,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4032,21 +4101,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4059,10 +4128,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4071,21 +4141,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4098,10 +4168,11 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4110,21 +4181,21 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4137,10 +4208,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4149,21 +4221,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4176,10 +4248,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4188,21 +4261,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4216,10 +4289,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4229,21 +4303,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4256,10 +4330,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4268,21 +4343,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4293,31 +4368,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4328,31 +4404,32 @@ def build_list_site_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4363,31 +4440,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4402,36 +4480,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4447,35 +4525,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4488,31 +4566,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4523,31 +4602,32 @@ def build_get_swift_virtual_network_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4561,35 +4641,35 @@ def build_create_or_update_swift_virtual_network_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4602,31 +4682,32 @@ def build_delete_swift_virtual_network_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4640,35 +4721,35 @@ def build_update_swift_virtual_network_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4682,10 +4763,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4693,21 +4775,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4719,10 +4801,11 @@ def build_get_network_trace_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4730,21 +4813,21 @@ def build_get_network_trace_operation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4759,37 +4842,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4804,37 +4888,38 @@ def build_start_web_site_network_trace_operation_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4845,31 +4930,32 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4881,10 +4967,11 @@ def build_get_network_traces_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4892,21 +4979,21 @@ def build_get_network_traces_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4918,10 +5005,11 @@ def build_get_network_trace_operation_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4929,21 +5017,21 @@ def build_get_network_trace_operation_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4955,10 +5043,11 @@ def build_get_network_traces_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4966,21 +5055,21 @@ def build_get_network_traces_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4991,31 +5080,32 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5028,33 +5118,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5065,31 +5156,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5100,31 +5192,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5136,10 +5229,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5147,21 +5241,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5176,12 +5270,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5189,23 +5283,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5219,10 +5313,11 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5230,21 +5325,21 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5259,12 +5354,12 @@ def build_update_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5272,23 +5367,23 @@ def build_update_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5301,31 +5396,32 @@ def build_get_private_access_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5339,35 +5435,35 @@ def build_put_private_access_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5380,31 +5476,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5416,10 +5513,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5427,21 +5525,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5453,10 +5551,11 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5464,21 +5563,21 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5490,10 +5589,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5501,21 +5601,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5527,10 +5627,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5538,21 +5639,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5565,10 +5666,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5577,21 +5679,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5603,10 +5705,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5614,21 +5717,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5639,31 +5742,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5675,10 +5779,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5686,21 +5791,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5715,12 +5820,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5728,23 +5833,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5758,10 +5863,11 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5769,21 +5875,21 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5797,35 +5903,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5838,31 +5944,32 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5876,35 +5983,36 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5918,35 +6026,35 @@ def build_restore_from_backup_blob_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5962,35 +6070,35 @@ def build_restore_from_deleted_app_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6006,35 +6114,35 @@ def build_restore_snapshot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6047,31 +6155,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6083,10 +6192,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6094,21 +6204,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6120,10 +6230,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6131,21 +6242,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6157,10 +6268,11 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6168,21 +6280,21 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6196,35 +6308,35 @@ def build_copy_production_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6237,31 +6349,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6273,10 +6386,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6284,21 +6398,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6313,12 +6427,12 @@ def build_create_or_update_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6326,23 +6440,23 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6359,10 +6473,11 @@ def build_delete_slot_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6370,25 +6485,25 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6403,12 +6518,12 @@ def build_update_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6416,23 +6531,23 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6448,10 +6563,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6459,23 +6575,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6490,12 +6606,12 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6503,23 +6619,23 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6536,12 +6652,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6549,23 +6665,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6579,10 +6695,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6590,21 +6707,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6617,10 +6734,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6629,21 +6747,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6656,10 +6774,11 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6668,21 +6787,21 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6698,12 +6817,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6712,23 +6831,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6746,12 +6865,12 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6760,23 +6879,23 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6790,10 +6909,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6801,21 +6921,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6830,12 +6950,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6843,23 +6963,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6873,10 +6993,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6884,21 +7005,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6913,12 +7034,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6926,23 +7047,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6956,10 +7077,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6967,21 +7089,21 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6996,12 +7118,12 @@ def build_update_auth_settings_v2_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7009,23 +7131,23 @@ def build_update_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7039,10 +7161,11 @@ def build_get_auth_settings_v2_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7050,21 +7173,21 @@ def build_get_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7079,12 +7202,12 @@ def build_update_azure_storage_accounts_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7092,23 +7215,23 @@ def build_update_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7122,10 +7245,11 @@ def build_list_azure_storage_accounts_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7133,21 +7257,21 @@ def build_list_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7162,12 +7286,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7175,23 +7299,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7205,10 +7329,11 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7216,21 +7341,21 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7242,10 +7367,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7253,21 +7379,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7282,12 +7408,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7295,23 +7421,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7325,10 +7451,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7336,21 +7463,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7362,10 +7489,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7373,21 +7501,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7402,12 +7530,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7415,23 +7543,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7448,12 +7576,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7461,23 +7589,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7491,10 +7619,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7502,21 +7631,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7528,10 +7657,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7539,21 +7669,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7568,12 +7698,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7581,23 +7711,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7611,10 +7741,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7622,21 +7753,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7648,10 +7779,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7659,21 +7791,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7688,12 +7820,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7701,23 +7833,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7734,12 +7866,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7747,23 +7879,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7777,10 +7909,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7788,21 +7921,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7815,10 +7948,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7827,21 +7961,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7854,10 +7988,11 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7866,21 +8001,21 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7892,10 +8027,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7903,21 +8039,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7929,10 +8065,11 @@ def build_get_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7940,21 +8077,21 @@ def build_get_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7966,10 +8103,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7977,21 +8115,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8004,10 +8142,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8016,21 +8155,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8043,10 +8182,11 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8055,21 +8195,21 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8082,10 +8222,11 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8094,21 +8235,21 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8121,10 +8262,11 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8133,21 +8275,21 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8159,10 +8301,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8170,21 +8313,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8197,10 +8340,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8209,21 +8353,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8239,12 +8383,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8253,23 +8397,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8284,10 +8428,11 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8296,21 +8441,21 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8323,10 +8468,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8335,21 +8481,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8364,12 +8510,12 @@ def build_discover_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8377,23 +8523,23 @@ def build_discover_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8407,10 +8553,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8418,21 +8565,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8445,10 +8592,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8457,21 +8605,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8487,12 +8635,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8501,23 +8649,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8532,10 +8680,11 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8544,21 +8693,21 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8574,12 +8723,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8588,23 +8737,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8618,10 +8767,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8629,21 +8779,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8658,12 +8808,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8671,23 +8821,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8701,10 +8851,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8712,21 +8863,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8738,10 +8889,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8749,21 +8901,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8775,10 +8927,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8786,21 +8939,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8813,10 +8966,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8825,21 +8979,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8855,12 +9009,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8869,23 +9023,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8900,10 +9054,11 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8912,21 +9067,21 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8943,12 +9098,12 @@ def build_create_or_update_function_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8958,23 +9113,23 @@ def build_create_or_update_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8990,10 +9145,11 @@ def build_delete_function_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9003,21 +9159,21 @@ def build_delete_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9030,10 +9186,11 @@ def build_list_function_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9042,21 +9199,21 @@ def build_list_function_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9069,10 +9226,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9081,21 +9239,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9107,10 +9265,11 @@ def build_list_host_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9118,21 +9277,21 @@ def build_list_host_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9144,10 +9303,11 @@ def build_list_sync_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9155,21 +9315,21 @@ def build_list_sync_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9181,10 +9341,11 @@ def build_sync_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9192,21 +9353,21 @@ def build_sync_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9223,12 +9384,12 @@ def build_create_or_update_host_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9238,23 +9399,23 @@ def build_create_or_update_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9270,10 +9431,11 @@ def build_delete_host_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9283,21 +9445,21 @@ def build_delete_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9309,10 +9471,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9320,21 +9483,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9347,10 +9510,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9359,21 +9523,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9389,12 +9553,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9403,23 +9567,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9434,10 +9598,11 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9446,21 +9611,21 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9474,10 +9639,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9487,21 +9653,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9518,12 +9684,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9533,23 +9699,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9565,10 +9731,11 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9578,21 +9745,21 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9609,12 +9776,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9624,23 +9791,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9654,10 +9821,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9665,21 +9833,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9691,10 +9859,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9702,21 +9871,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9729,10 +9898,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9741,21 +9911,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9771,12 +9941,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9785,23 +9955,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9816,10 +9986,11 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9828,21 +9999,21 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9858,12 +10029,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9872,23 +10043,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9902,10 +10073,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9913,21 +10085,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9940,10 +10112,11 @@ def build_get_instance_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9952,21 +10125,21 @@ def build_get_instance_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9979,10 +10152,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9991,21 +10165,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10021,12 +10195,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10035,23 +10209,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10066,10 +10240,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10078,21 +10253,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10105,10 +10280,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10117,21 +10293,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10145,10 +10321,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10158,21 +10335,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10186,10 +10363,11 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10199,21 +10377,21 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10227,10 +10405,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10240,21 +10419,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10268,10 +10447,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10281,21 +10461,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10310,10 +10490,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10324,21 +10505,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10352,10 +10533,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10365,21 +10547,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10391,10 +10573,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10402,21 +10585,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10428,10 +10611,11 @@ def build_list_site_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10439,21 +10623,21 @@ def build_list_site_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10465,10 +10649,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10476,21 +10661,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10502,10 +10687,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10513,21 +10699,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10539,10 +10725,11 @@ def build_get_swift_virtual_network_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10550,21 +10737,21 @@ def build_get_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10579,12 +10766,12 @@ def build_create_or_update_swift_virtual_network_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10592,23 +10779,23 @@ def build_create_or_update_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10622,10 +10809,11 @@ def build_delete_swift_virtual_network_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10633,21 +10821,21 @@ def build_delete_swift_virtual_network_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10662,12 +10850,12 @@ def build_update_swift_virtual_network_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10675,23 +10863,23 @@ def build_update_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10706,10 +10894,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10718,21 +10907,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10745,10 +10934,11 @@ def build_get_network_trace_operation_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10757,21 +10947,21 @@ def build_get_network_trace_operation_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10787,10 +10977,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10798,27 +10989,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10834,10 +11025,11 @@ def build_start_web_site_network_trace_operation_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10845,27 +11037,27 @@ def build_start_web_site_network_trace_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10877,10 +11069,11 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10888,21 +11081,21 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10915,10 +11108,11 @@ def build_get_network_traces_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10927,21 +11121,21 @@ def build_get_network_traces_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10954,10 +11148,11 @@ def build_get_network_trace_operation_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10966,21 +11161,21 @@ def build_get_network_trace_operation_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10993,10 +11188,11 @@ def build_get_network_traces_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11005,21 +11201,21 @@ def build_get_network_traces_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11031,10 +11227,11 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11042,21 +11239,21 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11070,10 +11267,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11081,23 +11279,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11109,10 +11307,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11120,21 +11319,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11146,10 +11345,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11157,21 +11357,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11184,10 +11384,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11196,21 +11397,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11226,12 +11427,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11240,23 +11441,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11271,10 +11472,11 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11283,21 +11485,21 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11313,12 +11515,12 @@ def build_update_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11327,23 +11529,23 @@ def build_update_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11357,10 +11559,11 @@ def build_get_private_access_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11368,21 +11571,21 @@ def build_get_private_access_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11397,12 +11600,12 @@ def build_put_private_access_vnet_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11410,23 +11613,23 @@ def build_put_private_access_vnet_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11440,10 +11643,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11451,21 +11655,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11480,12 +11684,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11493,23 +11697,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11523,10 +11727,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11534,21 +11739,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11559,31 +11764,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11595,10 +11801,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11606,21 +11813,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11633,10 +11840,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11645,21 +11853,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11672,10 +11880,11 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11684,21 +11893,21 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11711,10 +11920,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11723,21 +11933,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11750,10 +11960,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11762,21 +11973,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11790,10 +12001,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11803,21 +12015,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11830,10 +12042,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11842,21 +12055,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11868,10 +12081,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11879,21 +12093,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11906,10 +12120,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11918,21 +12133,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11948,12 +12163,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11962,23 +12177,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11993,10 +12208,11 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12005,21 +12221,21 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12034,12 +12250,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12047,23 +12263,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12077,10 +12293,11 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12088,21 +12305,21 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12117,10 +12334,11 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12128,25 +12346,25 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12161,12 +12379,12 @@ def build_restore_from_backup_blob_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12174,23 +12392,23 @@ def build_restore_from_backup_blob_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12207,12 +12425,12 @@ def build_restore_from_deleted_app_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12220,23 +12438,23 @@ def build_restore_from_deleted_app_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12253,12 +12471,12 @@ def build_restore_snapshot_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12266,23 +12484,23 @@ def build_restore_snapshot_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12296,10 +12514,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12307,21 +12526,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12334,10 +12553,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12346,21 +12566,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12373,10 +12593,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12385,21 +12606,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12412,10 +12633,11 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12424,21 +12646,21 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12453,12 +12675,12 @@ def build_copy_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12466,23 +12688,23 @@ def build_copy_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12499,12 +12721,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12512,23 +12734,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12545,12 +12767,12 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12558,23 +12780,23 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12588,10 +12810,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12599,21 +12822,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12625,10 +12848,11 @@ def build_list_snapshots_from_dr_secondary_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12636,21 +12860,21 @@ def build_list_snapshots_from_dr_secondary_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12662,10 +12886,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12673,21 +12898,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12702,12 +12927,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12715,23 +12940,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12745,10 +12970,11 @@ def build_delete_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12756,21 +12982,21 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12785,12 +13011,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12798,23 +13024,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12828,10 +13054,11 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12839,21 +13066,21 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12869,10 +13096,11 @@ def build_start_network_trace_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12880,27 +13108,27 @@ def build_start_network_trace_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12912,10 +13140,11 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12923,21 +13152,21 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12949,10 +13178,11 @@ def build_stop_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12960,21 +13190,21 @@ def build_stop_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12986,10 +13216,11 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12997,21 +13228,21 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13023,10 +13254,11 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13034,21 +13266,21 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13060,10 +13292,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13071,21 +13304,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13098,10 +13331,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13110,21 +13344,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13137,10 +13371,11 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13149,21 +13384,21 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13176,10 +13411,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13188,21 +13424,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13216,10 +13452,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13229,21 +13466,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13256,10 +13493,11 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13268,21 +13506,21 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13296,10 +13534,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13307,23 +13546,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13335,10 +13574,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13346,21 +13586,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13373,10 +13613,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13385,21 +13626,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13415,12 +13656,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13429,23 +13670,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13460,10 +13701,11 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13472,21 +13714,21 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13502,12 +13744,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13516,23 +13758,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13548,10 +13790,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13561,21 +13804,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13592,12 +13835,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13607,23 +13850,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13642,12 +13885,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13657,23 +13900,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13687,10 +13930,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13698,21 +13942,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13725,10 +13969,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13737,21 +13982,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13765,35 +14010,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13809,35 +14054,35 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13850,31 +14095,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13885,31 +14131,32 @@ def build_list_snapshots_from_dr_secondary_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13920,31 +14167,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13958,35 +14206,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13999,31 +14247,32 @@ def build_delete_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14037,35 +14286,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14078,31 +14327,32 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14117,37 +14367,38 @@ def build_start_network_trace_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14158,31 +14409,32 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14193,31 +14445,32 @@ def build_stop_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14228,31 +14481,32 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14263,31 +14517,32 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14298,31 +14553,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14334,10 +14590,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14345,21 +14602,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14371,10 +14628,11 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14382,21 +14640,21 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14408,10 +14666,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14419,21 +14678,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14446,10 +14705,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14458,21 +14718,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14484,10 +14744,11 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14495,21 +14756,21 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14522,33 +14783,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14559,31 +14821,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14595,10 +14858,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14606,21 +14870,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14635,12 +14899,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14648,23 +14912,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14678,10 +14942,11 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14689,21 +14954,21 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14718,12 +14983,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14731,23 +14996,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14762,10 +15027,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14774,21 +15040,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14804,12 +15070,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14818,23 +15084,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14852,12 +15118,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14866,23 +15132,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14895,31 +15161,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14931,10 +15198,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14942,25 +15210,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -14989,13 +15257,15 @@ def list( ) -> Iterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15006,6 +15276,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -15015,6 +15286,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15032,7 +15304,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15046,7 +15322,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -15057,7 +15333,7 @@ def list_by_resource_group( ) -> Iterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -15069,6 +15345,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15080,6 +15358,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -15091,6 +15370,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -15109,7 +15389,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15123,7 +15407,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -15134,7 +15418,7 @@ def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -15151,17 +15435,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15178,7 +15469,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -15194,6 +15485,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -15202,6 +15494,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -15209,7 +15502,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15227,7 +15524,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15241,8 +15538,8 @@ def begin_create_or_update( """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. + 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 @@ -15263,8 +15560,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -15276,6 +15574,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15300,13 +15599,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15316,16 +15614,16 @@ def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -15338,11 +15636,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -15350,7 +15651,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -15361,7 +15666,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15375,8 +15680,8 @@ def update( """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. + 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 @@ -15396,6 +15701,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -15404,6 +15710,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -15411,7 +15718,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15430,7 +15741,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15443,13 +15754,13 @@ def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -15462,18 +15773,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15488,11 +15806,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15501,7 +15819,7 @@ def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -15520,6 +15838,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -15528,6 +15847,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -15535,7 +15855,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15546,7 +15870,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -15559,7 +15883,7 @@ def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -15579,6 +15903,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -15587,6 +15912,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -15594,7 +15920,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15609,7 +15939,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -15621,7 +15951,7 @@ def list_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -15633,6 +15963,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15645,6 +15977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -15656,6 +15989,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15673,7 +16007,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15687,7 +16025,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def get_backup_status( @@ -15699,7 +16037,7 @@ def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -15718,18 +16056,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15744,11 +16089,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15757,7 +16102,7 @@ def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -15776,18 +16121,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15798,7 +16150,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -15814,9 +16166,9 @@ def list_backup_status_secrets( 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. + 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 @@ -15837,6 +16189,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -15846,6 +16199,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -15853,7 +16207,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15868,10 +16226,10 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - def _restore_initial( + def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15885,6 +16243,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -15894,6 +16253,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -15901,7 +16261,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15911,11 +16275,11 @@ def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore( + def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15925,7 +16289,7 @@ def begin_restore( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -15947,8 +16311,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -15961,6 +16326,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15982,10 +16348,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def get_basic_publishing_credentials_policies( @@ -15996,8 +16361,7 @@ def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -16014,17 +16378,24 @@ def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16039,7 +16410,7 @@ def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace @@ -16051,7 +16422,7 @@ def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -16068,17 +16439,24 @@ def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16093,7 +16471,7 @@ def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16106,7 +16484,7 @@ def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -16126,6 +16504,7 @@ def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16134,6 +16513,7 @@ def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -16141,7 +16521,11 @@ def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16156,7 +16540,7 @@ def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16168,7 +16552,7 @@ def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -16185,17 +16569,24 @@ def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16210,7 +16601,7 @@ def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16223,7 +16614,7 @@ def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -16243,6 +16634,7 @@ def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16251,6 +16643,7 @@ def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -16258,7 +16651,11 @@ def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16273,7 +16670,7 @@ def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16285,7 +16682,7 @@ def list_configurations( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -16298,6 +16695,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16310,6 +16709,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -16321,6 +16721,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16338,7 +16739,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16352,7 +16757,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -16364,7 +16769,7 @@ def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -16383,6 +16788,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -16391,6 +16797,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -16398,7 +16805,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16413,7 +16824,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -16425,7 +16836,7 @@ def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -16442,17 +16853,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16467,7 +16885,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -16480,7 +16898,7 @@ def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -16499,6 +16917,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -16507,6 +16926,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -16514,7 +16934,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16529,7 +16953,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -16541,7 +16965,7 @@ def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -16558,17 +16982,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16583,7 +17014,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -16596,8 +17027,7 @@ def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -16616,6 +17046,7 @@ def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -16624,6 +17055,7 @@ def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -16631,7 +17063,11 @@ def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16646,7 +17082,7 @@ def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -16658,7 +17094,7 @@ def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -16675,17 +17111,24 @@ def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16700,7 +17143,7 @@ def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -16713,7 +17156,7 @@ def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -16733,6 +17176,7 @@ def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -16741,6 +17185,7 @@ def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -16748,7 +17193,11 @@ def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16763,7 +17212,7 @@ def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -16775,7 +17224,7 @@ def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -16792,17 +17241,24 @@ def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16817,7 +17273,7 @@ def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -16830,7 +17286,7 @@ def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -16849,6 +17305,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16857,6 +17314,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -16864,7 +17322,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16879,11 +17341,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16891,7 +17353,7 @@ def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -16908,17 +17370,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16929,7 +17398,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -16941,7 +17410,7 @@ def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -16958,17 +17427,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16983,7 +17459,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -16996,7 +17472,7 @@ def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -17015,6 +17491,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -17023,6 +17500,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -17030,7 +17508,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17045,7 +17527,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -17057,7 +17539,7 @@ def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -17074,17 +17556,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17099,7 +17588,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -17111,7 +17600,7 @@ def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -17128,17 +17617,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17153,7 +17649,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -17166,7 +17662,7 @@ def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -17186,6 +17682,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -17194,6 +17691,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -17201,7 +17699,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17216,7 +17718,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -17229,7 +17731,7 @@ def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -17248,6 +17750,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -17256,6 +17759,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -17263,7 +17767,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17278,7 +17786,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -17290,7 +17798,7 @@ def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -17307,17 +17815,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17332,7 +17847,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -17347,17 +17862,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17371,7 +17893,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -17383,7 +17905,7 @@ def begin_list_publishing_credentials( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -17401,7 +17923,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -17412,6 +17935,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -17435,10 +17959,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -17450,7 +17973,7 @@ def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -17469,6 +17992,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -17477,6 +18001,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -17484,7 +18009,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17499,7 +18028,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -17511,7 +18040,7 @@ def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -17528,17 +18057,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17553,7 +18089,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -17565,8 +18101,7 @@ def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -17583,17 +18118,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17608,7 +18150,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -17622,8 +18164,8 @@ def update_slot_configuration_names( """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. + 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 @@ -17642,6 +18184,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -17650,6 +18193,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -17657,7 +18201,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17672,7 +18220,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -17685,8 +18233,8 @@ def get_configuration( """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. + 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 @@ -17703,17 +18251,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17728,7 +18283,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17741,7 +18296,7 @@ def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -17760,6 +18315,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -17768,6 +18324,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -17775,7 +18332,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17790,7 +18351,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17803,7 +18364,7 @@ def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -17822,6 +18383,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -17830,6 +18392,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -17837,7 +18400,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17852,7 +18419,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17865,8 +18432,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -17879,6 +18446,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17891,6 +18460,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -17902,6 +18472,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17919,7 +18490,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17933,7 +18508,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -17945,7 +18520,7 @@ def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -17964,18 +18539,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17990,11 +18572,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18003,7 +18585,7 @@ def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -18022,18 +18604,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18044,7 +18633,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -18056,7 +18645,7 @@ def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -18073,17 +18662,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18099,7 +18695,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -18111,7 +18707,7 @@ def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -18128,17 +18724,24 @@ def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18154,7 +18757,7 @@ def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -18166,7 +18769,7 @@ def list_continuous_web_jobs( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -18179,6 +18782,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18191,6 +18796,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -18202,6 +18808,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18219,7 +18826,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18233,7 +18844,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -18245,7 +18856,7 @@ def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -18264,18 +18875,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18292,11 +18910,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18305,7 +18923,7 @@ def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -18324,18 +18942,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18346,11 +18971,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18359,7 +18984,7 @@ def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -18378,18 +19003,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18400,11 +19032,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18413,7 +19045,7 @@ def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -18432,18 +19064,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18454,7 +19093,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -18466,7 +19105,7 @@ def list_deployments( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -18478,6 +19117,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18490,6 +19131,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -18501,6 +19143,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18518,7 +19161,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18532,7 +19179,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -18544,7 +19191,7 @@ def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -18563,18 +19210,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18589,7 +19243,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -18603,7 +19257,7 @@ def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -18624,6 +19278,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -18633,6 +19288,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -18640,7 +19296,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18655,11 +19315,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18668,7 +19328,7 @@ def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -18687,18 +19347,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18709,7 +19376,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -18722,7 +19389,7 @@ def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -18742,18 +19409,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18768,7 +19442,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -18782,8 +19456,8 @@ def discover_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. - 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. + 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 @@ -18803,6 +19477,7 @@ def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -18811,6 +19486,7 @@ def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -18818,7 +19494,11 @@ def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18833,7 +19513,7 @@ def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -18845,7 +19525,7 @@ def list_domain_ownership_identifiers( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -18857,6 +19537,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18869,6 +19551,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -18880,6 +19563,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18897,7 +19581,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18911,7 +19599,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -18923,7 +19611,7 @@ def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -18942,18 +19630,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18968,7 +19663,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -18982,8 +19677,7 @@ def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19004,6 +19698,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19013,6 +19708,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -19020,7 +19716,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19035,11 +19735,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19048,7 +19748,7 @@ def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -19067,18 +19767,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19089,7 +19796,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19103,8 +19810,7 @@ def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19125,6 +19831,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19134,6 +19841,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -19141,7 +19849,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19156,7 +19868,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19168,7 +19880,7 @@ def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -19185,17 +19897,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19210,7 +19929,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -19226,6 +19945,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -19234,6 +19954,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -19241,7 +19962,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -19257,7 +19982,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -19270,7 +19995,7 @@ def begin_create_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -19291,8 +20016,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -19304,6 +20030,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19328,10 +20055,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -19342,7 +20068,7 @@ def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -19359,17 +20085,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19386,7 +20119,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -19398,7 +20131,7 @@ def list_functions( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -19411,6 +20144,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19423,6 +20158,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -19434,6 +20170,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19451,7 +20188,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19465,7 +20206,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -19476,7 +20217,7 @@ def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -19493,17 +20234,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19518,7 +20266,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -19531,7 +20279,7 @@ def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -19550,18 +20298,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19578,7 +20333,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -19595,6 +20350,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -19604,6 +20360,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -19611,7 +20368,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -19625,7 +20386,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -19639,7 +20400,7 @@ def begin_create_function( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -19662,8 +20423,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -19676,6 +20438,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19700,13 +20463,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19715,7 +20477,7 @@ def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -19734,18 +20496,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19756,7 +20525,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -19771,7 +20540,7 @@ def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -19794,6 +20563,7 @@ def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -19804,6 +20574,7 @@ def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -19811,7 +20582,11 @@ def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -19830,11 +20605,11 @@ def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret( + def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19844,7 +20619,7 @@ def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -19865,6 +20640,8 @@ def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -19872,12 +20649,17 @@ def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19888,7 +20670,7 @@ def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -19901,7 +20683,7 @@ def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -19920,18 +20702,25 @@ def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19946,7 +20735,7 @@ def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -19959,7 +20748,7 @@ def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -19978,18 +20767,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20004,7 +20800,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -20016,7 +20812,7 @@ def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -20033,17 +20829,24 @@ def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20058,11 +20861,11 @@ def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status( + def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20070,7 +20873,7 @@ def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -20087,17 +20890,24 @@ def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20108,11 +20918,11 @@ def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions( + def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20120,7 +20930,7 @@ def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -20137,17 +20947,24 @@ def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20158,7 +20975,7 @@ def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace @@ -20173,7 +20990,7 @@ def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -20196,6 +21013,7 @@ def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -20206,6 +21024,7 @@ def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -20213,7 +21032,11 @@ def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -20232,11 +21055,11 @@ def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret( + def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20246,7 +21069,7 @@ def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -20267,6 +21090,8 @@ def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -20274,12 +21099,17 @@ def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20290,7 +21120,7 @@ def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -20302,7 +21132,7 @@ def list_host_name_bindings( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -20315,6 +21145,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20327,6 +21159,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -20338,6 +21171,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20355,7 +21189,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20369,7 +21207,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -20381,7 +21219,7 @@ def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -20400,18 +21238,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20426,7 +21271,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -20440,7 +21285,7 @@ def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -20462,6 +21307,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -20471,6 +21317,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -20478,7 +21325,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20493,11 +21344,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20506,7 +21357,7 @@ def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -20525,18 +21376,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20547,7 +21405,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -20561,7 +21419,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -20582,6 +21440,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -20589,12 +21449,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20609,7 +21474,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20624,7 +21489,7 @@ def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -20647,6 +21512,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -20657,6 +21523,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -20664,7 +21531,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20679,11 +21550,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20693,7 +21564,7 @@ def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -20714,6 +21585,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -20721,12 +21594,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20737,7 +21615,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20752,7 +21630,7 @@ def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -20775,6 +21653,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -20785,6 +21664,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -20792,7 +21672,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20807,7 +21691,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20819,7 +21703,7 @@ def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -20836,17 +21720,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20861,7 +21752,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -20873,8 +21764,7 @@ def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -20891,17 +21781,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20916,7 +21813,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -20929,7 +21826,7 @@ def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -20948,18 +21845,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20974,7 +21878,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -20988,8 +21892,7 @@ def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21010,6 +21913,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21019,6 +21923,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -21026,7 +21931,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21041,11 +21950,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21054,7 +21963,7 @@ def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -21073,18 +21982,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21095,7 +22011,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21109,8 +22025,7 @@ def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21131,6 +22046,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21140,6 +22056,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -21147,7 +22064,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21162,7 +22083,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21174,7 +22095,7 @@ def list_instance_identifiers( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -21187,6 +22108,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21199,6 +22122,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -21210,6 +22134,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21227,7 +22152,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21241,7 +22170,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_info( @@ -21253,7 +22182,7 @@ def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -21272,18 +22201,25 @@ def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21298,7 +22234,7 @@ def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -21311,7 +22247,7 @@ def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -21330,18 +22266,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21356,7 +22299,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -21373,6 +22316,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -21382,6 +22326,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -21389,7 +22334,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -21405,7 +22354,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -21419,7 +22368,7 @@ def begin_create_instance_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -21442,8 +22391,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -21456,6 +22406,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21480,10 +22431,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -21495,7 +22445,7 @@ def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -21514,18 +22464,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21542,7 +22499,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -21556,8 +22513,8 @@ def list_instance_processes( """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. + 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 @@ -21572,6 +22529,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21585,6 +22544,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -21597,6 +22557,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21614,7 +22575,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21628,7 +22593,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -21641,8 +22606,7 @@ def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21664,6 +22628,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -21671,12 +22637,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21693,11 +22664,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21708,8 +22679,8 @@ def delete_instance_process( """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. + 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 @@ -21731,6 +22702,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -21738,12 +22711,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21754,7 +22732,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -21768,8 +22746,7 @@ def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -21791,6 +22768,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -21798,12 +22777,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21820,7 +22804,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -21835,8 +22819,8 @@ def list_instance_process_modules( """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. + 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 @@ -21854,6 +22838,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21868,6 +22854,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -21881,6 +22868,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21898,7 +22886,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21912,7 +22904,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -21926,8 +22918,7 @@ def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21951,6 +22942,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -21959,12 +22952,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21981,7 +22979,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -21995,8 +22993,7 @@ def list_instance_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -22014,6 +23011,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22028,6 +23027,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -22041,6 +23041,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22058,7 +23059,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22072,7 +23077,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable( @@ -22083,7 +23088,7 @@ def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -22100,17 +23105,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22125,7 +23137,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -22137,7 +23149,7 @@ def list_site_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -22149,6 +23161,8 @@ def list_site_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22161,6 +23175,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -22172,6 +23187,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22189,7 +23205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22203,7 +23223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers( @@ -22214,7 +23234,7 @@ def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -22231,17 +23251,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22256,7 +23283,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore def _migrate_storage_initial( @@ -22273,6 +23300,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -22281,6 +23309,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -22289,7 +23318,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22303,7 +23336,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -22317,7 +23350,7 @@ def begin_migrate_storage( ) -> LROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -22341,8 +23374,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -22355,6 +23389,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22379,10 +23414,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -22397,6 +23431,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -22405,6 +23440,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -22412,7 +23448,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22426,7 +23466,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -22439,7 +23479,7 @@ def begin_migrate_my_sql( ) -> LROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -22459,8 +23499,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -22472,6 +23513,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22496,10 +23538,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -22511,8 +23552,8 @@ def get_migrate_my_sql_status( """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. + 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 @@ -22529,17 +23570,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22554,7 +23602,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -22566,7 +23614,7 @@ def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -22583,17 +23631,24 @@ def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22608,7 +23663,7 @@ def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22624,9 +23679,9 @@ def create_or_update_swift_virtual_network_connection( 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 + 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. @@ -22646,6 +23701,7 @@ def create_or_update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -22654,6 +23710,7 @@ def create_or_update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection.metadata['url'], @@ -22661,7 +23718,11 @@ def create_or_update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22676,11 +23737,11 @@ def create_or_update_swift_virtual_network_connection( return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network( + def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22688,7 +23749,7 @@ def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -22705,17 +23766,24 @@ def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22726,7 +23794,7 @@ def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22742,9 +23810,9 @@ def update_swift_virtual_network_connection( 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 + 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. @@ -22764,6 +23832,7 @@ def update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -22772,6 +23841,7 @@ def update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection.metadata['url'], @@ -22779,7 +23849,11 @@ def update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22794,7 +23868,7 @@ def update_swift_virtual_network_connection( return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22807,7 +23881,7 @@ def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -22826,18 +23900,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22854,7 +23935,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -22867,8 +23948,7 @@ def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -22887,18 +23967,25 @@ def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22917,7 +24004,7 @@ def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -22932,17 +24019,17 @@ def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -22955,11 +24042,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -22968,7 +24058,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22983,7 +24077,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_initial( @@ -23001,11 +24095,14 @@ def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23014,7 +24111,11 @@ def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23032,7 +24133,7 @@ def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -23047,17 +24148,17 @@ def begin_start_web_site_network_trace_operation( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23072,7 +24173,8 @@ def begin_start_web_site_network_trace_operation( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -23086,6 +24188,7 @@ def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23109,13 +24212,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace( + def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23123,7 +24225,7 @@ def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -23140,17 +24242,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23161,7 +24270,7 @@ def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace @@ -23174,8 +24283,7 @@ def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23194,18 +24302,25 @@ def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23220,7 +24335,7 @@ def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -23233,8 +24348,7 @@ def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23253,18 +24367,25 @@ def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23283,7 +24404,7 @@ def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -23296,8 +24417,7 @@ def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23316,18 +24436,25 @@ def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23342,11 +24469,11 @@ def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23354,8 +24481,7 @@ def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -23372,17 +24498,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23393,7 +24526,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -23406,7 +24539,7 @@ def list_perf_mon_counters( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -23414,7 +24547,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -23423,6 +24556,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23435,6 +24570,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -23447,6 +24583,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -23465,7 +24602,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23479,7 +24620,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -23490,7 +24631,7 @@ def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -23507,17 +24648,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23532,7 +24680,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -23544,7 +24692,7 @@ def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -23561,17 +24709,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23586,7 +24741,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -23599,7 +24754,7 @@ def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -23618,18 +24773,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23644,7 +24806,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23658,7 +24820,7 @@ def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -23679,6 +24841,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -23688,6 +24851,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -23695,7 +24859,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23710,11 +24878,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23723,7 +24891,7 @@ def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -23742,18 +24910,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23764,7 +24939,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23778,7 +24953,7 @@ def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -23799,6 +24974,7 @@ def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -23808,6 +24984,7 @@ def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -23815,7 +24992,11 @@ def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23830,7 +25011,7 @@ def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23843,8 +25024,8 @@ def get_private_access( """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. + 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 @@ -23861,17 +25042,24 @@ def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23886,7 +25074,7 @@ def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -23900,8 +25088,8 @@ def put_private_access_vnet( """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. + 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 @@ -23920,6 +25108,7 @@ def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -23928,6 +25117,7 @@ def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -23935,7 +25125,11 @@ def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23950,7 +25144,7 @@ def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -23963,8 +25157,8 @@ def list_processes( """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. + 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 @@ -23976,6 +25170,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23988,6 +25184,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -23999,6 +25196,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24016,7 +25214,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24030,7 +25232,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -24042,8 +25244,7 @@ def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -24062,18 +25263,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24090,11 +25298,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24104,8 +25312,8 @@ def delete_process( """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. + 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 @@ -24124,18 +25332,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -24146,7 +25361,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -24159,8 +25374,7 @@ def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -24179,18 +25393,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24207,7 +25428,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -24221,8 +25442,8 @@ def list_process_modules( """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. + 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 @@ -24237,6 +25458,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24250,6 +25473,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -24262,6 +25486,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24279,7 +25504,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24293,7 +25522,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -24306,8 +25535,7 @@ def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -24328,6 +25556,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -24335,12 +25565,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24357,7 +25592,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -24370,8 +25605,7 @@ def list_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -24386,6 +25620,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24399,6 +25635,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -24411,6 +25648,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24428,7 +25666,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24442,7 +25684,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -24453,7 +25695,7 @@ def list_public_certificates( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -24466,6 +25708,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24478,6 +25722,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -24489,6 +25734,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24506,7 +25752,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24520,7 +25770,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -24532,7 +25782,7 @@ def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -24551,18 +25801,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24577,7 +25834,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -24591,7 +25848,7 @@ def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -24613,6 +25870,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -24622,6 +25880,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -24629,7 +25888,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24644,11 +25907,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24657,7 +25920,7 @@ def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -24676,18 +25939,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24698,7 +25968,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -24711,7 +25981,7 @@ def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -24732,6 +26002,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -24740,6 +26011,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -24747,7 +26019,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24762,11 +26038,11 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24775,8 +26051,8 @@ def reset_production_slot_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. + 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 @@ -24793,17 +26069,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24814,11 +26097,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24828,17 +26111,18 @@ def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -24851,11 +26135,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -24863,7 +26150,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24874,10 +26165,10 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - def _restore_from_backup_blob_initial( + def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24890,6 +26181,7 @@ def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -24898,6 +26190,7 @@ def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -24905,7 +26198,11 @@ def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24915,11 +26212,11 @@ def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob( + def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24928,7 +26225,7 @@ def begin_restore_from_backup_blob( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -24948,8 +26245,9 @@ def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24961,6 +26259,7 @@ def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24982,12 +26281,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_initial( + def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25000,6 +26298,7 @@ def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -25008,6 +26307,7 @@ def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -25015,7 +26315,11 @@ def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25025,11 +26329,11 @@ def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app( + def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25038,7 +26342,7 @@ def begin_restore_from_deleted_app( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -25058,8 +26362,9 @@ def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25071,6 +26376,7 @@ def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25092,12 +26398,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_initial( + def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25110,6 +26415,7 @@ def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -25118,6 +26424,7 @@ def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -25125,7 +26432,11 @@ def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25135,11 +26446,11 @@ def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot( + def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25148,7 +26459,7 @@ def begin_restore_snapshot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -25169,8 +26480,9 @@ def begin_restore_snapshot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25182,6 +26494,7 @@ def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25203,10 +26516,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -25217,7 +26529,7 @@ def list_site_extensions( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -25230,6 +26542,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25242,6 +26556,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -25253,6 +26568,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25270,7 +26586,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25284,7 +26604,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -25296,7 +26616,7 @@ def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -25315,18 +26635,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25343,7 +26670,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -25359,18 +26686,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -25389,7 +26723,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -25402,7 +26736,7 @@ def begin_install_site_extension( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -25423,7 +26757,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -25435,6 +26770,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25458,13 +26794,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25473,7 +26808,7 @@ def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -25492,18 +26827,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -25514,10 +26856,10 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore - def _copy_production_slot_initial( + def _copy_production_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25530,6 +26872,7 @@ def _copy_production_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -25538,6 +26881,7 @@ def _copy_production_slot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_production_slot_initial.metadata['url'], @@ -25545,7 +26889,11 @@ def _copy_production_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25555,11 +26903,11 @@ def _copy_production_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_production_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + _copy_production_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace - def begin_copy_production_slot( + def begin_copy_production_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25568,7 +26916,7 @@ def begin_copy_production_slot( ) -> LROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -25589,8 +26937,9 @@ def begin_copy_production_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25602,6 +26951,7 @@ def begin_copy_production_slot( resource_group_name=resource_group_name, name=name, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25623,10 +26973,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + begin_copy_production_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace def list_slots( @@ -25637,7 +26986,7 @@ def list_slots( ) -> Iterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -25648,6 +26997,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25660,6 +27011,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -25671,6 +27023,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25688,7 +27041,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25702,7 +27059,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -25714,7 +27071,7 @@ def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -25733,18 +27090,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25761,7 +27125,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -25778,6 +27142,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -25787,6 +27152,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -25794,7 +27160,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25812,7 +27182,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -25827,8 +27197,8 @@ def begin_create_or_update_slot( """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. + 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 @@ -25852,8 +27222,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -25866,6 +27237,7 @@ def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25890,13 +27262,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25907,7 +27278,7 @@ def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -25916,11 +27287,11 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -25933,12 +27304,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -25946,7 +27320,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -25957,7 +27335,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -25972,8 +27350,8 @@ def update_slot( """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. + 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 @@ -25996,6 +27374,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -26005,6 +27384,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -26012,7 +27392,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26031,7 +27415,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -26045,7 +27429,7 @@ def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -26053,7 +27437,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -26066,19 +27450,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26093,11 +27484,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26107,7 +27498,7 @@ def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -26129,6 +27520,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -26138,6 +27530,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -26145,7 +27538,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26156,7 +27553,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -26170,7 +27567,7 @@ def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -26193,6 +27590,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -26202,6 +27600,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -26209,7 +27608,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26224,7 +27627,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -26237,7 +27640,7 @@ def list_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -26252,6 +27655,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26265,6 +27670,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -26277,6 +27683,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26294,7 +27701,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26308,7 +27719,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def get_backup_status_slot( @@ -26321,7 +27732,7 @@ def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -26343,6 +27754,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -26350,12 +27763,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26370,11 +27788,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26384,7 +27802,7 @@ def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -26406,6 +27824,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -26413,12 +27833,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26429,7 +27854,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -26446,9 +27871,9 @@ def list_backup_status_secrets_slot( 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. + 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 @@ -26471,6 +27896,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -26481,6 +27907,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -26488,7 +27915,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26503,10 +27934,10 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - def _restore_slot_initial( + def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26521,6 +27952,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -26531,6 +27963,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -26538,7 +27971,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26548,11 +27985,11 @@ def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore_slot( + def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26563,7 +28000,7 @@ def begin_restore_slot( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -26588,8 +28025,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26603,6 +28041,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26624,10 +28063,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -26639,7 +28077,7 @@ def list_configurations_slot( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -26655,6 +28093,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26668,6 +28108,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -26680,6 +28121,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26697,7 +28139,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26711,7 +28157,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -26724,7 +28170,7 @@ def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -26746,6 +28192,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -26755,6 +28202,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -26762,7 +28210,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26777,7 +28229,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -26790,7 +28242,7 @@ def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -26810,18 +28262,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26836,7 +28295,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -26850,7 +28309,7 @@ def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -26871,6 +28330,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -26880,6 +28340,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -26887,7 +28348,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26902,7 +28367,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -26915,7 +28380,7 @@ def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -26935,18 +28400,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26961,7 +28433,7 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace @@ -26975,8 +28447,7 @@ def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -26997,6 +28468,7 @@ def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -27006,6 +28478,7 @@ def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -27013,7 +28486,11 @@ def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27028,7 +28505,7 @@ def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -27041,7 +28518,7 @@ def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -27061,18 +28538,25 @@ def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27087,7 +28571,7 @@ def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -27101,7 +28585,7 @@ def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -27124,6 +28608,7 @@ def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -27133,6 +28618,7 @@ def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -27140,7 +28626,11 @@ def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27155,7 +28645,7 @@ def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -27168,7 +28658,7 @@ def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -27188,18 +28678,25 @@ def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27214,7 +28711,7 @@ def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -27228,7 +28725,7 @@ def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -27250,6 +28747,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27259,6 +28757,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -27266,7 +28765,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27281,11 +28784,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27294,7 +28797,7 @@ def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -27314,18 +28817,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27336,7 +28846,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -27349,7 +28859,7 @@ def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -27369,18 +28879,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27395,7 +28912,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -27409,7 +28926,7 @@ def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -27431,6 +28948,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -27440,6 +28958,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -27447,7 +28966,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27462,7 +28985,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -27475,7 +28998,7 @@ def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -27495,18 +29018,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27521,7 +29051,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -27534,7 +29064,7 @@ def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -27554,18 +29084,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27580,7 +29117,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -27594,7 +29131,7 @@ def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -27617,6 +29154,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -27626,6 +29164,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -27633,7 +29172,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27648,7 +29191,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -27662,7 +29205,7 @@ def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -27684,6 +29227,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -27693,6 +29237,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -27700,7 +29245,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27715,7 +29264,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -27728,7 +29277,7 @@ def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -27748,18 +29297,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27774,7 +29330,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -27790,18 +29346,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27815,7 +29378,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -27828,7 +29391,7 @@ def begin_list_publishing_credentials_slot( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -27849,7 +29412,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -27861,6 +29425,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -27884,10 +29449,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -27900,7 +29464,7 @@ def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -27921,6 +29485,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -27930,6 +29495,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -27937,7 +29503,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27952,7 +29522,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -27965,7 +29535,7 @@ def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -27984,18 +29554,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28010,7 +29587,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -28024,8 +29601,8 @@ def get_configuration_slot( """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. + 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 @@ -28045,18 +29622,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28071,7 +29655,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -28085,7 +29669,7 @@ def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -28107,6 +29691,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -28116,6 +29701,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -28123,7 +29709,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28138,7 +29728,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -28152,7 +29742,7 @@ def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -28174,6 +29764,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -28183,6 +29774,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -28190,7 +29782,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28205,7 +29801,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -28219,8 +29815,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -28236,6 +29832,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28249,6 +29847,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -28261,6 +29860,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28278,7 +29878,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28292,7 +29896,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -28305,7 +29909,7 @@ def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -28327,6 +29931,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -28334,12 +29940,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28354,11 +29965,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28368,7 +29979,7 @@ def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -28390,6 +30001,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -28397,12 +30010,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -28413,7 +30031,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -28426,7 +30044,7 @@ def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -28445,18 +30063,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28472,7 +30097,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -28485,7 +30110,7 @@ def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -28504,18 +30129,25 @@ def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28531,7 +30163,7 @@ def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -28544,7 +30176,7 @@ def list_continuous_web_jobs_slot( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -28560,6 +30192,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28573,6 +30207,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -28585,6 +30220,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28602,7 +30238,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28616,7 +30256,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -28629,7 +30269,7 @@ def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -28651,6 +30291,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28658,12 +30300,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28680,11 +30327,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28694,7 +30341,7 @@ def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -28716,6 +30363,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28723,12 +30372,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28739,11 +30393,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28753,7 +30407,7 @@ def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -28775,6 +30429,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28782,12 +30438,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28798,11 +30459,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28812,7 +30473,7 @@ def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -28834,6 +30495,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28841,12 +30504,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28857,7 +30525,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -28870,7 +30538,7 @@ def list_deployments_slot( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -28885,6 +30553,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28898,6 +30568,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -28910,6 +30581,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28927,7 +30599,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28941,7 +30617,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -28954,7 +30630,7 @@ def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -28976,6 +30652,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -28983,12 +30661,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29003,7 +30686,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -29018,7 +30701,7 @@ def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -29042,6 +30725,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -29052,6 +30736,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -29059,7 +30744,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29074,11 +30763,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29088,7 +30777,7 @@ def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -29110,6 +30799,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -29117,12 +30808,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -29133,7 +30829,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -29147,7 +30843,7 @@ def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -29170,6 +30866,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -29177,12 +30875,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29197,7 +30900,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -29212,8 +30915,8 @@ def discover_backup_slot( """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. + 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 @@ -29236,6 +30939,7 @@ def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -29245,6 +30949,7 @@ def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -29252,7 +30957,11 @@ def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29267,7 +30976,7 @@ def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -29280,7 +30989,7 @@ def list_domain_ownership_identifiers_slot( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -29295,6 +31004,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29308,6 +31019,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -29320,6 +31032,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29337,7 +31050,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29351,7 +31068,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -29364,7 +31081,7 @@ def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -29386,6 +31103,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -29393,12 +31112,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29413,7 +31137,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29428,8 +31152,7 @@ def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -29453,6 +31176,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -29463,6 +31187,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -29470,7 +31195,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29485,11 +31214,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29499,7 +31228,7 @@ def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -29521,6 +31250,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -29528,12 +31259,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -29544,7 +31280,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29559,8 +31295,7 @@ def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -29584,6 +31319,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -29594,6 +31330,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -29601,7 +31338,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29616,7 +31357,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29629,7 +31370,7 @@ def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -29648,18 +31389,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29674,7 +31422,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -29691,6 +31439,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -29700,6 +31449,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -29707,7 +31457,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -29723,7 +31477,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -29737,7 +31491,7 @@ def begin_create_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -29760,8 +31514,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -29774,6 +31529,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -29798,10 +31554,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -29813,7 +31568,7 @@ def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -29832,18 +31587,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29860,7 +31622,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -29873,7 +31635,7 @@ def list_instance_functions_slot( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -29888,6 +31650,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29901,6 +31665,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -29913,6 +31678,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29930,7 +31696,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29944,7 +31714,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -29956,7 +31726,7 @@ def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -29975,18 +31745,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30001,7 +31778,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -30015,7 +31792,7 @@ def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -30036,6 +31813,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -30043,12 +31822,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30065,7 +31849,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -30083,6 +31867,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -30093,6 +31878,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -30100,7 +31886,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -30114,7 +31904,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -30129,7 +31919,7 @@ def begin_create_instance_function_slot( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -30154,8 +31944,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -30169,6 +31960,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -30193,13 +31985,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30209,7 +32000,7 @@ def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -30230,6 +32021,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -30237,12 +32030,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30253,7 +32051,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -30269,7 +32067,7 @@ def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -30294,6 +32092,7 @@ def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -30305,6 +32104,7 @@ def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -30312,7 +32112,11 @@ def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -30331,11 +32135,11 @@ def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret_slot( + def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30346,7 +32150,7 @@ def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -30369,6 +32173,8 @@ def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -30377,12 +32183,17 @@ def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30393,7 +32204,7 @@ def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -30407,7 +32218,7 @@ def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -30428,6 +32239,8 @@ def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -30435,12 +32248,17 @@ def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30455,7 +32273,7 @@ def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -30469,7 +32287,7 @@ def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -30490,6 +32308,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -30497,12 +32317,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30517,7 +32342,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -30530,7 +32355,7 @@ def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -30549,18 +32374,25 @@ def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30575,11 +32407,11 @@ def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status_slot( + def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30588,7 +32420,7 @@ def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -30607,18 +32439,25 @@ def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30629,11 +32468,11 @@ def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions_slot( + def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30642,7 +32481,7 @@ def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -30661,18 +32500,25 @@ def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30683,7 +32529,7 @@ def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace @@ -30699,7 +32545,7 @@ def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -30724,6 +32570,7 @@ def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -30735,6 +32582,7 @@ def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -30742,7 +32590,11 @@ def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -30761,11 +32613,11 @@ def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret_slot( + def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30776,7 +32628,7 @@ def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -30799,6 +32651,8 @@ def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -30807,12 +32661,17 @@ def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30823,7 +32682,7 @@ def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -30836,7 +32695,7 @@ def list_host_name_bindings_slot( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -30852,6 +32711,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30865,6 +32726,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -30877,6 +32739,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30894,7 +32757,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30908,7 +32775,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -30921,7 +32788,7 @@ def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -30943,6 +32810,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -30950,12 +32819,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30970,7 +32844,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -30985,7 +32859,7 @@ def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -31010,6 +32884,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -31020,6 +32895,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -31027,7 +32903,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31042,11 +32922,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31056,7 +32936,7 @@ def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -31078,6 +32958,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -31085,12 +32967,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -31101,7 +32988,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -31116,7 +33003,7 @@ def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -31139,6 +33026,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -31147,12 +33036,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31167,7 +33061,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -31183,7 +33077,7 @@ def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -31208,6 +33102,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -31219,6 +33114,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -31226,7 +33122,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31241,11 +33141,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31256,7 +33156,7 @@ def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -31279,6 +33179,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -31287,12 +33189,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31303,7 +33210,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -31319,7 +33226,7 @@ def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -31344,6 +33251,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -31355,6 +33263,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -31362,7 +33271,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31377,7 +33290,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -31390,7 +33303,7 @@ def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -31409,18 +33322,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31435,7 +33355,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -31448,8 +33368,7 @@ def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -31469,18 +33388,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31495,7 +33421,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -31509,7 +33435,7 @@ def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -31531,6 +33457,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -31538,12 +33466,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31558,7 +33491,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31573,8 +33506,7 @@ def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -31598,6 +33530,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -31608,6 +33541,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -31615,7 +33549,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31630,11 +33568,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31644,7 +33582,7 @@ def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -31666,6 +33604,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -31673,12 +33613,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31689,7 +33634,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31704,8 +33649,7 @@ def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -31729,6 +33673,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -31739,6 +33684,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -31746,7 +33692,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31761,7 +33711,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31774,7 +33724,7 @@ def list_instance_identifiers_slot( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -31790,6 +33740,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31803,6 +33755,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -31815,6 +33768,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31832,7 +33786,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31846,7 +33804,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_info_slot( @@ -31859,7 +33817,7 @@ def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -31881,6 +33839,8 @@ def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -31888,12 +33848,17 @@ def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31908,7 +33873,7 @@ def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -31922,7 +33887,7 @@ def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -31943,6 +33908,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -31950,12 +33917,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31970,7 +33942,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -31988,6 +33960,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -31998,6 +33971,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -32005,7 +33979,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -32021,7 +33999,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -32036,7 +34014,7 @@ def begin_create_instance_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -32061,8 +34039,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -32076,6 +34055,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -32100,10 +34080,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -32116,7 +34095,7 @@ def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -32137,6 +34116,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -32144,12 +34125,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32166,7 +34152,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -32181,8 +34167,8 @@ def list_instance_processes_slot( """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. + 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 @@ -32200,6 +34186,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32214,6 +34202,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -32227,6 +34216,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32244,7 +34234,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32258,7 +34252,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -32272,8 +34266,7 @@ def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -32298,6 +34291,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -32306,12 +34301,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32328,11 +34328,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32344,8 +34344,8 @@ def delete_instance_process_slot( """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. + 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 @@ -32370,6 +34370,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -32378,12 +34380,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -32394,7 +34401,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -32409,8 +34416,7 @@ def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -32435,6 +34441,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -32443,12 +34451,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32465,7 +34478,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -32481,8 +34494,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -32503,6 +34516,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32518,6 +34533,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -32532,6 +34548,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32549,7 +34566,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32563,7 +34584,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -32578,8 +34599,7 @@ def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -32606,6 +34626,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -32615,12 +34637,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32637,7 +34664,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -32652,8 +34679,7 @@ def list_instance_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -32674,6 +34700,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32689,6 +34717,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -32703,6 +34732,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32720,7 +34750,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32734,7 +34768,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable_slot( @@ -32746,7 +34780,7 @@ def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -32766,18 +34800,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32792,7 +34833,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -32805,7 +34846,7 @@ def list_site_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -32820,6 +34861,8 @@ def list_site_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32833,6 +34876,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -32845,6 +34889,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32862,7 +34907,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32876,7 +34925,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers_slot( @@ -32888,7 +34937,7 @@ def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -32907,18 +34956,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32933,7 +34989,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -32947,8 +35003,8 @@ def get_migrate_my_sql_status_slot( """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. + 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 @@ -32967,18 +35023,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32993,7 +35056,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -33006,7 +35069,7 @@ def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -33026,18 +35089,25 @@ def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33052,7 +35122,7 @@ def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -33069,9 +35139,9 @@ def create_or_update_swift_virtual_network_connection_slot( 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 + 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. @@ -33094,6 +35164,7 @@ def create_or_update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -33103,6 +35174,7 @@ def create_or_update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_slot.metadata['url'], @@ -33110,7 +35182,11 @@ def create_or_update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33125,11 +35201,11 @@ def create_or_update_swift_virtual_network_connection_slot( 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'} # type: ignore + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network_slot( + def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33138,7 +35214,7 @@ def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -33158,18 +35234,25 @@ def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33180,7 +35263,7 @@ def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -33197,9 +35280,9 @@ def update_swift_virtual_network_connection_slot( 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 + 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. @@ -33222,6 +35305,7 @@ def update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -33231,6 +35315,7 @@ def update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_slot.metadata['url'], @@ -33238,7 +35323,11 @@ def update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33253,7 +35342,7 @@ def update_swift_virtual_network_connection_slot( return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -33267,7 +35356,7 @@ def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -33289,6 +35378,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -33296,12 +35387,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33318,7 +35414,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -33332,8 +35428,7 @@ def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33355,6 +35450,8 @@ def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -33362,12 +35459,17 @@ def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33386,7 +35488,7 @@ def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -33402,7 +35504,7 @@ def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -33410,11 +35512,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -33427,12 +35529,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -33441,7 +35546,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33456,7 +35565,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_slot_initial( @@ -33475,12 +35584,15 @@ def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -33489,7 +35601,11 @@ def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33507,7 +35623,7 @@ def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -33523,7 +35639,7 @@ def begin_start_web_site_network_trace_operation_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -33531,11 +35647,11 @@ def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -33550,7 +35666,8 @@ def begin_start_web_site_network_trace_operation_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -33565,6 +35682,7 @@ def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -33588,13 +35706,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace_slot( + def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33603,7 +35720,7 @@ def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -33622,18 +35739,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -33644,7 +35768,7 @@ def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace @@ -33658,8 +35782,7 @@ def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33681,6 +35804,8 @@ def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -33688,12 +35813,17 @@ def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33708,7 +35838,7 @@ def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -33722,8 +35852,7 @@ def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33745,6 +35874,8 @@ def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -33752,12 +35883,17 @@ def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33776,7 +35912,7 @@ def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -33790,8 +35926,7 @@ def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33813,6 +35948,8 @@ def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -33820,12 +35957,17 @@ def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33840,11 +35982,11 @@ def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33853,8 +35995,7 @@ def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -33874,18 +36015,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -33896,7 +36044,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -33910,7 +36058,7 @@ def list_perf_mon_counters_slot( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -33920,7 +36068,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -33929,6 +36077,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33942,6 +36092,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -33955,6 +36106,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -33973,7 +36125,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33987,7 +36143,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -33999,7 +36155,7 @@ def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -34018,18 +36174,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34044,7 +36207,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -34057,7 +36220,7 @@ def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -34077,18 +36240,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34103,7 +36273,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -34117,7 +36287,7 @@ def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -34139,6 +36309,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -34146,12 +36318,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34166,7 +36343,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -34181,7 +36358,7 @@ def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -34205,6 +36382,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -34215,6 +36393,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -34222,7 +36401,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34237,11 +36420,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34251,7 +36434,7 @@ def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -34273,6 +36456,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -34280,12 +36465,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34296,7 +36486,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -34311,7 +36501,7 @@ def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -34335,6 +36525,7 @@ def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -34345,6 +36536,7 @@ def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -34352,7 +36544,11 @@ def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34367,7 +36563,7 @@ def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -34381,8 +36577,8 @@ def get_private_access_slot( """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. + 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 @@ -34401,18 +36597,25 @@ def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34427,7 +36630,7 @@ def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -34442,8 +36645,8 @@ def put_private_access_vnet_slot( """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. + 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 @@ -34464,6 +36667,7 @@ def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -34473,6 +36677,7 @@ def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -34480,7 +36685,11 @@ def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34495,7 +36704,7 @@ def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -34508,7 +36717,7 @@ def get_private_endpoint_connection( ) -> "_models.PrivateEndpointConnectionResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34527,18 +36736,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34553,7 +36769,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -34570,6 +36786,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -34579,6 +36796,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -34586,7 +36804,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -34604,7 +36826,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -34618,7 +36840,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.PrivateEndpointConnectionResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -34643,8 +36865,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.PrivateEndpointConnectionResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -34657,6 +36880,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -34681,10 +36905,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -34699,18 +36922,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -34731,7 +36961,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -34744,7 +36974,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34764,7 +36994,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -34776,6 +37007,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -34799,10 +37031,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -34813,7 +37044,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34830,17 +37061,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34855,7 +37093,7 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -34869,8 +37107,8 @@ def list_processes_slot( """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. + 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 @@ -34885,6 +37123,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34898,6 +37138,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -34910,6 +37151,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34927,7 +37169,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34941,7 +37187,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -34954,8 +37200,7 @@ def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34977,6 +37222,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -34984,12 +37231,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35006,11 +37258,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35021,8 +37273,8 @@ def delete_process_slot( """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. + 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 @@ -35044,6 +37296,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -35051,12 +37305,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -35067,7 +37326,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -35081,8 +37340,7 @@ def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -35104,6 +37362,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -35111,12 +37371,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35133,7 +37398,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -35148,8 +37413,8 @@ def list_process_modules_slot( """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. + 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 @@ -35167,6 +37432,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35181,6 +37448,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -35194,6 +37462,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35211,7 +37480,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35225,7 +37498,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -35239,8 +37512,7 @@ def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -35264,6 +37536,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -35272,12 +37546,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35294,7 +37573,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -35308,8 +37587,7 @@ def list_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -35327,6 +37605,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35341,6 +37621,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -35354,6 +37635,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35371,7 +37653,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35385,7 +37671,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -35397,7 +37683,7 @@ def list_public_certificates_slot( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -35413,6 +37699,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35426,6 +37714,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -35438,6 +37727,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35455,7 +37745,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35469,7 +37763,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -35482,7 +37776,7 @@ def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -35504,6 +37798,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -35511,12 +37807,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35531,7 +37832,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -35546,7 +37847,7 @@ def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -35571,6 +37872,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -35581,6 +37883,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -35588,7 +37891,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35603,11 +37910,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35617,7 +37924,7 @@ def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -35639,6 +37946,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -35646,12 +37955,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35662,7 +37976,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -35676,7 +37990,7 @@ def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -35700,6 +38014,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -35709,6 +38024,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -35716,7 +38032,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35731,11 +38051,11 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35745,8 +38065,8 @@ def reset_slot_configuration_slot( """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. + 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 @@ -35766,18 +38086,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35788,11 +38115,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35803,7 +38130,7 @@ def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -35813,10 +38140,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -35829,12 +38157,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -35842,7 +38173,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35853,10 +38188,10 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - def _restore_from_backup_blob_slot_initial( + def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35870,6 +38205,7 @@ def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -35879,6 +38215,7 @@ def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -35886,7 +38223,11 @@ def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35896,11 +38237,11 @@ def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob_slot( + def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35910,7 +38251,7 @@ def begin_restore_from_backup_blob_slot( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -35933,8 +38274,9 @@ def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -35947,6 +38289,7 @@ def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -35968,12 +38311,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_slot_initial( + def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35987,6 +38329,7 @@ def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -35996,6 +38339,7 @@ def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -36003,7 +38347,11 @@ def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36013,11 +38361,11 @@ def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app_slot( + def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36027,7 +38375,7 @@ def begin_restore_from_deleted_app_slot( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -36049,8 +38397,9 @@ def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36063,6 +38412,7 @@ def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36084,12 +38434,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_slot_initial( + def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36103,6 +38452,7 @@ def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -36112,6 +38462,7 @@ def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -36119,7 +38470,11 @@ def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36129,11 +38484,11 @@ def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot_slot( + def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36143,7 +38498,7 @@ def begin_restore_snapshot_slot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -36166,8 +38521,9 @@ def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36180,6 +38536,7 @@ def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36201,10 +38558,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -36216,7 +38572,7 @@ def list_site_extensions_slot( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -36232,6 +38588,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36245,6 +38603,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -36257,6 +38616,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36274,7 +38634,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36288,7 +38652,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -36301,7 +38665,7 @@ def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -36323,6 +38687,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -36330,12 +38696,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36352,7 +38723,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -36369,6 +38740,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -36376,12 +38749,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -36400,7 +38778,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -36414,7 +38792,7 @@ def begin_install_site_extension_slot( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -36438,7 +38816,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -36451,6 +38830,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -36474,13 +38854,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36490,7 +38869,7 @@ def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -36512,6 +38891,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -36519,12 +38900,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -36535,10 +38921,10 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore - def _copy_slot_initial( + def _copy_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36552,6 +38938,7 @@ def _copy_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -36561,6 +38948,7 @@ def _copy_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_slot_initial.metadata['url'], @@ -36568,7 +38956,11 @@ def _copy_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36578,11 +38970,11 @@ def _copy_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + _copy_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace - def begin_copy_slot( + def begin_copy_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36592,7 +38984,7 @@ def begin_copy_slot( ) -> LROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -36616,8 +39008,9 @@ def begin_copy_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36630,6 +39023,7 @@ def begin_copy_slot( name=name, slot=slot, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36651,10 +39045,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + begin_copy_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace def list_slot_differences_slot( @@ -36667,7 +39060,7 @@ def list_slot_differences_slot( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -36685,6 +39078,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -36701,6 +39095,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -36716,6 +39111,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -36735,7 +39131,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36749,9 +39149,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36765,6 +39165,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -36774,6 +39175,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -36781,7 +39183,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36791,11 +39197,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36805,7 +39211,7 @@ def begin_swap_slot( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -36828,8 +39234,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36842,6 +39249,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36863,10 +39271,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -36878,7 +39285,7 @@ def list_snapshots_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -36891,6 +39298,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36904,6 +39313,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -36916,6 +39326,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36933,7 +39344,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36947,7 +39362,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -36959,7 +39374,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -36972,6 +39387,8 @@ def list_snapshots_from_dr_secondary_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36985,6 +39402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -36997,6 +39415,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37014,7 +39433,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37028,7 +39451,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control_slot( @@ -37040,7 +39463,7 @@ def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -37060,18 +39483,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37093,7 +39523,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -37110,6 +39540,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -37119,6 +39550,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -37126,7 +39558,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37147,7 +39583,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -37161,7 +39597,7 @@ def begin_create_or_update_source_control_slot( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -37185,8 +39621,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -37199,6 +39636,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37223,13 +39661,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37238,7 +39675,7 @@ def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -37258,18 +39695,25 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -37280,7 +39724,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -37294,7 +39738,7 @@ def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -37316,6 +39760,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -37325,6 +39770,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -37332,7 +39778,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37354,11 +39804,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37367,7 +39817,7 @@ def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -37387,18 +39837,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37409,7 +39866,7 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore def _start_network_trace_slot_initial( @@ -37428,12 +39885,15 @@ def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -37442,7 +39902,11 @@ def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37460,7 +39924,7 @@ def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace @@ -37476,7 +39940,7 @@ def begin_start_network_trace_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -37484,11 +39948,11 @@ def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -37503,7 +39967,8 @@ def begin_start_network_trace_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -37518,6 +39983,7 @@ def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -37541,13 +40007,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37556,7 +40021,7 @@ def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -37576,18 +40041,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37598,11 +40070,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def stop_network_trace_slot( + def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37611,7 +40083,7 @@ def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -37630,18 +40102,25 @@ def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37652,11 +40131,11 @@ def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37665,7 +40144,7 @@ def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -37684,18 +40163,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37706,11 +40192,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37719,7 +40205,7 @@ def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -37738,18 +40224,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -37760,7 +40253,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -37773,7 +40266,7 @@ def list_triggered_web_jobs_slot( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -37789,6 +40282,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37802,6 +40297,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -37814,6 +40310,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37831,7 +40328,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37845,7 +40346,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -37858,7 +40359,7 @@ def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -37880,6 +40381,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -37887,12 +40390,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37909,11 +40417,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37923,7 +40431,7 @@ def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -37945,6 +40453,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -37952,12 +40462,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37968,7 +40483,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -37982,7 +40497,7 @@ def list_triggered_web_job_history_slot( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -38000,6 +40515,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38014,6 +40531,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -38027,6 +40545,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38044,7 +40563,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38058,7 +40581,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -38072,8 +40595,7 @@ def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -38097,6 +40619,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -38105,12 +40629,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38127,11 +40656,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38141,7 +40670,7 @@ def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -38163,6 +40692,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -38170,12 +40701,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38186,7 +40722,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -38200,7 +40736,7 @@ def list_usages_slot( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -38212,7 +40748,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -38221,6 +40757,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38234,6 +40772,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -38247,6 +40786,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -38265,7 +40805,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38279,7 +40823,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -38291,7 +40835,7 @@ def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -38311,18 +40855,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38337,7 +40888,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -38351,7 +40902,7 @@ def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -38373,6 +40924,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -38380,12 +40933,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38400,7 +40958,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38416,8 +40974,8 @@ def create_or_update_vnet_connection_slot( """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). + 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 @@ -38441,6 +40999,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -38451,6 +41010,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -38458,7 +41018,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38473,11 +41037,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38487,8 +41051,7 @@ def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -38510,6 +41073,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -38517,12 +41082,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38533,7 +41103,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38549,8 +41119,8 @@ def update_vnet_connection_slot( """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). + 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 @@ -38574,6 +41144,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -38584,6 +41155,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -38591,7 +41163,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38606,7 +41182,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38621,7 +41197,7 @@ def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -38645,6 +41221,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -38653,12 +41231,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38675,7 +41258,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38691,7 +41274,7 @@ def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -38717,6 +41300,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -38728,6 +41312,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -38735,7 +41320,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38750,7 +41339,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38766,7 +41355,7 @@ def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -38792,6 +41381,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -38803,6 +41393,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -38810,7 +41401,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38825,7 +41420,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38838,7 +41433,7 @@ def list_web_jobs_slot( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -38852,6 +41447,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38865,6 +41462,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -38877,6 +41475,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38894,7 +41493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38908,7 +41511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -38921,7 +41524,7 @@ def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -38943,6 +41546,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -38950,12 +41555,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38970,7 +41580,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -38983,7 +41593,7 @@ def list_slot_differences_from_production( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -38998,6 +41608,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -39013,6 +41624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -39027,6 +41639,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -39046,7 +41659,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39060,9 +41677,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39075,6 +41692,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -39083,6 +41701,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -39090,7 +41709,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39100,11 +41723,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39113,7 +41736,7 @@ def begin_swap_slot_with_production( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -39133,8 +41756,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -39146,6 +41770,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -39167,10 +41792,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -39181,7 +41805,7 @@ def list_snapshots( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -39192,6 +41816,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39204,6 +41830,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -39215,6 +41842,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39232,7 +41860,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39246,7 +41878,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -39257,7 +41889,7 @@ def list_snapshots_from_dr_secondary( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -39268,6 +41900,8 @@ def list_snapshots_from_dr_secondary( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39280,6 +41914,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -39291,6 +41926,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39308,7 +41944,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39322,7 +41962,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control( @@ -39333,7 +41973,7 @@ def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -39350,17 +41990,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39382,7 +42029,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -39398,6 +42045,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39406,6 +42054,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -39413,7 +42062,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39434,7 +42087,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39447,7 +42100,7 @@ def begin_create_or_update_source_control( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -39468,8 +42121,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_06_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -39481,6 +42135,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -39505,13 +42160,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39519,7 +42173,7 @@ def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -39536,17 +42190,24 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -39557,7 +42218,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39570,7 +42231,7 @@ def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -39589,6 +42250,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39597,6 +42259,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -39604,7 +42267,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39626,11 +42293,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39638,7 +42305,7 @@ def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -39655,17 +42322,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39676,7 +42350,7 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore def _start_network_trace_initial( @@ -39694,11 +42368,14 @@ def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -39707,7 +42384,11 @@ def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39725,7 +42406,7 @@ def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace @@ -39740,17 +42421,17 @@ def begin_start_network_trace( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -39765,7 +42446,8 @@ def begin_start_network_trace( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_06_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -39779,6 +42461,7 @@ def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -39802,13 +42485,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39816,7 +42498,7 @@ def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -39833,17 +42515,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39854,11 +42543,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def stop_network_trace( + def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39866,7 +42555,7 @@ def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -39883,17 +42572,24 @@ def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39904,11 +42600,11 @@ def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39916,7 +42612,7 @@ def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -39933,17 +42629,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39954,11 +42657,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39966,7 +42669,7 @@ def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -39983,17 +42686,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -40004,7 +42714,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -40016,7 +42726,7 @@ def list_triggered_web_jobs( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -40029,6 +42739,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40041,6 +42753,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -40052,6 +42765,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40069,7 +42783,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40083,7 +42801,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -40095,7 +42813,7 @@ def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -40114,18 +42832,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40142,11 +42867,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40155,7 +42880,7 @@ def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -40174,18 +42899,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -40196,7 +42928,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -40209,7 +42941,7 @@ def list_triggered_web_job_history( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -40224,6 +42956,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40237,6 +42971,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -40249,6 +42984,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40266,7 +43002,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40280,7 +43020,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -40293,8 +43033,7 @@ def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -40315,6 +43054,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -40322,12 +43063,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40344,11 +43090,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40357,7 +43103,7 @@ def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -40376,18 +43122,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40398,7 +43151,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -40411,7 +43164,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -40420,7 +43173,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -40429,6 +43182,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40441,6 +43196,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -40453,6 +43209,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -40471,7 +43228,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40485,7 +43246,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -40496,7 +43257,7 @@ def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -40513,17 +43274,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40538,7 +43306,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -40551,7 +43319,7 @@ def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -40570,18 +43338,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40596,7 +43371,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40611,8 +43386,8 @@ def create_or_update_vnet_connection( """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). + 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 @@ -40633,6 +43408,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40642,6 +43418,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -40649,7 +43426,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40664,11 +43445,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40677,8 +43458,7 @@ def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -40697,18 +43477,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40719,7 +43506,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40734,8 +43521,8 @@ def update_vnet_connection( """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). + 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 @@ -40756,6 +43543,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40765,6 +43553,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -40772,7 +43561,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40787,7 +43580,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40801,7 +43594,7 @@ def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -40822,6 +43615,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -40829,12 +43624,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40851,7 +43651,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40866,7 +43666,7 @@ def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40889,6 +43689,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40899,6 +43700,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -40906,7 +43708,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40921,7 +43727,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40936,7 +43742,7 @@ def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40959,6 +43765,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40969,6 +43776,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -40976,7 +43784,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40991,7 +43803,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -41003,7 +43815,7 @@ def list_web_jobs( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -41014,6 +43826,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41026,6 +43840,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -41037,6 +43852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41054,7 +43870,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41068,7 +43888,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -41080,7 +43900,7 @@ def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -41099,18 +43919,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41125,5 +43952,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_site_management_client_operations.py index 285bb63ce5cc..d813f6c8c510 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,34 @@ def build_list_billing_meters_request( os_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') if os_type is not None: - query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,33 +231,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,29 +268,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -300,37 +305,38 @@ def build_list_geo_regions_request( linux_dynamic_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: - query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + _query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') if linux_dynamic_workers_enabled is not None: - query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -342,33 +348,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -379,29 +385,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -410,29 +417,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-06-01" + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -444,33 +452,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,34 +493,34 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -527,34 +535,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -569,34 +577,34 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-06-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -611,7 +619,7 @@ def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -624,14 +632,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -646,7 +661,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -657,7 +672,7 @@ def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2020_06_01.models.User @@ -672,11 +687,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -684,7 +701,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -699,7 +720,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -709,7 +730,7 @@ def list_source_controls( ) -> Iterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -718,6 +739,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -727,6 +750,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -735,6 +759,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -752,7 +777,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -766,7 +795,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -776,7 +805,7 @@ def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -791,15 +820,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -814,7 +850,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -826,7 +862,7 @@ def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -843,12 +879,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -856,7 +894,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -871,7 +913,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -883,11 +925,11 @@ def list_billing_meters( ) -> Iterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -895,6 +937,8 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -905,6 +949,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -916,6 +961,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -935,7 +981,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -949,7 +999,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace def check_name_availability( @@ -961,13 +1011,13 @@ def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2020_06_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -980,6 +1030,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -987,6 +1038,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -994,7 +1046,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1009,7 +1065,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -1019,7 +1075,7 @@ def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -1032,15 +1088,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1055,7 +1118,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -1069,24 +1132,26 @@ def list_geo_regions( ) -> Iterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2020_06_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1097,6 +1162,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1110,6 +1176,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1131,7 +1198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1145,7 +1216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1155,7 +1226,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> Iterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2020_06_01.models.NameIdentifier @@ -1165,6 +1236,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1178,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1190,6 +1263,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1209,7 +1283,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1223,7 +1301,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1232,7 +1310,7 @@ def list_premier_add_on_offers( ) -> Iterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -1241,6 +1319,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_06_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1251,6 +1331,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1260,6 +1341,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1277,7 +1359,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1291,7 +1377,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1300,7 +1386,7 @@ def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -1313,15 +1399,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1336,7 +1429,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1348,8 +1441,8 @@ def verify_hosting_environment_vnet( """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. + 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 @@ -1364,12 +1457,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1377,7 +1472,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,11 +1491,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1404,7 +1503,7 @@ def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -1421,6 +1520,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1428,6 +1528,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1435,7 +1536,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1446,7 +1551,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1458,7 +1563,7 @@ def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -1475,6 +1580,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1482,6 +1588,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1489,7 +1596,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1504,11 +1615,11 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1516,7 +1627,7 @@ def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -1533,6 +1644,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-06-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1540,6 +1652,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1547,7 +1660,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1558,5 +1675,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_configuration.py index 65f9fc687f07..6cfd1118f37d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2020-09-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-09-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_metadata.json index c2b8ecb83348..5a2ecc1f4512 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -120,192 +120,192 @@ "get_publishing_user" : { "sync": { "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_publishing_user(\n self,\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "update_publishing_user" : { "sync": { "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_09_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_09_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_09_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_09_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "user_details" }, "list_source_controls" : { "sync": { "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.SourceControlCollection\"]\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_source_controls(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_source_control" : { "sync": { "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type" }, "update_source_control" : { "sync": { "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type, request_message" }, "list_billing_meters" : { "sync": { "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.BillingMeterCollection\"]\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "billing_location, os_type" }, "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, "get_subscription_deployment_locations" : { "sync": { "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.DeploymentLocations\"\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs: Any\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" }, "list_site_identifiers_assigned_to_host_name" : { "sync": { "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.IdentifierCollection\"]\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name_identifier" }, "list_premier_add_on_offers" : { "sync": { "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.PremierAddOnOfferCollection\"]\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_premier_add_on_offers(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_skus" : { "sync": { "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SkuInfos\"\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def list_skus(\n self,\n **kwargs: Any\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "verify_hosting_environment_vnet" : { "sync": { "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.VnetValidationFailureDetails\"\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs: Any\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_09_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "parameters" }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" }, "validate" : { "sync": { "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ValidateResponse\"\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs: Any\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_09_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_09_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, validate_request" }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_09_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" } diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_web_site_management_client.py index e50fd75728f1..0b06e277275b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -64,8 +65,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2020-09-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -103,7 +107,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_configuration.py index 7dd198392c41..d3852dfb1ba7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2020-09-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-09-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py index 62eb200b8b28..ff7b3ce356e2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -64,8 +65,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2020-09-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_certificate_orders_operations.py index d5e3cac677b4..63ca1806adf1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,17 +121,17 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -140,12 +147,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -153,7 +162,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -164,7 +177,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -175,7 +188,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -186,6 +199,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -197,6 +212,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -207,6 +223,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -224,7 +241,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +259,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -249,7 +270,7 @@ async def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -266,17 +287,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -291,7 +319,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -307,6 +335,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -315,6 +344,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -322,7 +352,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -340,7 +374,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -353,7 +387,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -376,8 +410,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -389,6 +424,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -413,13 +449,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -427,7 +462,7 @@ async def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -444,17 +479,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -465,7 +507,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -478,7 +520,7 @@ async def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -498,6 +540,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -506,6 +549,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -513,7 +557,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -532,7 +580,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -544,7 +592,7 @@ def list_certificates( ) -> AsyncIterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -557,6 +605,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +619,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -580,6 +631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -597,7 +649,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -611,7 +667,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -623,7 +679,7 @@ async def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -642,18 +698,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -668,7 +731,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -685,6 +748,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -694,6 +758,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -701,7 +766,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -719,7 +788,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -733,7 +802,7 @@ async def begin_create_or_update_certificate( ) -> AsyncLROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -757,8 +826,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -771,6 +841,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -795,13 +866,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -810,7 +880,7 @@ async def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -829,18 +899,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -851,7 +928,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -865,7 +942,7 @@ async def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -887,6 +964,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -896,6 +974,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -903,7 +982,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -922,11 +1005,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -935,7 +1018,7 @@ async def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -955,6 +1038,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -963,6 +1047,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -970,7 +1055,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -981,11 +1070,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -994,7 +1083,7 @@ async def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1014,6 +1103,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1022,6 +1112,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1029,7 +1120,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1040,11 +1135,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1052,7 +1147,7 @@ async def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1069,17 +1164,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1090,11 +1192,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1103,7 +1205,7 @@ async def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1122,6 +1224,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1130,6 +1233,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1137,7 +1241,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1148,7 +1256,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1161,7 +1269,7 @@ async def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1180,6 +1288,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1188,6 +1297,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1195,7 +1305,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,11 +1324,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1222,7 +1336,7 @@ async def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1239,17 +1353,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1260,7 +1381,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1272,7 +1393,7 @@ async def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -1289,17 +1410,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1442,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1326,7 +1454,7 @@ async def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -1343,17 +1471,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,5 +1503,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_environments_operations.py index fedaff66bc38..2a9a1346a989 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -292,7 +320,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -305,7 +333,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -328,8 +356,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -341,6 +370,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -365,12 +395,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,18 +412,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -404,11 +440,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -417,7 +453,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -438,7 +474,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -450,6 +487,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -470,10 +508,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -485,7 +522,7 @@ async def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -505,6 +542,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -513,6 +551,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -520,7 +559,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -542,7 +585,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -554,7 +597,7 @@ def list_capacities( ) -> AsyncIterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -567,6 +610,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -579,6 +624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -590,6 +636,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -607,7 +654,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +672,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def get_vip_info( @@ -632,7 +683,7 @@ async def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -649,17 +700,24 @@ async def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +732,7 @@ async def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore async def _change_vnet_initial( @@ -690,6 +748,7 @@ async def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -698,6 +757,7 @@ async def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -705,7 +765,11 @@ async def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -723,7 +787,7 @@ async def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -736,7 +800,7 @@ async def begin_change_vnet( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -759,6 +823,7 @@ async def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -774,6 +839,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -788,6 +854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -807,7 +874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -818,7 +889,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -830,6 +901,7 @@ async def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -840,8 +912,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -857,10 +928,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -872,7 +942,7 @@ async def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -889,17 +959,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +991,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -927,7 +1004,7 @@ async def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -946,18 +1023,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -972,7 +1056,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -984,8 +1068,7 @@ def get_inbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -998,6 +1081,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1010,6 +1095,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1021,6 +1107,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1038,7 +1125,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1052,7 +1143,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -1063,7 +1154,7 @@ def list_multi_role_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -1076,6 +1167,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1088,6 +1181,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -1099,6 +1193,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1116,7 +1211,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1130,7 +1229,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1141,7 +1240,7 @@ async def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -1158,17 +1257,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1183,7 +1289,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1199,6 +1305,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1207,6 +1314,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1214,7 +1322,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1344,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1245,7 +1357,7 @@ async def begin_create_or_update_multi_role_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -1267,8 +1379,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1280,6 +1393,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1304,10 +1418,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1319,7 +1432,7 @@ async def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -1338,6 +1451,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1346,6 +1460,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1353,7 +1468,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1372,7 +1491,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1386,8 +1505,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -1402,6 +1521,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1415,6 +1536,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1427,6 +1549,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1444,7 +1567,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1458,7 +1585,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1469,7 +1596,7 @@ def list_multi_role_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -1482,6 +1609,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1494,6 +1623,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1505,6 +1635,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1522,7 +1653,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1671,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1547,7 +1682,7 @@ def list_multi_role_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -1559,6 +1694,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1571,6 +1708,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1582,6 +1720,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1599,7 +1738,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,7 +1756,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1624,7 +1767,7 @@ def list_multi_role_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -1636,6 +1779,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1648,6 +1793,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1805,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1823,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1841,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -1701,7 +1852,7 @@ async def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -1718,17 +1869,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1743,7 +1901,7 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -1755,8 +1913,7 @@ def get_outbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -1769,6 +1926,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1781,6 +1940,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1792,6 +1952,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1809,7 +1970,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1823,10 +1988,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1834,7 +1999,7 @@ async def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -1851,17 +2016,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1872,7 +2044,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -1887,17 +2059,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1915,7 +2094,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -1927,7 +2106,7 @@ async def begin_resume( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -1948,6 +2127,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1960,6 +2141,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -1971,6 +2153,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1988,7 +2171,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1999,7 +2186,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2010,6 +2197,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2019,8 +2207,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2036,10 +2223,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2051,7 +2237,7 @@ def list_app_service_plans( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -2064,6 +2250,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2076,6 +2264,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2087,6 +2276,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2104,7 +2294,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2118,7 +2312,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2130,13 +2324,14 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2144,6 +2339,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2156,6 +2353,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2168,6 +2366,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2186,7 +2385,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2200,7 +2403,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2214,17 +2417,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2242,7 +2452,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2254,7 +2464,7 @@ async def begin_suspend( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -2275,6 +2485,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2287,6 +2499,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2298,6 +2511,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2315,7 +2529,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2326,7 +2544,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2337,6 +2555,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2346,8 +2565,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2363,10 +2581,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2379,7 +2596,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -2388,7 +2605,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2397,6 +2614,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2409,6 +2628,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2421,6 +2641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2439,7 +2660,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2453,7 +2678,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -2464,7 +2689,7 @@ def list_worker_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -2477,6 +2702,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2489,6 +2716,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -2500,6 +2728,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2517,7 +2746,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2531,7 +2764,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -2543,7 +2776,7 @@ async def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -2562,18 +2795,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2588,7 +2828,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -2605,6 +2845,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2614,6 +2855,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -2621,7 +2863,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2639,7 +2885,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -2653,7 +2899,7 @@ async def begin_create_or_update_worker_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -2677,8 +2923,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2691,6 +2938,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2715,10 +2963,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -2731,7 +2978,7 @@ async def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -2752,6 +2999,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -2761,6 +3009,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -2768,7 +3017,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2787,7 +3040,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -2801,8 +3054,7 @@ def list_worker_pool_instance_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -2819,6 +3071,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2833,6 +3087,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2846,6 +3101,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2863,7 +3119,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2877,7 +3137,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -2889,7 +3149,7 @@ def list_web_worker_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -2904,6 +3164,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2917,6 +3179,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2929,6 +3192,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2946,7 +3210,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2960,7 +3228,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -2972,7 +3240,7 @@ def list_worker_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -2986,6 +3254,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2999,6 +3269,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3011,6 +3282,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3028,7 +3300,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3042,7 +3318,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3054,7 +3330,7 @@ def list_web_worker_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -3068,6 +3344,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3081,6 +3359,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3093,6 +3372,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3110,7 +3390,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3124,4 +3408,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_plans_operations.py index fdf08167dc86..59a302945556 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -131,7 +138,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -142,6 +149,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -153,6 +162,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -163,6 +173,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -180,7 +191,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +209,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -205,7 +220,7 @@ async def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -222,17 +237,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -249,7 +271,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -265,6 +287,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -273,6 +296,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -280,7 +304,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -298,7 +326,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -311,7 +339,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -332,8 +360,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -345,6 +374,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -369,13 +399,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,7 +412,7 @@ async def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -400,17 +429,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -421,7 +457,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -434,7 +470,7 @@ async def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -453,6 +489,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -461,6 +498,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -468,7 +506,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -487,7 +529,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -499,7 +541,7 @@ async def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -516,17 +558,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -541,7 +590,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -555,7 +604,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -576,6 +625,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -583,12 +634,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -603,11 +659,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -617,7 +673,7 @@ async def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -638,6 +694,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -645,12 +703,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -661,7 +724,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -675,7 +738,7 @@ async def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -696,6 +759,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -703,12 +768,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -723,7 +793,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -737,7 +807,7 @@ def list_web_apps_by_hybrid_connection( ) -> AsyncIterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -753,6 +823,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -767,6 +839,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -780,6 +853,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -797,7 +871,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -811,7 +889,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -822,7 +900,7 @@ async def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -839,17 +917,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,7 +949,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -876,7 +961,7 @@ def list_hybrid_connections( ) -> AsyncIterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -889,6 +974,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -901,6 +988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -912,6 +1000,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -929,7 +1018,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -943,10 +1036,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -955,7 +1048,7 @@ async def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -976,18 +1069,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -998,7 +1098,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1013,7 +1113,7 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -1021,12 +1121,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1034,6 +1135,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1046,6 +1149,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1060,6 +1164,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1080,7 +1185,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1094,7 +1203,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1105,7 +1214,7 @@ async def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -1122,17 +1231,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1147,7 +1263,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1160,14 +1276,15 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1176,6 +1293,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1188,6 +1307,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1200,6 +1320,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1218,7 +1339,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1232,7 +1357,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1243,7 +1368,7 @@ async def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -1260,17 +1385,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1285,7 +1417,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1298,7 +1430,7 @@ async def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -1317,18 +1449,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1345,7 +1484,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1359,7 +1498,7 @@ async def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -1380,6 +1519,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1387,12 +1528,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1407,7 +1553,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1422,7 +1568,7 @@ async def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -1445,6 +1591,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1455,6 +1602,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1462,7 +1610,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1477,7 +1629,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1490,8 +1642,7 @@ async def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -1510,18 +1661,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1694,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1550,7 +1708,7 @@ async def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -1571,6 +1729,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1578,12 +1738,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1600,7 +1765,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1615,7 +1780,7 @@ async def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1638,6 +1803,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1648,6 +1814,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1655,7 +1822,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1672,11 +1843,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1686,7 +1857,7 @@ async def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -1707,6 +1878,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1714,12 +1887,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1730,7 +1908,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1745,7 +1923,7 @@ async def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1768,6 +1946,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1778,6 +1957,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1785,7 +1965,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1802,11 +1986,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1815,7 +1999,7 @@ async def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -1834,18 +2018,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1856,5 +2047,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificate_registration_provider_operations.py index c4b274bc842c..872dc31aec82 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificates_operations.py index f3ac1a34a47b..7a54b35ff348 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,7 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -133,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -196,7 +211,7 @@ async def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -213,17 +228,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +260,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -251,7 +273,7 @@ async def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -270,6 +292,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -278,6 +301,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -285,7 +309,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,11 +328,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -312,7 +340,7 @@ async def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -329,17 +357,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -350,7 +385,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -363,7 +398,7 @@ async def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -382,6 +417,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -390,6 +426,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -397,7 +434,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -412,5 +453,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py index 611ffba2f669..c4378ec86155 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -122,7 +129,7 @@ def list_by_location( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -133,6 +140,8 @@ def list_by_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace_async async def get_deleted_web_app_by_location( @@ -196,7 +211,7 @@ async def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -213,17 +228,24 @@ async def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,5 +260,5 @@ async def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_diagnostics_operations.py index ff2eba07b710..13ad1348aa19 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list_hosting_environment_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -138,7 +145,7 @@ async def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -146,11 +153,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -163,12 +170,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -177,7 +187,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +206,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -204,7 +218,7 @@ def list_site_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -217,6 +231,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -229,6 +245,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -240,6 +257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,7 +293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -286,7 +308,7 @@ async def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -294,11 +316,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -311,12 +333,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -325,7 +350,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,7 +369,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -352,7 +381,7 @@ def list_site_diagnostic_categories( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -365,6 +394,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -377,6 +408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -388,6 +420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -405,7 +438,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -419,7 +456,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -431,7 +468,7 @@ async def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -450,18 +487,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -476,7 +520,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -489,7 +533,7 @@ def list_site_analyses( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -504,6 +548,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -517,6 +563,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -529,6 +576,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -546,7 +594,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -560,7 +612,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -573,7 +625,7 @@ async def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -594,6 +646,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -601,12 +655,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +680,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -638,7 +697,7 @@ async def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -648,11 +707,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -665,6 +724,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -672,6 +733,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -680,7 +742,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -695,7 +761,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -708,7 +774,7 @@ def list_site_detectors( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -723,6 +789,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +804,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -748,6 +817,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -765,7 +835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -779,7 +853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector( @@ -792,7 +866,7 @@ async def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -813,6 +887,8 @@ async def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -820,12 +896,17 @@ async def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -840,7 +921,7 @@ async def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -857,7 +938,7 @@ async def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -867,11 +948,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -884,6 +965,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -891,6 +974,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -899,7 +983,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +1002,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -927,7 +1015,7 @@ def list_site_detector_responses_slot( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -942,6 +1030,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -955,6 +1045,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -967,6 +1058,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -984,7 +1076,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -998,7 +1094,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1014,7 +1110,7 @@ async def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1024,11 +1120,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1041,6 +1137,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1048,6 +1146,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1056,7 +1155,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1071,7 +1174,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1084,7 +1187,7 @@ def list_site_diagnostic_categories_slot( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1099,6 +1202,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1112,6 +1217,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1124,6 +1230,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1141,7 +1248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1155,7 +1266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1168,7 +1279,7 @@ async def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1189,6 +1300,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1196,12 +1309,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1216,7 +1334,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1230,7 +1348,7 @@ def list_site_analyses_slot( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1247,6 +1365,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1261,6 +1381,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1274,6 +1395,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1291,7 +1413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1305,7 +1431,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1319,7 +1445,7 @@ async def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1342,6 +1468,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1350,12 +1478,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1370,7 +1503,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1388,7 +1521,7 @@ async def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1400,11 +1533,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1417,6 +1550,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1425,6 +1560,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1433,7 +1569,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1448,7 +1588,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1462,7 +1602,7 @@ def list_site_detectors_slot( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1479,6 +1619,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1493,6 +1635,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1506,6 +1649,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1523,7 +1667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1537,7 +1685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_slot( @@ -1551,7 +1699,7 @@ async def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1574,6 +1722,8 @@ async def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1582,12 +1732,17 @@ async def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1602,7 +1757,7 @@ async def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -1620,7 +1775,7 @@ async def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1632,11 +1787,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1649,6 +1804,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1657,6 +1814,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1665,7 +1823,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1680,5 +1842,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domain_registration_provider_operations.py index c2b82875f899..98be9d33f33d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py index 6178ee8a24a9..ff7de116f782 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ async def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -99,7 +104,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -109,7 +114,7 @@ def list( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) @@ -117,6 +122,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -127,6 +134,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -136,6 +144,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -153,7 +162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -167,7 +180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -176,7 +189,7 @@ async def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -189,15 +202,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +232,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -223,7 +243,7 @@ def list_recommendations( ) -> AsyncIterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2020_09_01.models.DomainRecommendationSearchParameters @@ -234,6 +254,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -247,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -259,6 +281,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -278,7 +301,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -292,7 +319,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -302,7 +329,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -312,6 +339,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -323,6 +352,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -333,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -350,7 +381,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -364,7 +399,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -375,7 +410,7 @@ async def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -392,17 +427,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +459,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -433,6 +475,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -441,6 +484,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -448,7 +492,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -466,7 +514,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -479,7 +527,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -500,8 +548,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -513,6 +562,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -537,13 +587,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -552,7 +601,7 @@ async def delete( ) -> None: """Delete a domain. - Description for 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 @@ -572,18 +621,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -594,7 +650,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -607,7 +663,7 @@ async def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -626,6 +682,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -634,6 +691,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -641,7 +699,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -660,7 +722,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -672,7 +734,7 @@ def list_ownership_identifiers( ) -> AsyncIterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -685,6 +747,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -697,6 +761,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -708,6 +773,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -725,7 +791,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -739,7 +809,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -751,7 +821,7 @@ async def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -770,18 +840,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -796,7 +873,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -811,8 +888,8 @@ async def create_or_update_ownership_identifier( """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. + 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 @@ -833,6 +910,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -842,6 +920,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -849,7 +928,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,11 +947,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -877,7 +960,7 @@ async def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -896,18 +979,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -918,7 +1008,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -933,8 +1023,8 @@ async def update_ownership_identifier( """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. + 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 @@ -955,6 +1045,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -964,6 +1055,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -971,7 +1063,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -986,11 +1082,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -998,7 +1094,7 @@ async def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1015,17 +1111,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1036,5 +1139,5 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_provider_operations.py index 115c7e2144fe..5c684705e9b1 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,9 +52,9 @@ def get_available_stacks( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_09_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -115,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -125,8 +131,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -135,6 +141,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +152,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -152,6 +161,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -169,7 +179,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -183,7 +197,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -193,9 +207,9 @@ def get_available_stacks_on_prem( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_09_01.models.Enum6 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -204,6 +218,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -214,6 +230,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -224,6 +241,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -242,7 +260,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -256,4 +278,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_recommendations_operations.py index 50f08e6abc21..a57ca59243a3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,14 +54,14 @@ def list( ) -> AsyncIterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -125,16 +132,16 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -147,15 +154,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -166,19 +180,18 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -193,16 +206,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -213,7 +233,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -227,7 +247,7 @@ def list_history_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -238,7 +258,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -247,6 +267,8 @@ def list_history_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -259,6 +281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -272,6 +295,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -291,7 +315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -305,7 +333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -318,7 +346,7 @@ def list_recommended_rules_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -328,7 +356,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -337,6 +365,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -349,6 +379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -362,6 +393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -381,7 +413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,10 +431,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_hosting_environment( + async def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -407,7 +443,7 @@ async def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -426,18 +462,25 @@ async def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -448,11 +491,11 @@ async def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_hosting_environment( + async def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -461,7 +504,7 @@ async def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -480,18 +523,25 @@ async def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -502,7 +552,7 @@ async def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -517,7 +567,7 @@ async def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -526,10 +576,10 @@ async def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -542,12 +592,15 @@ async def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -555,7 +608,11 @@ async def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -570,11 +627,11 @@ async def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_hosting_environment( + async def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -584,7 +641,7 @@ async def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -605,19 +662,26 @@ async def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -628,7 +692,7 @@ async def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -642,7 +706,7 @@ def list_history_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -653,7 +717,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -662,6 +726,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -674,6 +740,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -687,6 +754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -706,7 +774,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -720,7 +792,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -733,7 +805,7 @@ def list_recommended_rules_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -743,7 +815,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -752,6 +824,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -764,6 +838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -777,6 +852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -796,7 +872,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -810,10 +890,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -821,7 +901,7 @@ async def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -838,17 +918,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -859,11 +946,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -871,7 +958,7 @@ async def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -888,17 +975,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -909,7 +1003,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -924,7 +1018,7 @@ async def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -933,10 +1027,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -949,12 +1043,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -962,7 +1059,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,11 +1078,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -990,7 +1091,7 @@ async def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1009,18 +1110,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,5 +1139,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_resource_health_metadata_operations.py index 6dd86496a724..aa1c154a7a8f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,8 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -134,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -155,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -197,8 +211,7 @@ def list_by_site( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -211,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -223,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -234,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -251,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -265,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -276,7 +297,7 @@ async def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -293,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -318,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -331,8 +359,7 @@ def list_by_site_slot( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -347,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -372,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -389,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -403,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -415,7 +450,7 @@ async def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -434,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_static_sites_operations.py index 603eb82f7285..d00637271708 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -24,7 +23,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class StaticSitesOperations: +class StaticSitesOperations: # pylint: disable=too-many-public-methods """StaticSitesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ async def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -74,6 +73,7 @@ async def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -81,6 +81,7 @@ async def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -88,7 +89,11 @@ async def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -103,7 +108,7 @@ async def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -113,7 +118,7 @@ def list( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -122,6 +127,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -132,6 +139,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -141,6 +149,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -158,7 +167,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -172,7 +185,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -182,7 +195,7 @@ def get_static_sites_by_resource_group( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -193,6 +206,8 @@ def get_static_sites_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -204,6 +219,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -214,6 +230,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -231,7 +248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -245,7 +266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace_async async def get_static_site( @@ -256,7 +277,7 @@ async def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -273,17 +294,24 @@ async def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -298,7 +326,7 @@ async def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -311,8 +339,7 @@ async def create_or_update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -331,6 +358,7 @@ async def create_or_update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -339,6 +367,7 @@ async def create_or_update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site.metadata['url'], @@ -346,7 +375,11 @@ async def create_or_update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -365,11 +398,11 @@ async def create_or_update_static_site( return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async - async def delete_static_site( + async def delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -377,7 +410,7 @@ async def delete_static_site( ) -> None: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -394,17 +427,24 @@ async def delete_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -415,7 +455,7 @@ async def delete_static_site( if cls: return cls(pipeline_response, None, {}) - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -428,8 +468,7 @@ async def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -448,6 +487,7 @@ async def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -456,6 +496,7 @@ async def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -463,7 +504,11 @@ async def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -482,7 +527,7 @@ async def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -495,7 +540,7 @@ def list_static_site_users( ) -> AsyncIterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -510,6 +555,8 @@ def list_static_site_users( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -523,6 +570,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -535,6 +583,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -552,7 +601,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -566,10 +619,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace_async - async def delete_static_site_user( + async def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -579,7 +632,7 @@ async def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -600,6 +653,8 @@ async def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -607,12 +662,17 @@ async def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -623,7 +683,7 @@ async def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace_async @@ -638,7 +698,7 @@ async def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -662,6 +722,7 @@ async def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -672,6 +733,7 @@ async def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -679,7 +741,11 @@ async def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -694,7 +760,7 @@ async def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -706,7 +772,7 @@ def get_static_site_builds( ) -> AsyncIterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -719,6 +785,8 @@ def get_static_site_builds( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -731,6 +799,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -742,6 +811,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -759,7 +829,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -773,7 +847,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace_async async def get_static_site_build( @@ -785,7 +859,7 @@ async def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -804,18 +878,25 @@ async def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -830,11 +911,11 @@ async def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace_async - async def delete_static_site_build( + async def delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -843,7 +924,7 @@ async def delete_static_site_build( ) -> None: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -862,18 +943,25 @@ async def delete_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -884,7 +972,7 @@ async def delete_static_site_build( if cls: return cls(pipeline_response, None, {}) - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace_async @@ -898,7 +986,7 @@ async def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -919,6 +1007,7 @@ async def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -928,6 +1017,7 @@ async def create_or_update_static_site_build_function_app_settings( name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -935,7 +1025,11 @@ async def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -954,7 +1048,7 @@ async def create_or_update_static_site_build_function_app_settings( 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'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings"} # type: ignore @distributed_trace @@ -967,7 +1061,7 @@ def list_static_site_build_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -982,6 +1076,8 @@ def list_static_site_build_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -995,6 +1091,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -1007,6 +1104,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1024,7 +1122,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1038,7 +1140,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions"} # type: ignore @distributed_trace_async async def list_static_site_build_function_app_settings( @@ -1050,7 +1152,7 @@ async def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -1069,18 +1171,25 @@ async def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1099,7 +1208,7 @@ async def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -1112,7 +1221,7 @@ async def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -1131,6 +1240,7 @@ async def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1139,6 +1249,7 @@ async def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -1146,7 +1257,11 @@ async def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1165,7 +1280,7 @@ async def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace_async @@ -1178,7 +1293,7 @@ async def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -1198,6 +1313,7 @@ async def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -1206,6 +1322,7 @@ async def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -1213,7 +1330,11 @@ async def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1228,7 +1349,7 @@ async def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -1240,7 +1361,7 @@ def list_static_site_custom_domains( ) -> AsyncIterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -1253,6 +1374,8 @@ def list_static_site_custom_domains( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1265,6 +1388,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -1276,6 +1400,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1293,7 +1418,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1307,7 +1436,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace_async async def create_or_update_static_site_custom_domain( @@ -1319,8 +1448,7 @@ async def create_or_update_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -1339,18 +1467,25 @@ async def create_or_update_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_create_or_update_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.create_or_update_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1369,11 +1504,11 @@ async def create_or_update_static_site_custom_domain( return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def delete_static_site_custom_domain( + async def delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1382,7 +1517,7 @@ async def delete_static_site_custom_domain( ) -> None: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1401,18 +1536,25 @@ async def delete_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1423,11 +1565,11 @@ async def delete_static_site_custom_domain( if cls: return cls(pipeline_response, None, {}) - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def validate_custom_domain_can_be_added_to_static_site( + async def validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1436,7 +1578,7 @@ async def validate_custom_domain_can_be_added_to_static_site( ) -> None: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -1455,18 +1597,25 @@ async def validate_custom_domain_can_be_added_to_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_validate_custom_domain_can_be_added_to_static_site_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.validate_custom_domain_can_be_added_to_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1477,11 +1626,11 @@ async def validate_custom_domain_can_be_added_to_static_site( if cls: return cls(pipeline_response, None, {}) - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace_async - async def detach_static_site( + async def detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1489,7 +1638,7 @@ async def detach_static_site( ) -> None: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1506,17 +1655,24 @@ async def detach_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_detach_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1527,7 +1683,7 @@ async def detach_static_site( if cls: return cls(pipeline_response, None, {}) - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace @@ -1539,7 +1695,7 @@ def list_static_site_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -1552,6 +1708,8 @@ def list_static_site_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1564,6 +1722,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -1575,6 +1734,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1592,7 +1752,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1770,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace_async async def list_static_site_function_app_settings( @@ -1617,7 +1781,7 @@ async def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -1634,17 +1798,24 @@ async def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1663,7 +1834,7 @@ async def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -1675,7 +1846,7 @@ async def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -1692,17 +1863,24 @@ async def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1717,11 +1895,11 @@ async def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace_async - async def reset_static_site_api_key( + async def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1730,7 +1908,7 @@ async def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -1750,6 +1928,7 @@ async def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -1758,6 +1937,7 @@ async def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -1765,7 +1945,11 @@ async def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1776,5 +1960,5 @@ async def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_top_level_domains_operations.py index 53cccfe48521..0d091bdd4c78 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -122,7 +129,7 @@ async def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -137,16 +144,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -161,7 +175,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -173,7 +187,7 @@ def list_agreements( ) -> AsyncIterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -186,6 +200,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -200,6 +215,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -213,6 +229,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -232,7 +249,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -246,4 +267,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_apps_operations.py index 7b65adc40955..b866ac2720b5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -137,6 +144,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -148,6 +157,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -159,6 +169,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -246,7 +268,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -262,6 +284,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -270,6 +293,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -277,7 +301,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -295,7 +323,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -309,8 +337,8 @@ async def begin_create_or_update( """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. + 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 @@ -331,8 +359,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -344,6 +373,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -368,13 +398,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -384,16 +413,16 @@ async def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -406,11 +435,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -418,7 +450,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -429,7 +465,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -443,8 +479,8 @@ async def update( """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. + 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 @@ -464,6 +500,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -472,6 +509,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -479,7 +517,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -498,7 +540,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -511,13 +553,13 @@ async def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -530,18 +572,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -556,11 +605,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -569,7 +618,7 @@ async def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -588,6 +637,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -596,6 +646,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -603,7 +654,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -614,7 +669,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -627,7 +682,7 @@ async def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -647,6 +702,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -655,6 +711,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -662,7 +719,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -677,7 +738,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -689,7 +750,7 @@ def list_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -702,6 +763,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -714,6 +777,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -725,6 +789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -742,7 +807,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -756,7 +825,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def get_backup_status( @@ -768,7 +837,7 @@ async def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -787,18 +856,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -813,11 +889,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -826,7 +902,7 @@ async def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -845,18 +921,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -867,7 +950,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -883,9 +966,9 @@ async def list_backup_status_secrets( 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. + 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 @@ -906,6 +989,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -915,6 +999,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -922,7 +1007,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1026,10 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - async def _restore_initial( + async def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -954,6 +1043,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -963,6 +1053,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -970,7 +1061,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -980,11 +1075,11 @@ async def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore( + async def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -994,7 +1089,7 @@ async def begin_restore( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -1016,8 +1111,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1030,6 +1126,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1051,10 +1148,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async async def get_basic_publishing_credentials_policies( @@ -1065,8 +1161,7 @@ async def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -1083,17 +1178,24 @@ async def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1108,7 +1210,7 @@ async def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async @@ -1120,7 +1222,7 @@ async def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -1137,17 +1239,24 @@ async def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1162,7 +1271,7 @@ async def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1175,7 +1284,7 @@ async def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -1195,6 +1304,7 @@ async def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1203,6 +1313,7 @@ async def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -1210,7 +1321,11 @@ async def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1225,7 +1340,7 @@ async def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1237,7 +1352,7 @@ async def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -1254,17 +1369,24 @@ async def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1279,7 +1401,7 @@ async def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -1292,7 +1414,7 @@ async def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -1312,6 +1434,7 @@ async def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1320,6 +1443,7 @@ async def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -1327,7 +1451,11 @@ async def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1342,7 +1470,7 @@ async def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -1354,7 +1482,7 @@ def list_configurations( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -1367,6 +1495,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1379,6 +1509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1390,6 +1521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1407,7 +1539,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1421,7 +1557,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1433,7 +1569,7 @@ async def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -1452,6 +1588,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1460,6 +1597,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1467,7 +1605,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1482,7 +1624,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1494,7 +1636,7 @@ async def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -1511,17 +1653,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1685,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1549,7 +1698,7 @@ async def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -1568,6 +1717,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1576,6 +1726,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1583,7 +1734,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1598,7 +1753,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1610,7 +1765,7 @@ async def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -1627,17 +1782,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1652,7 +1814,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1665,8 +1827,7 @@ async def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -1685,6 +1846,7 @@ async def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -1693,6 +1855,7 @@ async def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -1700,7 +1863,11 @@ async def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1715,7 +1882,7 @@ async def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -1727,7 +1894,7 @@ async def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -1744,17 +1911,24 @@ async def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1769,7 +1943,7 @@ async def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -1782,7 +1956,7 @@ async def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -1802,6 +1976,7 @@ async def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -1810,6 +1985,7 @@ async def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -1817,7 +1993,11 @@ async def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1832,7 +2012,7 @@ async def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -1844,7 +2024,7 @@ async def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -1861,17 +2041,24 @@ async def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1886,7 +2073,7 @@ async def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -1899,7 +2086,7 @@ async def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -1918,6 +2105,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -1926,6 +2114,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -1933,7 +2122,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1948,11 +2141,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1960,7 +2153,7 @@ async def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -1977,17 +2170,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1998,7 +2198,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -2010,7 +2210,7 @@ async def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -2027,17 +2227,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2052,7 +2259,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace_async @@ -2065,7 +2272,7 @@ async def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -2084,6 +2291,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -2092,6 +2300,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -2099,7 +2308,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2114,7 +2327,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -2126,7 +2339,7 @@ async def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -2143,17 +2356,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2168,7 +2388,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -2180,7 +2400,7 @@ async def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -2197,17 +2417,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2222,7 +2449,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2235,7 +2462,7 @@ async def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -2255,6 +2482,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -2263,6 +2491,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -2270,7 +2499,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2285,7 +2518,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2298,7 +2531,7 @@ async def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -2317,6 +2550,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -2325,6 +2559,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -2332,7 +2567,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2347,7 +2586,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -2359,7 +2598,7 @@ async def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -2376,17 +2615,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2401,7 +2647,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -2416,17 +2662,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2440,7 +2693,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -2452,7 +2705,7 @@ async def begin_list_publishing_credentials( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -2470,7 +2723,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2481,6 +2735,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2504,10 +2759,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2519,7 +2773,7 @@ async def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -2538,6 +2792,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2546,6 +2801,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2553,7 +2809,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2568,7 +2828,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2580,7 +2840,7 @@ async def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -2597,17 +2857,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2622,7 +2889,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2634,8 +2901,7 @@ async def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -2652,17 +2918,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2677,7 +2950,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2691,8 +2964,8 @@ async def update_slot_configuration_names( """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. + 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 @@ -2711,6 +2984,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -2719,6 +2993,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -2726,7 +3001,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2741,7 +3020,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2754,8 +3033,8 @@ async def get_configuration( """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. + 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 @@ -2772,17 +3051,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2797,7 +3083,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2810,7 +3096,7 @@ async def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -2829,6 +3115,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2837,6 +3124,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -2844,7 +3132,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2859,7 +3151,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -2872,7 +3164,7 @@ async def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -2891,6 +3183,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -2899,6 +3192,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -2906,7 +3200,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2921,7 +3219,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -2934,8 +3232,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -2948,6 +3246,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2960,6 +3260,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -2971,6 +3272,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2988,7 +3290,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3002,7 +3308,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -3014,7 +3320,7 @@ async def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -3033,18 +3339,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3059,11 +3372,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3072,7 +3385,7 @@ async def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -3091,18 +3404,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3113,7 +3433,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -3125,7 +3445,7 @@ async def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -3142,17 +3462,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3168,7 +3495,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -3180,7 +3507,7 @@ async def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -3197,17 +3524,24 @@ async def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3223,7 +3557,7 @@ async def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -3235,7 +3569,7 @@ def list_continuous_web_jobs( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -3248,6 +3582,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3260,6 +3596,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -3271,6 +3608,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3288,7 +3626,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3302,7 +3644,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -3314,7 +3656,7 @@ async def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3333,18 +3675,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3361,11 +3710,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3374,7 +3723,7 @@ async def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3393,18 +3742,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3415,11 +3771,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3428,7 +3784,7 @@ async def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -3447,18 +3803,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3469,11 +3832,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3482,7 +3845,7 @@ async def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -3501,18 +3864,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3523,7 +3893,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3535,7 +3905,7 @@ def list_deployments( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -3548,6 +3918,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3560,6 +3932,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3571,6 +3944,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3588,7 +3962,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3602,7 +3980,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3614,7 +3992,7 @@ async def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -3633,18 +4011,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3659,7 +4044,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3673,7 +4058,7 @@ async def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -3694,6 +4079,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -3703,6 +4089,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -3710,7 +4097,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3725,11 +4116,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3738,7 +4129,7 @@ async def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -3757,18 +4148,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3779,7 +4177,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3792,7 +4190,7 @@ async def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -3812,18 +4210,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3838,7 +4243,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -3852,8 +4257,8 @@ async def discover_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. - 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. + 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 @@ -3873,6 +4278,7 @@ async def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -3881,6 +4287,7 @@ async def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -3888,7 +4295,11 @@ async def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3903,7 +4314,7 @@ async def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -3915,7 +4326,7 @@ def list_domain_ownership_identifiers( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -3928,6 +4339,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3940,6 +4353,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -3951,6 +4365,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3968,7 +4383,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3982,7 +4401,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -3994,7 +4413,7 @@ async def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -4013,18 +4432,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4039,7 +4465,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4053,8 +4479,7 @@ async def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4075,6 +4500,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4084,6 +4510,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -4091,7 +4518,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4106,11 +4537,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4119,7 +4550,7 @@ async def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -4138,18 +4569,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4160,7 +4598,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4174,8 +4612,7 @@ async def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4196,6 +4633,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4205,6 +4643,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -4212,7 +4651,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4227,7 +4670,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4239,7 +4682,7 @@ async def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -4256,17 +4699,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4281,7 +4731,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -4297,6 +4747,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -4305,6 +4756,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -4312,7 +4764,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -4328,7 +4784,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -4341,7 +4797,7 @@ async def begin_create_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -4362,8 +4818,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -4375,6 +4832,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4399,10 +4857,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -4413,7 +4870,7 @@ async def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -4430,17 +4887,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4457,7 +4921,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -4469,7 +4933,7 @@ def list_functions( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -4482,6 +4946,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4494,6 +4960,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -4505,6 +4972,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4522,7 +4990,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4536,7 +5008,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -4547,7 +5019,7 @@ async def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -4564,17 +5036,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4589,7 +5068,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -4602,7 +5081,7 @@ async def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -4621,18 +5100,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4649,7 +5135,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -4666,6 +5152,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -4675,6 +5162,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -4682,7 +5170,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4696,7 +5188,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4710,7 +5202,7 @@ async def begin_create_function( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -4733,8 +5225,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -4747,6 +5240,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4771,13 +5265,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4786,7 +5279,7 @@ async def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -4805,18 +5298,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4827,7 +5327,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4842,7 +5342,7 @@ async def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -4865,6 +5365,7 @@ async def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -4875,6 +5376,7 @@ async def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -4882,7 +5384,11 @@ async def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -4901,11 +5407,11 @@ async def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret( + async def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4915,7 +5421,7 @@ async def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -4936,6 +5442,8 @@ async def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -4943,12 +5451,17 @@ async def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -4959,7 +5472,7 @@ async def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -4972,7 +5485,7 @@ async def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -4991,18 +5504,25 @@ async def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5017,7 +5537,7 @@ async def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -5030,7 +5550,7 @@ async def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -5049,18 +5569,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5075,7 +5602,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -5087,7 +5614,7 @@ async def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -5104,17 +5631,24 @@ async def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5129,11 +5663,11 @@ async def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status( + async def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5141,7 +5675,7 @@ async def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -5158,17 +5692,24 @@ async def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5179,11 +5720,11 @@ async def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions( + async def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5191,7 +5732,7 @@ async def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -5208,17 +5749,24 @@ async def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5229,7 +5777,7 @@ async def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace_async @@ -5244,7 +5792,7 @@ async def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -5267,6 +5815,7 @@ async def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5277,6 +5826,7 @@ async def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -5284,7 +5834,11 @@ async def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5303,11 +5857,11 @@ async def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret( + async def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5317,7 +5871,7 @@ async def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -5338,6 +5892,8 @@ async def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -5345,12 +5901,17 @@ async def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5361,7 +5922,7 @@ async def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -5373,7 +5934,7 @@ def list_host_name_bindings( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -5386,6 +5947,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5398,6 +5961,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -5409,6 +5973,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5426,7 +5991,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5440,7 +6009,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -5452,7 +6021,7 @@ async def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -5471,18 +6040,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5497,7 +6073,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5511,7 +6087,7 @@ async def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -5533,6 +6109,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -5542,6 +6119,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -5549,7 +6127,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5564,11 +6146,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5577,7 +6159,7 @@ async def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -5596,18 +6178,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5618,7 +6207,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5632,7 +6221,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -5653,6 +6242,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5660,12 +6251,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5680,7 +6276,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5695,7 +6291,7 @@ async def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -5718,6 +6314,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -5728,6 +6325,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -5735,7 +6333,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5750,11 +6352,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5764,7 +6366,7 @@ async def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -5785,6 +6387,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5792,12 +6396,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -5808,7 +6417,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5823,7 +6432,7 @@ async def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -5846,6 +6455,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -5856,6 +6466,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -5863,7 +6474,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5878,7 +6493,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5890,7 +6505,7 @@ async def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -5907,17 +6522,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5932,7 +6554,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -5944,8 +6566,7 @@ async def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -5962,17 +6583,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5987,7 +6615,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -6000,7 +6628,7 @@ async def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -6019,18 +6647,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6045,7 +6680,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6059,8 +6694,7 @@ async def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6081,6 +6715,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6090,6 +6725,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -6097,7 +6733,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6112,11 +6752,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6125,7 +6765,7 @@ async def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -6144,18 +6784,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6166,7 +6813,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6180,8 +6827,7 @@ async def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6202,6 +6848,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6211,6 +6858,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -6218,7 +6866,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6233,7 +6885,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -6245,7 +6897,7 @@ def list_instance_identifiers( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -6258,6 +6910,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6270,6 +6924,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -6281,6 +6936,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6298,7 +6954,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6312,7 +6972,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_info( @@ -6324,7 +6984,7 @@ async def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -6343,18 +7003,25 @@ async def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6369,7 +7036,7 @@ async def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -6382,7 +7049,7 @@ async def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -6401,18 +7068,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6427,7 +7101,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -6444,6 +7118,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -6453,6 +7128,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -6460,7 +7136,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -6476,7 +7156,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -6490,7 +7170,7 @@ async def begin_create_instance_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -6513,8 +7193,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -6527,6 +7208,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6551,10 +7233,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -6566,7 +7247,7 @@ async def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -6585,18 +7266,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6613,7 +7301,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -6627,8 +7315,8 @@ def list_instance_processes( """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. + 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 @@ -6644,6 +7332,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6657,6 +7347,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -6669,6 +7360,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6686,7 +7378,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6700,7 +7396,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -6713,8 +7409,7 @@ async def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -6736,6 +7431,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -6743,12 +7440,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6765,11 +7467,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6780,8 +7482,8 @@ async def delete_instance_process( """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. + 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 @@ -6803,6 +7505,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -6810,12 +7514,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -6826,7 +7535,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -6840,8 +7549,7 @@ async def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -6863,6 +7571,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -6870,12 +7580,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6892,7 +7607,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -6907,8 +7622,8 @@ def list_instance_process_modules( """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. + 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 @@ -6926,6 +7641,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6940,6 +7657,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -6953,6 +7671,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6970,7 +7689,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6984,7 +7707,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -6998,8 +7721,7 @@ async def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7023,6 +7745,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -7031,12 +7755,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7053,7 +7782,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -7067,8 +7796,7 @@ def list_instance_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -7086,6 +7814,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7100,6 +7830,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -7113,6 +7844,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7130,7 +7862,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7144,7 +7880,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable( @@ -7155,7 +7891,7 @@ async def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -7172,17 +7908,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7197,7 +7940,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -7209,7 +7952,7 @@ def list_site_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -7222,6 +7965,8 @@ def list_site_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7234,6 +7979,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -7245,6 +7991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7262,7 +8009,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7276,7 +8027,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers( @@ -7287,7 +8038,7 @@ async def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -7304,17 +8055,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7329,7 +8087,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore async def _migrate_storage_initial( @@ -7346,6 +8104,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -7354,6 +8113,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -7362,7 +8122,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7376,7 +8140,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -7390,7 +8154,7 @@ async def begin_migrate_storage( ) -> AsyncLROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -7414,8 +8178,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -7428,6 +8193,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7452,10 +8218,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -7470,6 +8235,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -7478,6 +8244,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -7485,7 +8252,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7499,7 +8270,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -7512,7 +8283,7 @@ async def begin_migrate_my_sql( ) -> AsyncLROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -7533,8 +8304,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -7546,6 +8318,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7570,10 +8343,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -7585,8 +8357,8 @@ async def get_migrate_my_sql_status( """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. + 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 @@ -7603,17 +8375,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7628,7 +8407,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -7640,7 +8419,7 @@ async def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -7657,17 +8436,24 @@ async def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7682,7 +8468,7 @@ async def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7698,9 +8484,9 @@ async def create_or_update_swift_virtual_network_connection( 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 + 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. @@ -7720,6 +8506,7 @@ async def create_or_update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -7728,6 +8515,7 @@ async def create_or_update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection.metadata['url'], @@ -7735,7 +8523,11 @@ async def create_or_update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7750,11 +8542,11 @@ async def create_or_update_swift_virtual_network_connection( return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network( + async def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7762,7 +8554,7 @@ async def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -7779,17 +8571,24 @@ async def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7800,7 +8599,7 @@ async def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7816,9 +8615,9 @@ async def update_swift_virtual_network_connection( 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 + 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. @@ -7838,6 +8637,7 @@ async def update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -7846,6 +8646,7 @@ async def update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection.metadata['url'], @@ -7853,7 +8654,11 @@ async def update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7868,7 +8673,7 @@ async def update_swift_virtual_network_connection( return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7881,7 +8686,7 @@ async def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -7900,18 +8705,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7928,7 +8740,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -7941,8 +8753,7 @@ async def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -7961,18 +8772,25 @@ async def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -7991,7 +8809,7 @@ async def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8006,17 +8824,17 @@ async def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -8029,11 +8847,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8042,7 +8863,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8057,7 +8882,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_initial( @@ -8075,11 +8900,14 @@ async def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8088,7 +8916,11 @@ async def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8106,7 +8938,7 @@ async def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -8121,17 +8953,17 @@ async def begin_start_web_site_network_trace_operation( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -8147,7 +8979,8 @@ async def begin_start_web_site_network_trace_operation( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -8161,6 +8994,7 @@ async def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -8184,13 +9018,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace( + async def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8198,7 +9031,7 @@ async def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -8215,17 +9048,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8236,7 +9076,7 @@ async def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -8249,8 +9089,7 @@ async def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8269,18 +9108,25 @@ async def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8295,7 +9141,7 @@ async def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -8308,8 +9154,7 @@ async def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8328,18 +9173,25 @@ async def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8358,7 +9210,7 @@ async def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8371,8 +9223,7 @@ async def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8391,18 +9242,25 @@ async def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8417,11 +9275,11 @@ async def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8429,8 +9287,7 @@ async def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -8447,17 +9304,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8468,7 +9332,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -8481,7 +9345,7 @@ def list_perf_mon_counters( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -8489,7 +9353,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -8498,6 +9362,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8510,6 +9376,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -8522,6 +9389,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -8540,7 +9408,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8554,7 +9426,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -8565,7 +9437,7 @@ async def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -8582,17 +9454,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8607,7 +9486,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -8619,7 +9498,7 @@ async def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -8636,17 +9515,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8661,7 +9547,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -8674,7 +9560,7 @@ async def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -8693,18 +9579,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8719,7 +9612,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8733,7 +9626,7 @@ async def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -8754,6 +9647,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -8763,6 +9657,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -8770,7 +9665,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8785,11 +9684,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8798,7 +9697,7 @@ async def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -8817,18 +9716,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8839,7 +9745,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8853,7 +9759,7 @@ async def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -8874,6 +9780,7 @@ async def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -8883,6 +9790,7 @@ async def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -8890,7 +9798,11 @@ async def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8905,7 +9817,7 @@ async def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8918,8 +9830,8 @@ async def get_private_access( """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. + 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 @@ -8936,17 +9848,24 @@ async def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8961,7 +9880,7 @@ async def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -8975,8 +9894,8 @@ async def put_private_access_vnet( """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. + 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 @@ -8995,6 +9914,7 @@ async def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -9003,6 +9923,7 @@ async def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -9010,7 +9931,11 @@ async def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9025,7 +9950,7 @@ async def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -9038,8 +9963,8 @@ def list_processes( """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. + 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 @@ -9052,6 +9977,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9064,6 +9991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -9075,6 +10003,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9092,7 +10021,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9106,7 +10039,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -9118,8 +10051,7 @@ async def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9138,18 +10070,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9166,11 +10105,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9180,8 +10119,8 @@ async def delete_process( """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. + 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 @@ -9200,18 +10139,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -9222,7 +10168,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -9235,8 +10181,7 @@ async def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -9255,18 +10200,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9283,7 +10235,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -9297,8 +10249,8 @@ def list_process_modules( """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. + 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 @@ -9313,6 +10265,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9326,6 +10280,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -9338,6 +10293,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9355,7 +10311,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9369,7 +10329,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -9382,8 +10342,7 @@ async def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9404,6 +10363,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -9411,12 +10372,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9433,7 +10399,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -9446,8 +10412,7 @@ def list_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -9462,6 +10427,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9475,6 +10442,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -9487,6 +10455,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9504,7 +10473,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9518,7 +10491,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -9529,7 +10502,7 @@ def list_public_certificates( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -9542,6 +10515,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9554,6 +10529,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -9565,6 +10541,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9582,7 +10559,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9596,7 +10577,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -9608,7 +10589,7 @@ async def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -9627,18 +10608,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9653,7 +10641,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -9667,7 +10655,7 @@ async def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -9689,6 +10677,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -9698,6 +10687,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -9705,7 +10695,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9720,11 +10714,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9733,7 +10727,7 @@ async def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -9752,18 +10746,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -9774,7 +10775,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -9787,7 +10788,7 @@ async def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -9808,6 +10809,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -9816,6 +10818,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -9823,7 +10826,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9838,11 +10845,11 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9851,8 +10858,8 @@ async def reset_production_slot_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. + 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 @@ -9869,17 +10876,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9890,11 +10904,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9904,17 +10918,18 @@ async def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -9927,11 +10942,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -9939,7 +10957,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9950,10 +10972,10 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - async def _restore_from_backup_blob_initial( + async def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9966,6 +10988,7 @@ async def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -9974,6 +10997,7 @@ async def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -9981,7 +11005,11 @@ async def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9991,11 +11019,11 @@ async def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob( + async def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10004,7 +11032,7 @@ async def begin_restore_from_backup_blob( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -10024,8 +11052,9 @@ async def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10037,6 +11066,7 @@ async def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10058,12 +11088,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_initial( + async def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10076,6 +11105,7 @@ async def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -10084,6 +11114,7 @@ async def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -10091,7 +11122,11 @@ async def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10101,11 +11136,11 @@ async def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app( + async def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10114,7 +11149,7 @@ async def begin_restore_from_deleted_app( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -10134,8 +11169,9 @@ async def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10147,6 +11183,7 @@ async def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10168,12 +11205,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_initial( + async def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10186,6 +11222,7 @@ async def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -10194,6 +11231,7 @@ async def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -10201,7 +11239,11 @@ async def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10211,11 +11253,11 @@ async def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot( + async def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10224,7 +11266,7 @@ async def begin_restore_snapshot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -10245,8 +11287,9 @@ async def begin_restore_snapshot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10258,6 +11301,7 @@ async def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10279,10 +11323,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -10293,7 +11336,7 @@ def list_site_extensions( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -10306,6 +11349,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10318,6 +11363,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -10329,6 +11375,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10346,7 +11393,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10360,7 +11411,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -10372,7 +11423,7 @@ async def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -10391,18 +11442,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10419,7 +11477,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -10435,18 +11493,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -10465,7 +11530,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -10478,7 +11543,7 @@ async def begin_install_site_extension( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -10500,7 +11565,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -10512,6 +11578,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -10535,13 +11602,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10550,7 +11616,7 @@ async def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -10569,18 +11635,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -10591,10 +11664,10 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore - async def _copy_production_slot_initial( + async def _copy_production_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10607,6 +11680,7 @@ async def _copy_production_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -10615,6 +11689,7 @@ async def _copy_production_slot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_production_slot_initial.metadata['url'], @@ -10622,7 +11697,11 @@ async def _copy_production_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10632,11 +11711,11 @@ async def _copy_production_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_production_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + _copy_production_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace_async - async def begin_copy_production_slot( + async def begin_copy_production_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10645,7 +11724,7 @@ async def begin_copy_production_slot( ) -> AsyncLROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -10666,8 +11745,9 @@ async def begin_copy_production_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10679,6 +11759,7 @@ async def begin_copy_production_slot( resource_group_name=resource_group_name, name=name, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10700,10 +11781,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + begin_copy_production_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace def list_slots( @@ -10714,7 +11794,7 @@ def list_slots( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -10726,6 +11806,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10738,6 +11820,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -10749,6 +11832,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10766,7 +11850,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10780,7 +11868,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -10792,7 +11880,7 @@ async def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -10811,18 +11899,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10839,7 +11934,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -10856,6 +11951,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -10865,6 +11961,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -10872,7 +11969,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10890,7 +11991,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -10905,8 +12006,8 @@ async def begin_create_or_update_slot( """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. + 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 @@ -10930,8 +12031,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -10944,6 +12046,7 @@ async def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10968,13 +12071,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10985,7 +12087,7 @@ async def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -10994,11 +12096,11 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -11011,12 +12113,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -11024,7 +12129,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -11035,7 +12144,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11050,8 +12159,8 @@ async def update_slot( """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. + 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 @@ -11074,6 +12183,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -11083,6 +12193,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -11090,7 +12201,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11109,7 +12224,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11123,7 +12238,7 @@ async def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -11131,7 +12246,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -11144,19 +12259,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11171,11 +12293,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11185,7 +12307,7 @@ async def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -11207,6 +12329,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -11216,6 +12339,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -11223,7 +12347,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11234,7 +12362,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -11248,7 +12376,7 @@ async def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -11271,6 +12399,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11280,6 +12409,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -11287,7 +12417,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11302,7 +12436,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -11315,7 +12449,7 @@ def list_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -11331,6 +12465,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11344,6 +12480,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -11356,6 +12493,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11373,7 +12511,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11387,7 +12529,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def get_backup_status_slot( @@ -11400,7 +12542,7 @@ async def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -11422,6 +12564,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -11429,12 +12573,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11449,11 +12598,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11463,7 +12612,7 @@ async def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -11485,6 +12634,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -11492,12 +12643,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11508,7 +12664,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -11525,9 +12681,9 @@ async def list_backup_status_secrets_slot( 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. + 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 @@ -11550,6 +12706,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11560,6 +12717,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -11567,7 +12725,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11582,10 +12744,10 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - async def _restore_slot_initial( + async def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11600,6 +12762,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -11610,6 +12773,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -11617,7 +12781,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11627,11 +12795,11 @@ async def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore_slot( + async def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11642,7 +12810,7 @@ async def begin_restore_slot( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -11667,8 +12835,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -11682,6 +12851,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11703,10 +12873,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -11718,7 +12887,7 @@ def list_configurations_slot( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -11734,6 +12903,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11747,6 +12918,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -11759,6 +12931,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11776,7 +12949,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11790,7 +12967,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -11803,7 +12980,7 @@ async def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -11825,6 +13002,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -11834,6 +13012,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -11841,7 +13020,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11856,7 +13039,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -11869,7 +13052,7 @@ async def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -11889,18 +13072,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11915,7 +13105,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -11929,7 +13119,7 @@ async def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -11950,6 +13140,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -11959,6 +13150,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -11966,7 +13158,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11981,7 +13177,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -11994,7 +13190,7 @@ async def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -12014,18 +13210,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12040,7 +13243,7 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -12054,8 +13257,7 @@ async def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -12076,6 +13278,7 @@ async def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -12085,6 +13288,7 @@ async def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -12092,7 +13296,11 @@ async def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12107,7 +13315,7 @@ async def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -12120,7 +13328,7 @@ async def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -12140,18 +13348,25 @@ async def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12166,7 +13381,7 @@ async def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -12180,7 +13395,7 @@ async def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -12203,6 +13418,7 @@ async def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -12212,6 +13428,7 @@ async def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -12219,7 +13436,11 @@ async def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12234,7 +13455,7 @@ async def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -12247,7 +13468,7 @@ async def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -12267,18 +13488,25 @@ async def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12293,7 +13521,7 @@ async def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -12307,7 +13535,7 @@ async def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -12329,6 +13557,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12338,6 +13567,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -12345,7 +13575,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12360,11 +13594,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12373,7 +13607,7 @@ async def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -12393,18 +13627,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12415,7 +13656,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -12428,7 +13669,7 @@ async def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -12448,18 +13689,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12474,7 +13722,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace_async @@ -12488,7 +13736,7 @@ async def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -12510,6 +13758,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -12519,6 +13768,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -12526,7 +13776,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12541,7 +13795,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -12554,7 +13808,7 @@ async def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -12574,18 +13828,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12600,7 +13861,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -12613,7 +13874,7 @@ async def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -12633,18 +13894,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12659,7 +13927,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -12673,7 +13941,7 @@ async def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -12696,6 +13964,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -12705,6 +13974,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -12712,7 +13982,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12727,7 +14001,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -12741,7 +14015,7 @@ async def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -12763,6 +14037,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -12772,6 +14047,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -12779,7 +14055,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12794,7 +14074,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -12807,7 +14087,7 @@ async def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -12827,18 +14107,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12853,7 +14140,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -12869,18 +14156,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12894,7 +14188,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -12907,7 +14201,7 @@ async def begin_list_publishing_credentials_slot( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -12928,7 +14222,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -12940,6 +14235,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -12963,10 +14259,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -12979,7 +14274,7 @@ async def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -13000,6 +14295,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -13009,6 +14305,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -13016,7 +14313,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13031,7 +14332,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -13044,7 +14345,7 @@ async def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -13063,18 +14364,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13089,7 +14397,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -13103,8 +14411,8 @@ async def get_configuration_slot( """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. + 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 @@ -13124,18 +14432,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13150,7 +14465,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -13164,7 +14479,7 @@ async def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -13186,6 +14501,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -13195,6 +14511,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -13202,7 +14519,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13217,7 +14538,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -13231,7 +14552,7 @@ async def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -13253,6 +14574,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -13262,6 +14584,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -13269,7 +14592,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13284,7 +14611,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -13298,8 +14625,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -13315,6 +14642,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13328,6 +14657,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -13340,6 +14670,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13357,7 +14688,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13371,7 +14706,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -13384,7 +14719,7 @@ async def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -13406,6 +14741,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -13413,12 +14750,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13433,11 +14775,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13447,7 +14789,7 @@ async def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -13469,6 +14811,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -13476,12 +14820,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -13492,7 +14841,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -13505,7 +14854,7 @@ async def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -13524,18 +14873,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13551,7 +14907,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -13564,7 +14920,7 @@ async def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -13583,18 +14939,25 @@ async def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13610,7 +14973,7 @@ async def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -13623,7 +14986,7 @@ def list_continuous_web_jobs_slot( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -13639,6 +15002,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13652,6 +15017,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -13664,6 +15030,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13681,7 +15048,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13695,7 +15066,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -13708,7 +15079,7 @@ async def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -13730,6 +15101,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13737,12 +15110,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13759,11 +15137,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13773,7 +15151,7 @@ async def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -13795,6 +15173,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13802,12 +15182,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -13818,11 +15203,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13832,7 +15217,7 @@ async def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -13854,6 +15239,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13861,12 +15248,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13877,11 +15269,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13891,7 +15283,7 @@ async def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -13913,6 +15305,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -13920,12 +15314,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -13936,7 +15335,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -13949,7 +15348,7 @@ def list_deployments_slot( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -13965,6 +15364,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13978,6 +15379,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -13990,6 +15392,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14007,7 +15410,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14021,7 +15428,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -14034,7 +15441,7 @@ async def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -14056,6 +15463,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -14063,12 +15472,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14083,7 +15497,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -14098,7 +15512,7 @@ async def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -14122,6 +15536,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -14132,6 +15547,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -14139,7 +15555,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14154,11 +15574,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14168,7 +15588,7 @@ async def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -14190,6 +15610,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -14197,12 +15619,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14213,7 +15640,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -14227,7 +15654,7 @@ async def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -14250,6 +15677,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -14257,12 +15686,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14277,7 +15711,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -14292,8 +15726,8 @@ async def discover_backup_slot( """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. + 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 @@ -14316,6 +15750,7 @@ async def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -14325,6 +15760,7 @@ async def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -14332,7 +15768,11 @@ async def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14347,7 +15787,7 @@ async def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -14360,7 +15800,7 @@ def list_domain_ownership_identifiers_slot( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -14376,6 +15816,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14389,6 +15831,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -14401,6 +15844,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14418,7 +15862,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14432,7 +15880,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -14445,7 +15893,7 @@ async def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -14467,6 +15915,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -14474,12 +15924,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14494,7 +15949,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14509,8 +15964,7 @@ async def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -14534,6 +15988,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -14544,6 +15999,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -14551,7 +16007,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14566,11 +16026,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14580,7 +16040,7 @@ async def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -14602,6 +16062,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -14609,12 +16071,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14625,7 +16092,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14640,8 +16107,7 @@ async def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -14665,6 +16131,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -14675,6 +16142,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -14682,7 +16150,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14697,7 +16169,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -14710,7 +16182,7 @@ async def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -14729,18 +16201,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14755,7 +16234,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -14772,6 +16251,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -14781,6 +16261,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -14788,7 +16269,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -14804,7 +16289,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -14818,7 +16303,7 @@ async def begin_create_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -14841,8 +16326,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -14855,6 +16341,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -14879,10 +16366,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -14894,7 +16380,7 @@ async def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -14913,18 +16399,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14941,7 +16434,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -14954,7 +16447,7 @@ def list_instance_functions_slot( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -14969,6 +16462,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14982,6 +16477,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -14994,6 +16490,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15011,7 +16508,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15025,7 +16526,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -15037,7 +16538,7 @@ async def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -15056,18 +16557,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15082,7 +16590,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -15096,7 +16604,7 @@ async def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -15117,6 +16625,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -15124,12 +16634,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15146,7 +16661,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -15164,6 +16679,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -15174,6 +16690,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -15181,7 +16698,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -15195,7 +16716,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -15210,7 +16731,7 @@ async def begin_create_instance_function_slot( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -15235,8 +16756,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -15250,6 +16772,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15274,13 +16797,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15290,7 +16812,7 @@ async def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -15311,6 +16833,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -15318,12 +16842,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15334,7 +16863,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -15350,7 +16879,7 @@ async def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -15375,6 +16904,7 @@ async def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -15386,6 +16916,7 @@ async def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -15393,7 +16924,11 @@ async def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -15412,11 +16947,11 @@ async def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret_slot( + async def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15427,7 +16962,7 @@ async def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -15450,6 +16985,8 @@ async def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -15458,12 +16995,17 @@ async def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15474,7 +17016,7 @@ async def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -15488,7 +17030,7 @@ async def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -15509,6 +17051,8 @@ async def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -15516,12 +17060,17 @@ async def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15536,7 +17085,7 @@ async def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -15550,7 +17099,7 @@ async def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -15571,6 +17120,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -15578,12 +17129,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15598,7 +17154,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -15611,7 +17167,7 @@ async def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -15630,18 +17186,25 @@ async def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15656,11 +17219,11 @@ async def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status_slot( + async def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15669,7 +17232,7 @@ async def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -15688,18 +17251,25 @@ async def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -15710,11 +17280,11 @@ async def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions_slot( + async def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15723,7 +17293,7 @@ async def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -15742,18 +17312,25 @@ async def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -15764,7 +17341,7 @@ async def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace_async @@ -15780,7 +17357,7 @@ async def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -15805,6 +17382,7 @@ async def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -15816,6 +17394,7 @@ async def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -15823,7 +17402,11 @@ async def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -15842,11 +17425,11 @@ async def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret_slot( + async def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15857,7 +17440,7 @@ async def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -15880,6 +17463,8 @@ async def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -15888,12 +17473,17 @@ async def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -15904,7 +17494,7 @@ async def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -15917,7 +17507,7 @@ def list_host_name_bindings_slot( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -15933,6 +17523,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15946,6 +17538,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -15958,6 +17551,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15975,7 +17569,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15989,7 +17587,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -16002,7 +17600,7 @@ async def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -16024,6 +17622,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -16031,12 +17631,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16051,7 +17656,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -16066,7 +17671,7 @@ async def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -16091,6 +17696,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -16101,6 +17707,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -16108,7 +17715,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16123,11 +17734,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16137,7 +17748,7 @@ async def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -16159,6 +17770,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -16166,12 +17779,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16182,7 +17800,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -16197,7 +17815,7 @@ async def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -16220,6 +17838,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -16228,12 +17848,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16248,7 +17873,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16264,7 +17889,7 @@ async def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -16289,6 +17914,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -16300,6 +17926,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -16307,7 +17934,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16322,11 +17953,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16337,7 +17968,7 @@ async def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -16360,6 +17991,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -16368,12 +18001,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16384,7 +18022,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16400,7 +18038,7 @@ async def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -16425,6 +18063,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -16436,6 +18075,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -16443,7 +18083,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16458,7 +18102,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -16471,7 +18115,7 @@ async def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -16490,18 +18134,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16516,7 +18167,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -16529,8 +18180,7 @@ async def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -16550,18 +18200,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16576,7 +18233,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -16590,7 +18247,7 @@ async def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -16612,6 +18269,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -16619,12 +18278,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16639,7 +18303,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -16654,8 +18318,7 @@ async def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -16679,6 +18342,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -16689,6 +18353,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -16696,7 +18361,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16711,11 +18380,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16725,7 +18394,7 @@ async def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -16747,6 +18416,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -16754,12 +18425,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16770,7 +18446,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -16785,8 +18461,7 @@ async def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -16810,6 +18485,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -16820,6 +18496,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -16827,7 +18504,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16842,7 +18523,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -16855,7 +18536,7 @@ def list_instance_identifiers_slot( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -16871,6 +18552,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16884,6 +18567,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -16896,6 +18580,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16913,7 +18598,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16927,7 +18616,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_info_slot( @@ -16940,7 +18629,7 @@ async def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -16962,6 +18651,8 @@ async def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -16969,12 +18660,17 @@ async def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16989,7 +18685,7 @@ async def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -17003,7 +18699,7 @@ async def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -17024,6 +18720,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -17031,12 +18729,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17051,7 +18754,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -17069,6 +18772,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -17079,6 +18783,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -17086,7 +18791,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -17102,7 +18811,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -17117,7 +18826,7 @@ async def begin_create_instance_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -17142,8 +18851,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -17157,6 +18867,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -17181,10 +18892,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -17197,7 +18907,7 @@ async def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -17218,6 +18928,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -17225,12 +18937,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17247,7 +18964,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -17262,8 +18979,8 @@ def list_instance_processes_slot( """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. + 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 @@ -17282,6 +18999,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17296,6 +19015,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -17309,6 +19029,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17326,7 +19047,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17340,7 +19065,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -17354,8 +19079,7 @@ async def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -17380,6 +19104,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -17388,12 +19114,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17410,11 +19141,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17426,8 +19157,8 @@ async def delete_instance_process_slot( """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. + 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 @@ -17452,6 +19183,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -17460,12 +19193,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -17476,7 +19214,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -17491,8 +19229,7 @@ async def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -17517,6 +19254,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -17525,12 +19264,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17547,7 +19291,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -17563,8 +19307,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -17585,6 +19329,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17600,6 +19346,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -17614,6 +19361,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17631,7 +19379,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17645,7 +19397,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -17660,8 +19412,7 @@ async def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -17688,6 +19439,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -17697,12 +19450,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17719,7 +19477,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -17734,8 +19492,7 @@ def list_instance_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -17756,6 +19513,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17771,6 +19530,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -17785,6 +19545,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17802,7 +19563,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17816,7 +19581,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable_slot( @@ -17828,7 +19593,7 @@ async def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -17848,18 +19613,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17874,7 +19646,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -17887,7 +19659,7 @@ def list_site_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -17903,6 +19675,8 @@ def list_site_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17916,6 +19690,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -17928,6 +19703,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17945,7 +19721,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17959,7 +19739,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers_slot( @@ -17971,7 +19751,7 @@ async def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -17990,18 +19770,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18016,7 +19803,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace_async @@ -18030,8 +19817,8 @@ async def get_migrate_my_sql_status_slot( """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. + 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 @@ -18050,18 +19837,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18076,7 +19870,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -18089,7 +19883,7 @@ async def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -18109,18 +19903,25 @@ async def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18135,7 +19936,7 @@ async def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18152,9 +19953,9 @@ async def create_or_update_swift_virtual_network_connection_slot( 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 + 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. @@ -18177,6 +19978,7 @@ async def create_or_update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -18186,6 +19988,7 @@ async def create_or_update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_slot.metadata['url'], @@ -18193,7 +19996,11 @@ async def create_or_update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18208,11 +20015,11 @@ async def create_or_update_swift_virtual_network_connection_slot( 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'} # type: ignore + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network_slot( + async def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18221,7 +20028,7 @@ async def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -18241,18 +20048,25 @@ async def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18263,7 +20077,7 @@ async def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18280,9 +20094,9 @@ async def update_swift_virtual_network_connection_slot( 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 + 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. @@ -18305,6 +20119,7 @@ async def update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -18314,6 +20129,7 @@ async def update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_slot.metadata['url'], @@ -18321,7 +20137,11 @@ async def update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18336,7 +20156,7 @@ async def update_swift_virtual_network_connection_slot( return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -18350,7 +20170,7 @@ async def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -18372,6 +20192,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -18379,12 +20201,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18401,7 +20228,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -18415,8 +20242,7 @@ async def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18438,6 +20264,8 @@ async def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -18445,12 +20273,17 @@ async def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18469,7 +20302,7 @@ async def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -18485,7 +20318,7 @@ async def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -18493,11 +20326,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -18510,12 +20343,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18524,7 +20360,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18539,7 +20379,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_slot_initial( @@ -18558,12 +20398,15 @@ async def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -18572,7 +20415,11 @@ async def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18590,7 +20437,7 @@ async def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -18606,7 +20453,7 @@ async def begin_start_web_site_network_trace_operation_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -18614,11 +20461,11 @@ async def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -18634,7 +20481,8 @@ async def begin_start_web_site_network_trace_operation_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -18649,6 +20497,7 @@ async def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -18672,13 +20521,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace_slot( + async def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18687,7 +20535,7 @@ async def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -18706,18 +20554,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18728,7 +20583,7 @@ async def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -18742,8 +20597,7 @@ async def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18765,6 +20619,8 @@ async def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -18772,12 +20628,17 @@ async def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18792,7 +20653,7 @@ async def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -18806,8 +20667,7 @@ async def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18829,6 +20689,8 @@ async def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -18836,12 +20698,17 @@ async def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -18860,7 +20727,7 @@ async def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -18874,8 +20741,7 @@ async def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -18897,6 +20763,8 @@ async def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -18904,12 +20772,17 @@ async def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18924,11 +20797,11 @@ async def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18937,8 +20810,7 @@ async def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -18958,18 +20830,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18980,7 +20859,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -18994,7 +20873,7 @@ def list_perf_mon_counters_slot( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -19004,7 +20883,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -19013,6 +20892,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19026,6 +20907,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -19039,6 +20921,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -19057,7 +20940,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19071,7 +20958,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -19083,7 +20970,7 @@ async def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -19102,18 +20989,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19128,7 +21022,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -19141,7 +21035,7 @@ async def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -19161,18 +21055,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19187,7 +21088,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -19201,7 +21102,7 @@ async def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -19223,6 +21124,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -19230,12 +21133,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19250,7 +21158,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19265,7 +21173,7 @@ async def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -19289,6 +21197,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -19299,6 +21208,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -19306,7 +21216,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19321,11 +21235,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19335,7 +21249,7 @@ async def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -19357,6 +21271,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -19364,12 +21280,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19380,7 +21301,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19395,7 +21316,7 @@ async def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -19419,6 +21340,7 @@ async def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -19429,6 +21351,7 @@ async def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -19436,7 +21359,11 @@ async def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19451,7 +21378,7 @@ async def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -19465,8 +21392,8 @@ async def get_private_access_slot( """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. + 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 @@ -19485,18 +21412,25 @@ async def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19511,7 +21445,7 @@ async def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -19526,8 +21460,8 @@ async def put_private_access_vnet_slot( """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. + 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 @@ -19548,6 +21482,7 @@ async def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -19557,6 +21492,7 @@ async def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -19564,7 +21500,11 @@ async def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19579,7 +21519,7 @@ async def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -19592,7 +21532,7 @@ async def get_private_endpoint_connection( ) -> "_models.PrivateEndpointConnectionResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19611,18 +21551,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19637,7 +21584,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -19654,6 +21601,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -19663,6 +21611,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -19670,7 +21619,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19688,7 +21641,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -19702,7 +21655,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.PrivateEndpointConnectionResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -19727,8 +21680,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.PrivateEndpointConnectionResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -19741,6 +21695,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19765,10 +21720,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -19783,18 +21737,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -19815,7 +21776,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -19828,7 +21789,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19848,7 +21809,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -19860,6 +21822,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -19883,10 +21846,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -19897,7 +21859,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -19914,17 +21876,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19939,7 +21908,7 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -19953,8 +21922,8 @@ def list_processes_slot( """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. + 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 @@ -19970,6 +21939,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19983,6 +21954,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -19995,6 +21967,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20012,7 +21985,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20026,7 +22003,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -20039,8 +22016,7 @@ async def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -20062,6 +22038,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -20069,12 +22047,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20091,11 +22074,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20106,8 +22089,8 @@ async def delete_process_slot( """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. + 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 @@ -20129,6 +22112,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -20136,12 +22121,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20152,7 +22142,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -20166,8 +22156,7 @@ async def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -20189,6 +22178,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -20196,12 +22187,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20218,7 +22214,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -20233,8 +22229,8 @@ def list_process_modules_slot( """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. + 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 @@ -20252,6 +22248,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20266,6 +22264,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -20279,6 +22278,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20296,7 +22296,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20310,7 +22314,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -20324,8 +22328,7 @@ async def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -20349,6 +22352,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -20357,12 +22362,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20379,7 +22389,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -20393,8 +22403,7 @@ def list_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -20412,6 +22421,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20426,6 +22437,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -20439,6 +22451,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20456,7 +22469,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20470,7 +22487,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -20482,7 +22499,7 @@ def list_public_certificates_slot( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -20498,6 +22515,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20511,6 +22530,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -20523,6 +22543,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20540,7 +22561,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20554,7 +22579,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -20567,7 +22592,7 @@ async def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -20589,6 +22614,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -20596,12 +22623,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20616,7 +22648,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -20631,7 +22663,7 @@ async def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -20656,6 +22688,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -20666,6 +22699,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -20673,7 +22707,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20688,11 +22726,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20702,7 +22740,7 @@ async def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -20724,6 +22762,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -20731,12 +22771,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20747,7 +22792,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -20761,7 +22806,7 @@ async def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -20785,6 +22830,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -20794,6 +22840,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -20801,7 +22848,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20816,11 +22867,11 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20830,8 +22881,8 @@ async def reset_slot_configuration_slot( """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. + 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 @@ -20851,18 +22902,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20873,11 +22931,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20888,7 +22946,7 @@ async def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -20898,10 +22956,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -20914,12 +22973,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -20927,7 +22989,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20938,10 +23004,10 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - async def _restore_from_backup_blob_slot_initial( + async def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20955,6 +23021,7 @@ async def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -20964,6 +23031,7 @@ async def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -20971,7 +23039,11 @@ async def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20981,11 +23053,11 @@ async def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob_slot( + async def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20995,7 +23067,7 @@ async def begin_restore_from_backup_blob_slot( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -21018,8 +23090,9 @@ async def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21032,6 +23105,7 @@ async def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21053,12 +23127,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_slot_initial( + async def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21072,6 +23145,7 @@ async def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -21081,6 +23155,7 @@ async def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -21088,7 +23163,11 @@ async def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21098,11 +23177,11 @@ async def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app_slot( + async def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21112,7 +23191,7 @@ async def begin_restore_from_deleted_app_slot( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -21134,8 +23213,9 @@ async def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21148,6 +23228,7 @@ async def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21169,12 +23250,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_slot_initial( + async def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21188,6 +23268,7 @@ async def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -21197,6 +23278,7 @@ async def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -21204,7 +23286,11 @@ async def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21214,11 +23300,11 @@ async def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot_slot( + async def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21228,7 +23314,7 @@ async def begin_restore_snapshot_slot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -21251,8 +23337,9 @@ async def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21265,6 +23352,7 @@ async def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21286,10 +23374,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -21301,7 +23388,7 @@ def list_site_extensions_slot( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -21317,6 +23404,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21330,6 +23419,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -21342,6 +23432,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21359,7 +23450,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21373,7 +23468,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -21386,7 +23481,7 @@ async def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -21408,6 +23503,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -21415,12 +23512,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21437,7 +23539,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -21454,6 +23556,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -21461,12 +23565,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -21485,7 +23594,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -21499,7 +23608,7 @@ async def begin_install_site_extension_slot( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -21524,7 +23633,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -21537,6 +23647,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -21560,13 +23671,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21576,7 +23686,7 @@ async def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -21598,6 +23708,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -21605,12 +23717,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21621,10 +23738,10 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore - async def _copy_slot_initial( + async def _copy_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21638,6 +23755,7 @@ async def _copy_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -21647,6 +23765,7 @@ async def _copy_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_slot_initial.metadata['url'], @@ -21654,7 +23773,11 @@ async def _copy_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21664,11 +23787,11 @@ async def _copy_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + _copy_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace_async - async def begin_copy_slot( + async def begin_copy_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21678,7 +23801,7 @@ async def begin_copy_slot( ) -> AsyncLROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -21702,8 +23825,9 @@ async def begin_copy_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21716,6 +23840,7 @@ async def begin_copy_slot( name=name, slot=slot, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21737,10 +23862,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + begin_copy_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace def list_slot_differences_slot( @@ -21753,7 +23877,7 @@ def list_slot_differences_slot( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -21771,6 +23895,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -21787,6 +23912,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -21802,6 +23928,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -21821,7 +23948,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21835,9 +23966,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21851,6 +23982,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -21860,6 +23992,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -21867,7 +24000,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21877,11 +24014,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21891,7 +24028,7 @@ async def begin_swap_slot( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -21914,8 +24051,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -21928,6 +24066,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21949,10 +24088,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -21964,7 +24102,7 @@ def list_snapshots_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -21978,6 +24116,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21991,6 +24131,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -22003,6 +24144,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22020,7 +24162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22034,7 +24180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -22046,7 +24192,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -22060,6 +24206,8 @@ def list_snapshots_from_dr_secondary_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22073,6 +24221,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -22085,6 +24234,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22102,7 +24252,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22116,7 +24270,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -22128,7 +24282,7 @@ async def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -22148,18 +24302,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22181,7 +24342,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -22198,6 +24359,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -22207,6 +24369,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -22214,7 +24377,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22235,7 +24402,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -22249,7 +24416,7 @@ async def begin_create_or_update_source_control_slot( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -22274,8 +24441,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -22288,6 +24456,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22312,13 +24481,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22327,7 +24495,7 @@ async def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -22347,18 +24515,25 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -22369,7 +24544,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -22383,7 +24558,7 @@ async def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -22405,6 +24580,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -22414,6 +24590,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -22421,7 +24598,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -22443,11 +24624,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22456,7 +24637,7 @@ async def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -22476,18 +24657,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22498,7 +24686,7 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore async def _start_network_trace_slot_initial( @@ -22517,12 +24705,15 @@ async def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -22531,7 +24722,11 @@ async def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22549,7 +24744,7 @@ async def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -22565,7 +24760,7 @@ async def begin_start_network_trace_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -22573,11 +24768,11 @@ async def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -22593,7 +24788,8 @@ async def begin_start_network_trace_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -22608,6 +24804,7 @@ async def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -22631,13 +24828,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22646,7 +24842,7 @@ async def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -22666,18 +24862,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22688,11 +24891,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace_slot( + async def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22701,7 +24904,7 @@ async def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -22720,18 +24923,25 @@ async def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22742,11 +24952,11 @@ async def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22755,7 +24965,7 @@ async def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -22774,18 +24984,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22796,11 +25013,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22809,7 +25026,7 @@ async def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -22828,18 +25045,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -22850,7 +25074,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -22863,7 +25087,7 @@ def list_triggered_web_jobs_slot( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -22879,6 +25103,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22892,6 +25118,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -22904,6 +25131,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22921,7 +25149,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22935,7 +25167,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -22948,7 +25180,7 @@ async def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -22970,6 +25202,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -22977,12 +25211,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22999,11 +25238,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23013,7 +25252,7 @@ async def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -23035,6 +25274,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -23042,12 +25283,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23058,7 +25304,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -23072,7 +25318,7 @@ def list_triggered_web_job_history_slot( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -23090,6 +25336,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23104,6 +25352,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -23117,6 +25366,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23134,7 +25384,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23148,7 +25402,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -23162,8 +25416,7 @@ async def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -23187,6 +25440,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -23195,12 +25450,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23217,11 +25477,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23231,7 +25491,7 @@ async def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -23253,6 +25513,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -23260,12 +25522,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23276,7 +25543,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -23290,7 +25557,7 @@ def list_usages_slot( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -23302,7 +25569,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -23311,6 +25578,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23324,6 +25593,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -23337,6 +25607,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -23355,7 +25626,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23369,7 +25644,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -23381,7 +25656,7 @@ async def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -23401,18 +25676,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23427,7 +25709,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -23441,7 +25723,7 @@ async def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -23463,6 +25745,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -23470,12 +25754,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23490,7 +25779,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23506,8 +25795,8 @@ async def create_or_update_vnet_connection_slot( """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). + 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 @@ -23531,6 +25820,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -23541,6 +25831,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -23548,7 +25839,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23563,11 +25858,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23577,8 +25872,7 @@ async def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -23600,6 +25894,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -23607,12 +25903,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23623,7 +25924,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23639,8 +25940,8 @@ async def update_vnet_connection_slot( """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). + 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 @@ -23664,6 +25965,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -23674,6 +25976,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -23681,7 +25984,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23696,7 +26003,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -23711,7 +26018,7 @@ async def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -23735,6 +26042,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -23743,12 +26052,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23765,7 +26079,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -23781,7 +26095,7 @@ async def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -23807,6 +26121,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -23818,6 +26133,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -23825,7 +26141,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23840,7 +26160,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -23856,7 +26176,7 @@ async def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -23882,6 +26202,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -23893,6 +26214,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -23900,7 +26222,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23915,7 +26241,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -23928,7 +26254,7 @@ def list_web_jobs_slot( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -23943,6 +26269,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23956,6 +26284,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -23968,6 +26297,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23985,7 +26315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23999,7 +26333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -24012,7 +26346,7 @@ async def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -24034,6 +26368,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -24041,12 +26377,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24061,7 +26402,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -24074,7 +26415,7 @@ def list_slot_differences_from_production( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -24089,6 +26430,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -24104,6 +26446,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -24118,6 +26461,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -24137,7 +26481,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24151,9 +26499,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24166,6 +26514,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -24174,6 +26523,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -24181,7 +26531,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24191,11 +26545,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24204,7 +26558,7 @@ async def begin_swap_slot_with_production( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -24224,8 +26578,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24237,6 +26592,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24258,10 +26614,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -24272,7 +26627,7 @@ def list_snapshots( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -24284,6 +26639,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24296,6 +26653,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -24307,6 +26665,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24324,7 +26683,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24338,7 +26701,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -24349,7 +26712,7 @@ def list_snapshots_from_dr_secondary( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -24361,6 +26724,8 @@ def list_snapshots_from_dr_secondary( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24373,6 +26738,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -24384,6 +26750,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24401,7 +26768,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24415,7 +26786,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control( @@ -24426,7 +26797,7 @@ async def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -24443,17 +26814,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24475,7 +26853,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -24491,6 +26869,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -24499,6 +26878,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -24506,7 +26886,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24527,7 +26911,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -24540,7 +26924,7 @@ async def begin_create_or_update_source_control( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -24562,8 +26946,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -24575,6 +26960,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24599,13 +26985,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24613,7 +26998,7 @@ async def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -24630,17 +27015,24 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -24651,7 +27043,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -24664,7 +27056,7 @@ async def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -24683,6 +27075,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -24691,6 +27084,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -24698,7 +27092,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -24720,11 +27118,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24732,7 +27130,7 @@ async def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -24749,17 +27147,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24770,7 +27175,7 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore async def _start_network_trace_initial( @@ -24788,11 +27193,14 @@ async def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -24801,7 +27209,11 @@ async def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24819,7 +27231,7 @@ async def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -24834,17 +27246,17 @@ async def begin_start_network_trace( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -24860,7 +27272,8 @@ async def begin_start_network_trace( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -24874,6 +27287,7 @@ async def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -24897,13 +27311,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24911,7 +27324,7 @@ async def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -24928,17 +27341,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24949,11 +27369,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace( + async def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24961,7 +27381,7 @@ async def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -24978,17 +27398,24 @@ async def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24999,11 +27426,11 @@ async def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25011,7 +27438,7 @@ async def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -25028,17 +27455,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25049,11 +27483,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25061,7 +27495,7 @@ async def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -25078,17 +27512,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -25099,7 +27540,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -25111,7 +27552,7 @@ def list_triggered_web_jobs( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -25124,6 +27565,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25136,6 +27579,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -25147,6 +27591,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25164,7 +27609,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25178,7 +27627,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -25190,7 +27639,7 @@ async def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -25209,18 +27658,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25237,11 +27693,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25250,7 +27706,7 @@ async def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -25269,18 +27725,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -25291,7 +27754,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -25304,7 +27767,7 @@ def list_triggered_web_job_history( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -25319,6 +27782,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25332,6 +27797,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -25344,6 +27810,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25361,7 +27828,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25375,7 +27846,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -25388,8 +27859,7 @@ async def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -25410,6 +27880,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -25417,12 +27889,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25439,11 +27916,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25452,7 +27929,7 @@ async def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -25471,18 +27948,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25493,7 +27977,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -25506,7 +27990,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -25515,7 +27999,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -25524,6 +28008,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25536,6 +28022,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -25548,6 +28035,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -25566,7 +28054,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25580,7 +28072,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -25591,7 +28083,7 @@ async def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -25608,17 +28100,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25633,7 +28132,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -25646,7 +28145,7 @@ async def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -25665,18 +28164,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25691,7 +28197,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25706,8 +28212,8 @@ async def create_or_update_vnet_connection( """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). + 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 @@ -25728,6 +28234,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -25737,6 +28244,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -25744,7 +28252,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25759,11 +28271,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25772,8 +28284,7 @@ async def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -25792,18 +28303,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25814,7 +28332,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25829,8 +28347,8 @@ async def update_vnet_connection( """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). + 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 @@ -25851,6 +28369,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -25860,6 +28379,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -25867,7 +28387,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25882,7 +28406,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25896,7 +28420,7 @@ async def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -25917,6 +28441,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -25924,12 +28450,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25946,7 +28477,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25961,7 +28492,7 @@ async def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -25984,6 +28515,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25994,6 +28526,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -26001,7 +28534,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26016,7 +28553,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -26031,7 +28568,7 @@ async def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -26054,6 +28591,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -26064,6 +28602,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -26071,7 +28610,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26086,7 +28629,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -26098,7 +28641,7 @@ def list_web_jobs( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -26110,6 +28653,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26122,6 +28667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -26133,6 +28679,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26150,7 +28697,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26164,7 +28715,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -26176,7 +28727,7 @@ async def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -26195,18 +28746,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26221,5 +28779,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_site_management_client_operations.py index 7f4e118b061c..dad7a55d6641 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -33,7 +32,7 @@ async def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -68,7 +74,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -79,7 +85,7 @@ async def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2020_09_01.models.User @@ -94,11 +100,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -106,7 +114,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +133,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -131,7 +143,7 @@ def list_source_controls( ) -> AsyncIterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -140,6 +152,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -149,6 +163,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -157,6 +172,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -174,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -188,7 +208,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -198,7 +218,7 @@ async def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -213,15 +233,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -236,7 +263,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -248,7 +275,7 @@ async def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -265,12 +292,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -278,7 +307,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -293,7 +326,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -305,11 +338,11 @@ def list_billing_meters( ) -> AsyncIterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -318,6 +351,8 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -328,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -339,6 +375,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -358,7 +395,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -372,7 +413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace_async async def check_name_availability( @@ -384,13 +425,13 @@ async def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -403,6 +444,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -410,6 +452,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -417,7 +460,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -432,7 +479,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace_async @@ -442,7 +489,7 @@ async def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -455,15 +502,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -478,7 +532,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -492,18 +546,18 @@ def list_geo_regions( ) -> AsyncIterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -511,6 +565,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -521,6 +577,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -534,6 +591,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -555,7 +613,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -569,7 +631,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -579,7 +641,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> AsyncIterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier @@ -590,6 +652,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -603,6 +666,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -615,6 +679,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -634,7 +699,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -648,7 +717,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -657,7 +726,7 @@ def list_premier_add_on_offers( ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -666,6 +735,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -676,6 +747,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -685,6 +757,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -702,7 +775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -716,7 +793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -725,7 +802,7 @@ async def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -738,15 +815,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -761,7 +845,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -773,8 +857,8 @@ async def verify_hosting_environment_vnet( """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. + 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 @@ -789,12 +873,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -802,7 +888,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -817,11 +907,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -829,7 +919,7 @@ async def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -846,6 +936,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -853,6 +944,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -860,7 +952,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -871,7 +967,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -883,7 +979,7 @@ async def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -900,6 +996,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -907,6 +1004,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -914,7 +1012,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -929,11 +1031,11 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -941,7 +1043,7 @@ async def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -958,6 +1060,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -965,6 +1068,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -972,7 +1076,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -983,5 +1091,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_certificate_orders_operations.py index 86495cb6f53b..5a11e21ac7ad 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,33 +68,33 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -105,30 +106,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -297,31 +301,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -333,10 +338,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -344,21 +350,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -373,12 +379,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -386,23 +392,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -416,10 +422,11 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -427,21 +434,21 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -456,12 +463,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -469,23 +476,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -501,35 +508,35 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -545,35 +552,35 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -586,31 +593,32 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -624,35 +632,35 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -668,35 +676,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -709,31 +717,32 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -744,31 +753,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -779,35 +789,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -836,7 +847,7 @@ def list( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -845,6 +856,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -855,6 +868,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -864,6 +878,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -881,7 +896,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -895,17 +914,17 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -921,12 +940,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -934,7 +955,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -945,7 +970,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -956,7 +981,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -967,6 +992,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -978,6 +1005,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -988,6 +1016,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1005,7 +1034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1019,7 +1052,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1030,7 +1063,7 @@ def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -1047,17 +1080,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1072,7 +1112,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1088,6 +1128,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1096,6 +1137,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1103,7 +1145,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1121,7 +1167,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1134,7 +1180,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -1157,8 +1203,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1170,6 +1217,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1194,13 +1242,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1208,7 +1255,7 @@ def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -1225,17 +1272,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1246,7 +1300,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1259,7 +1313,7 @@ def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -1279,6 +1333,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1287,6 +1342,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1294,7 +1350,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1313,7 +1373,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1325,7 +1385,7 @@ def list_certificates( ) -> Iterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -1338,6 +1398,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1350,6 +1412,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1361,6 +1424,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1378,7 +1442,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,7 +1460,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1404,7 +1472,7 @@ def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -1423,18 +1491,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1449,7 +1524,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1466,6 +1541,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1475,6 +1551,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1482,7 +1559,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1500,7 +1581,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1514,7 +1595,7 @@ def begin_create_or_update_certificate( ) -> LROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1538,8 +1619,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1552,6 +1634,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1576,13 +1659,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1591,7 +1673,7 @@ def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -1610,18 +1692,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1632,7 +1721,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1646,7 +1735,7 @@ def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1668,6 +1757,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1677,6 +1767,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1684,7 +1775,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1703,11 +1798,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1716,7 +1811,7 @@ def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -1736,6 +1831,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1744,6 +1840,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1751,7 +1848,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1762,11 +1863,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1775,7 +1876,7 @@ def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1795,6 +1896,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1803,6 +1905,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1810,7 +1913,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1821,11 +1928,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1833,7 +1940,7 @@ def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1850,17 +1957,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1871,11 +1985,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1884,7 +1998,7 @@ def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1903,6 +2017,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1911,6 +2026,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1918,7 +2034,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1929,7 +2049,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1942,7 +2062,7 @@ def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1961,6 +2081,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1969,6 +2090,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1976,7 +2098,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1991,11 +2117,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -2003,7 +2129,7 @@ def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -2020,17 +2146,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2041,7 +2174,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2053,7 +2186,7 @@ def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -2070,17 +2203,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2095,7 +2235,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2107,7 +2247,7 @@ def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -2124,17 +2264,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2149,5 +2296,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_environments_operations.py index 1ef1f6fcd6b4..617d5cf5ffd0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,33 +183,34 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -296,31 +301,32 @@ def build_get_vip_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -334,35 +340,35 @@ def build_change_vnet_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -375,31 +381,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -411,10 +418,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -422,21 +430,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -447,31 +455,32 @@ def build_get_inbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -482,31 +491,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -517,31 +527,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -555,35 +566,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -599,35 +610,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -641,10 +652,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -652,21 +664,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -677,31 +689,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -712,31 +725,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -747,31 +761,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -782,31 +797,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -817,31 +833,32 @@ def build_get_outbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -852,31 +869,32 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -887,31 +905,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -922,31 +941,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -959,33 +979,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -996,31 +1017,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1033,33 +1055,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1070,31 +1093,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1106,10 +1130,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1117,21 +1142,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1146,12 +1171,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1159,23 +1184,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1192,12 +1217,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1205,23 +1230,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1236,10 +1261,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1248,21 +1274,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1274,10 +1300,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1285,21 +1312,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1311,10 +1338,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1322,21 +1350,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1348,10 +1376,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1359,25 +1388,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1406,7 +1435,7 @@ def list( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -1415,6 +1444,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1425,6 +1456,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1434,6 +1466,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1451,7 +1484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1465,7 +1502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1475,7 +1512,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -1486,6 +1523,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1497,6 +1536,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1507,6 +1547,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1524,7 +1565,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1538,7 +1583,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1549,7 +1594,7 @@ def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -1566,17 +1611,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1591,7 +1643,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1607,6 +1659,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1615,6 +1668,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1622,7 +1676,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1643,7 +1701,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1656,7 +1714,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -1679,8 +1737,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1692,6 +1751,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1716,12 +1776,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1734,18 +1793,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -1755,11 +1821,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1768,7 +1834,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -1789,7 +1855,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1801,6 +1868,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1821,10 +1889,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -1836,7 +1903,7 @@ def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -1856,6 +1923,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -1864,6 +1932,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1871,7 +1940,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1893,7 +1966,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1905,7 +1978,7 @@ def list_capacities( ) -> Iterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -1918,6 +1991,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1930,6 +2005,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -1941,6 +2017,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1958,7 +2035,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1972,7 +2053,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def get_vip_info( @@ -1983,7 +2064,7 @@ def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -2000,17 +2081,24 @@ def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2025,7 +2113,7 @@ def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore def _change_vnet_initial( @@ -2041,6 +2129,7 @@ def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -2049,6 +2138,7 @@ def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -2056,7 +2146,11 @@ def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2074,7 +2168,7 @@ def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2087,7 +2181,7 @@ def begin_change_vnet( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -2110,6 +2204,7 @@ def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -2125,6 +2220,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -2139,6 +2235,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -2158,7 +2255,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2169,7 +2270,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2181,6 +2282,7 @@ def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2191,8 +2293,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -2208,10 +2309,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2223,7 +2323,7 @@ def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -2240,17 +2340,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2265,7 +2372,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2278,7 +2385,7 @@ def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -2297,18 +2404,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2323,7 +2437,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2335,8 +2449,7 @@ def get_inbound_network_dependencies_endpoints( ) -> Iterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -2349,6 +2462,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2361,6 +2476,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2372,6 +2488,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2389,7 +2506,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2403,7 +2524,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2414,7 +2535,7 @@ def list_multi_role_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -2426,6 +2547,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2438,6 +2561,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2449,6 +2573,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2466,7 +2591,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2480,7 +2609,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2491,7 +2620,7 @@ def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -2508,17 +2637,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2533,7 +2669,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2549,6 +2685,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2557,6 +2694,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2564,7 +2702,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2582,7 +2724,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2595,7 +2737,7 @@ def begin_create_or_update_multi_role_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -2616,8 +2758,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2629,6 +2772,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2653,10 +2797,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -2668,7 +2811,7 @@ def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -2687,6 +2830,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2695,6 +2839,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -2702,7 +2847,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2721,7 +2870,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2735,8 +2884,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -2751,6 +2900,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2764,6 +2915,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2776,6 +2928,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2793,7 +2946,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2807,7 +2964,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -2818,7 +2975,7 @@ def list_multi_role_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -2831,6 +2988,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2843,6 +3002,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -2854,6 +3014,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2871,7 +3032,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2885,7 +3050,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -2896,7 +3061,7 @@ def list_multi_role_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -2907,6 +3072,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2919,6 +3086,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -2930,6 +3098,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2947,7 +3116,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2961,7 +3134,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -2972,7 +3145,7 @@ def list_multi_role_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -2983,6 +3156,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2995,6 +3170,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3006,6 +3182,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3023,7 +3200,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3037,7 +3218,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3048,7 +3229,7 @@ def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -3065,17 +3246,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3090,7 +3278,7 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -3102,8 +3290,7 @@ def get_outbound_network_dependencies_endpoints( ) -> Iterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -3116,6 +3303,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3128,6 +3317,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -3139,6 +3329,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3156,7 +3347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3170,10 +3365,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3181,7 +3376,7 @@ def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -3198,17 +3393,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -3219,7 +3421,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -3234,17 +3436,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3262,7 +3471,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3274,7 +3483,7 @@ def begin_resume( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -3295,6 +3504,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3307,6 +3518,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -3318,6 +3530,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3335,7 +3548,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3346,7 +3563,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3357,6 +3574,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3366,8 +3584,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3383,10 +3600,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -3398,7 +3614,7 @@ def list_app_service_plans( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -3411,6 +3627,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3423,6 +3641,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -3434,6 +3653,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3451,7 +3671,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3465,7 +3689,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -3477,19 +3701,22 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3502,6 +3729,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -3514,6 +3742,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -3532,7 +3761,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3546,7 +3779,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -3560,17 +3793,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3588,7 +3828,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -3600,7 +3840,7 @@ def begin_suspend( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -3621,6 +3861,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3633,6 +3875,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -3644,6 +3887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3661,7 +3905,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3672,7 +3920,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -3683,6 +3931,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3692,8 +3941,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -3709,10 +3957,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -3725,7 +3972,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -3734,7 +3981,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -3743,6 +3990,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3755,6 +4004,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -3767,6 +4017,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -3785,7 +4036,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3799,7 +4054,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -3810,7 +4065,7 @@ def list_worker_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -3822,6 +4077,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3834,6 +4091,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -3845,6 +4103,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3862,7 +4121,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3876,7 +4139,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -3888,7 +4151,7 @@ def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -3907,18 +4170,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3933,7 +4203,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -3950,6 +4220,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3959,6 +4230,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -3966,7 +4238,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3984,7 +4260,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -3998,7 +4274,7 @@ def begin_create_or_update_worker_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -4021,8 +4297,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4035,6 +4312,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4059,10 +4337,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4075,7 +4352,7 @@ def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -4096,6 +4373,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4105,6 +4383,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4112,7 +4391,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4131,7 +4414,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4145,8 +4428,7 @@ def list_worker_pool_instance_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -4163,6 +4445,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4177,6 +4461,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4190,6 +4475,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4207,7 +4493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4221,7 +4511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -4233,7 +4523,7 @@ def list_web_worker_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -4248,6 +4538,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4261,6 +4553,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -4273,6 +4566,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4290,7 +4584,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4304,7 +4602,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -4316,7 +4614,7 @@ def list_worker_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -4329,6 +4627,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4342,6 +4642,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -4354,6 +4655,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4371,7 +4673,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4385,7 +4691,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -4397,7 +4703,7 @@ def list_web_worker_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -4410,6 +4716,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4423,6 +4731,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -4435,6 +4744,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4452,7 +4762,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4466,4 +4780,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_plans_operations.py index 73c8b17b7874..e7ec2e8ccd1d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,31 +185,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +303,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -310,21 +316,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -337,10 +343,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -349,21 +356,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -376,10 +383,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -388,21 +396,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -415,10 +423,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -427,21 +436,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -452,31 +461,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -487,31 +497,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -524,33 +535,34 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -565,37 +577,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,31 +619,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -643,33 +657,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -680,31 +695,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -716,10 +732,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -727,21 +744,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -754,10 +771,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -766,21 +784,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -796,12 +814,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -810,23 +828,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -840,10 +858,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -851,21 +870,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -878,10 +897,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -890,21 +910,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -920,12 +940,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -934,23 +954,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -965,10 +985,11 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -977,21 +998,21 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1028,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1021,23 +1042,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1051,10 +1072,11 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1062,25 +1084,25 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1110,7 +1132,7 @@ def list( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -1123,6 +1145,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1133,6 +1157,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1143,6 +1168,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1161,7 +1187,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1175,7 +1205,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1185,7 +1215,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -1196,6 +1226,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1207,6 +1239,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1217,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1234,7 +1268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1248,7 +1286,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1259,7 +1297,7 @@ def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -1276,17 +1314,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1303,7 +1348,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1319,6 +1364,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1327,6 +1373,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1334,7 +1381,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1352,7 +1403,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1365,7 +1416,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -1386,8 +1437,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1399,6 +1451,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1423,13 +1476,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1437,7 +1489,7 @@ def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -1454,17 +1506,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1475,7 +1534,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1488,7 +1547,7 @@ def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -1507,6 +1566,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1515,6 +1575,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1522,7 +1583,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1541,7 +1606,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1553,7 +1618,7 @@ def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -1570,17 +1635,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1595,7 +1667,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1609,7 +1681,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -1630,6 +1702,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1637,12 +1711,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1657,11 +1736,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1671,7 +1750,7 @@ def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -1692,6 +1771,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1699,12 +1780,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1715,7 +1801,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1729,7 +1815,7 @@ def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -1750,6 +1836,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1757,12 +1845,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1777,7 +1870,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1791,7 +1884,7 @@ def list_web_apps_by_hybrid_connection( ) -> Iterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -1806,6 +1899,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1820,6 +1915,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1833,6 +1929,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1850,7 +1947,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1864,7 +1965,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1875,7 +1976,7 @@ def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -1892,17 +1993,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1917,7 +2025,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1929,7 +2037,7 @@ def list_hybrid_connections( ) -> Iterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -1942,6 +2050,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1954,6 +2064,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -1965,6 +2076,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1982,7 +2094,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1996,10 +2112,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2008,7 +2124,7 @@ def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -2029,18 +2145,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2051,7 +2174,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2066,7 +2189,7 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -2074,18 +2197,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2098,6 +2224,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2112,6 +2239,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2132,7 +2260,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2146,7 +2278,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2157,7 +2289,7 @@ def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -2174,17 +2306,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2199,7 +2338,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2212,14 +2351,15 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2228,6 +2368,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2240,6 +2382,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2252,6 +2395,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2270,7 +2414,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2284,7 +2432,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2295,7 +2443,7 @@ def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -2312,17 +2460,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2337,7 +2492,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2350,7 +2505,7 @@ def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -2369,18 +2524,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2397,7 +2559,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2411,7 +2573,7 @@ def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -2432,6 +2594,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2439,12 +2603,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2459,7 +2628,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2474,7 +2643,7 @@ def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -2497,6 +2666,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2507,6 +2677,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2514,7 +2685,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2529,7 +2704,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2542,8 +2717,7 @@ def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -2562,18 +2736,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2588,7 +2769,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2602,7 +2783,7 @@ def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -2623,6 +2804,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2630,12 +2813,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2652,7 +2840,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2667,7 +2855,7 @@ def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2690,6 +2878,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2700,6 +2889,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2707,7 +2897,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2724,11 +2918,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2738,7 +2932,7 @@ def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -2759,6 +2953,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2766,12 +2962,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2782,7 +2983,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2797,7 +2998,7 @@ def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2820,6 +3021,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2830,6 +3032,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -2837,7 +3040,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2854,11 +3061,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2867,7 +3074,7 @@ def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -2886,18 +3093,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2908,5 +3122,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificate_registration_provider_operations.py index a6003cbcb9de..76f35672c36d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificates_operations.py index 581ef0ae8ff5..71a08c240103 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -135,35 +138,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,31 +179,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -214,35 +218,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -277,7 +281,7 @@ def list( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -285,6 +289,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -295,6 +301,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -304,6 +311,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -321,7 +329,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -335,7 +347,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -345,7 +357,7 @@ def list_by_resource_group( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -355,6 +367,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -366,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -376,6 +391,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -393,7 +409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -407,7 +427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -418,7 +438,7 @@ def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -435,17 +455,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,7 +487,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -473,7 +500,7 @@ def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -492,6 +519,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -500,6 +528,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -507,7 +536,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -522,11 +555,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -534,7 +567,7 @@ def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -551,17 +584,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -572,7 +612,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -585,7 +625,7 @@ def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -604,6 +644,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -612,6 +653,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -619,7 +661,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -634,5 +680,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_deleted_web_apps_operations.py index 23b14c5bf0e1..321d3c55ca10 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_get_deleted_web_app_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -153,7 +156,7 @@ def list( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -162,6 +165,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -172,6 +177,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -181,6 +187,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -198,7 +205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -222,7 +233,7 @@ def list_by_location( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -233,6 +244,8 @@ def list_by_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -244,6 +257,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -254,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -271,7 +286,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -285,7 +304,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace def get_deleted_web_app_by_location( @@ -296,7 +315,7 @@ def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -313,17 +332,24 @@ def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,5 +364,5 @@ def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_diagnostics_operations.py index 7c1dc1e18b07..2db7880f0c0c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -967,7 +989,7 @@ def list_hosting_environment_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1049,7 +1079,7 @@ def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -1057,11 +1087,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1074,12 +1104,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1088,7 +1121,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1103,7 +1140,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1115,7 +1152,7 @@ def list_site_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1128,6 +1165,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1140,6 +1179,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1151,6 +1191,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1168,7 +1209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1182,7 +1227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1197,7 +1242,7 @@ def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1205,11 +1250,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1222,12 +1267,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1236,7 +1284,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1303,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1263,7 +1315,7 @@ def list_site_diagnostic_categories( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1276,6 +1328,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1288,6 +1342,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1299,6 +1354,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1316,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1330,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1342,7 +1402,7 @@ def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1361,18 +1421,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1454,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1400,7 +1467,7 @@ def list_site_analyses( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1415,6 +1482,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1428,6 +1497,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1440,6 +1510,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1457,7 +1528,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,7 +1546,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1484,7 +1559,7 @@ def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1505,6 +1580,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1512,12 +1589,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1614,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1549,7 +1631,7 @@ def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1559,11 +1641,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1576,6 +1658,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1583,6 +1667,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1591,7 +1676,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1695,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1619,7 +1708,7 @@ def list_site_detectors( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1634,6 +1723,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1647,6 +1738,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1751,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1769,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1787,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1703,7 +1800,7 @@ def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1724,6 +1821,8 @@ def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -1731,12 +1830,17 @@ def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1751,7 +1855,7 @@ def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1768,7 +1872,7 @@ def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1778,11 +1882,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1795,6 +1899,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1802,6 +1908,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1810,7 +1917,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1825,7 +1936,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1838,7 +1949,7 @@ def list_site_detector_responses_slot( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1853,6 +1964,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1866,6 +1979,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1878,6 +1992,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1895,7 +2010,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1909,7 +2028,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1925,7 +2044,7 @@ def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1935,11 +2054,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1952,6 +2071,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1959,6 +2080,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1967,7 +2089,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1982,7 +2108,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1995,7 +2121,7 @@ def list_site_diagnostic_categories_slot( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -2010,6 +2136,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2023,6 +2151,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2164,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2182,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2200,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2079,7 +2213,7 @@ def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -2100,6 +2234,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2107,12 +2243,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2127,7 +2268,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2141,7 +2282,7 @@ def list_site_analyses_slot( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -2158,6 +2299,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2172,6 +2315,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2185,6 +2329,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2202,7 +2347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2216,7 +2365,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2230,7 +2379,7 @@ def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -2253,6 +2402,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2261,12 +2412,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2281,7 +2437,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2299,7 +2455,7 @@ def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2311,11 +2467,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2328,6 +2484,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2336,6 +2494,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2344,7 +2503,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2359,7 +2522,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2373,7 +2536,7 @@ def list_site_detectors_slot( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2390,6 +2553,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2404,6 +2569,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2417,6 +2583,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2434,7 +2601,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2448,7 +2619,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2462,7 +2633,7 @@ def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2485,6 +2656,8 @@ def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2493,12 +2666,17 @@ def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2513,7 +2691,7 @@ def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2531,7 +2709,7 @@ def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2543,11 +2721,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2560,6 +2738,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2568,6 +2748,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2576,7 +2757,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2591,5 +2776,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py index 6681d9e34ee7..a593d3f5856d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domains_operations.py index 02a784c57d07..6d59cf09ec40 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,33 +295,34 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,35 +336,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -372,31 +377,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -408,10 +414,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -419,21 +426,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -448,12 +455,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -461,23 +468,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -491,10 +498,11 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -502,21 +510,21 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -531,12 +539,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -544,23 +552,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -573,31 +581,32 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,7 +640,7 @@ def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier @@ -646,12 +655,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -659,7 +670,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +689,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -684,13 +699,15 @@ def list( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -701,6 +718,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -710,6 +728,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -727,7 +746,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -741,7 +764,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -750,7 +773,7 @@ def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -763,15 +786,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -786,7 +816,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -797,7 +827,7 @@ def list_recommendations( ) -> Iterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2020_09_01.models.DomainRecommendationSearchParameters @@ -808,6 +838,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -821,6 +852,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -833,6 +865,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -852,7 +885,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -866,7 +903,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -876,7 +913,7 @@ def list_by_resource_group( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -885,6 +922,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -896,6 +935,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -906,6 +946,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -923,7 +964,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,7 +982,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -948,7 +993,7 @@ def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -965,17 +1010,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -990,7 +1042,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -1006,6 +1058,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -1014,6 +1067,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1021,7 +1075,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1039,7 +1097,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1052,7 +1110,7 @@ def begin_create_or_update( ) -> LROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -1072,8 +1130,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1085,6 +1144,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1109,13 +1169,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1124,7 +1183,7 @@ def delete( ) -> None: """Delete a domain. - Description for 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 @@ -1144,18 +1203,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1166,7 +1232,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1179,7 +1245,7 @@ def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -1198,6 +1264,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1206,6 +1273,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1213,7 +1281,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1304,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1244,7 +1316,7 @@ def list_ownership_identifiers( ) -> Iterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -1257,6 +1329,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1269,6 +1343,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1280,6 +1355,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1297,7 +1373,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1311,7 +1391,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1323,7 +1403,7 @@ def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -1342,18 +1422,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,7 +1455,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1383,8 +1470,8 @@ def create_or_update_ownership_identifier( """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. + 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 @@ -1405,6 +1492,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1414,6 +1502,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1421,7 +1510,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1436,11 +1529,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1449,7 +1542,7 @@ def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -1468,18 +1561,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1490,7 +1590,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1505,8 +1605,8 @@ def update_ownership_identifier( """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. + 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 @@ -1527,6 +1627,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1536,6 +1637,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1543,7 +1645,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1558,11 +1664,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1570,7 +1676,7 @@ def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1587,17 +1693,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1608,5 +1721,5 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_provider_operations.py index 0a70dc13f6ce..12fc342ea1d9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum5"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,24 +59,25 @@ def build_get_available_stacks_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -86,31 +88,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum6"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -144,9 +147,9 @@ def get_available_stacks( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_09_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -155,6 +158,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +169,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -173,6 +179,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -191,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -205,7 +216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def list_operations( @@ -215,8 +226,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -224,6 +235,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -233,6 +246,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -241,6 +255,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -258,7 +273,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -272,7 +291,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -282,9 +301,9 @@ def get_available_stacks_on_prem( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_09_01.models.Enum6 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -293,6 +312,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -303,6 +324,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -313,6 +335,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -331,7 +354,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -345,4 +372,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_recommendations_operations.py index 90c8d53febcb..3b654a649182 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,29 +69,30 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -100,30 +102,31 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,36 @@ def build_list_history_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +183,36 @@ def build_list_recommended_rules_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,32 +225,33 @@ def build_disable_all_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,32 +264,33 @@ def build_reset_all_filters_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +305,11 @@ def build_get_rule_details_by_hosting_environment_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), @@ -309,25 +317,25 @@ def build_get_rule_details_by_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -341,10 +349,11 @@ def build_disable_recommendation_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -352,22 +361,22 @@ def build_disable_recommendation_for_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -381,35 +390,36 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -423,35 +433,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -462,31 +473,32 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -497,31 +509,32 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,10 +549,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -547,25 +561,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -577,10 +591,11 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -588,21 +603,21 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -637,14 +652,14 @@ def list( ) -> Iterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -653,6 +668,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -663,6 +680,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -674,6 +692,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -693,7 +712,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -707,16 +730,16 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -729,15 +752,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -748,19 +778,18 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -775,16 +804,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -795,7 +831,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -809,7 +845,7 @@ def list_history_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -820,7 +856,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -829,6 +865,8 @@ def list_history_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -841,6 +879,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -854,6 +893,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -873,7 +913,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -887,7 +931,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -900,7 +944,7 @@ def list_recommended_rules_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -910,7 +954,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -919,6 +963,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -931,6 +977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -944,6 +991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -963,7 +1011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,10 +1029,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_hosting_environment( + def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -989,7 +1041,7 @@ def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1008,18 +1060,25 @@ def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1030,11 +1089,11 @@ def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_hosting_environment( + def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1043,7 +1102,7 @@ def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1062,18 +1121,25 @@ def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1084,7 +1150,7 @@ def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1099,7 +1165,7 @@ def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1108,10 +1174,10 @@ def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1124,12 +1190,15 @@ def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -1137,7 +1206,11 @@ def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1152,11 +1225,11 @@ def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_hosting_environment( + def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1166,7 +1239,7 @@ def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1187,19 +1260,26 @@ def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,7 +1290,7 @@ def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -1224,7 +1304,7 @@ def list_history_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -1235,7 +1315,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1244,6 +1324,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1256,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -1269,6 +1352,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -1288,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1302,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -1315,7 +1403,7 @@ def list_recommended_rules_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -1325,7 +1413,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1334,6 +1422,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1346,6 +1436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -1359,6 +1450,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -1378,7 +1470,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,10 +1488,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1403,7 +1499,7 @@ def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1420,17 +1516,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1441,11 +1544,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1453,7 +1556,7 @@ def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1470,17 +1573,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1491,7 +1601,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1506,7 +1616,7 @@ def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1515,10 +1625,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1531,12 +1641,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -1544,7 +1657,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1559,11 +1676,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1572,7 +1689,7 @@ def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1591,18 +1708,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,5 +1737,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py index 51f7e5f5013a..100c3fc38987 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -262,7 +268,7 @@ def list( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -331,8 +345,7 @@ def list_by_resource_group( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -343,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -354,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -364,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -381,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -406,8 +427,7 @@ def list_by_site( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -420,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -432,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -443,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -460,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -474,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -485,7 +513,7 @@ def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -502,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -527,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -540,8 +575,7 @@ def list_by_site_slot( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -556,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -581,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -598,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -624,7 +666,7 @@ def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -643,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_static_sites_operations.py index c46f1aa00573..66835c974d42 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,34 +35,34 @@ def build_preview_workflow_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -105,30 +106,31 @@ def build_get_static_sites_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -298,10 +302,11 @@ def build_list_static_site_users_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -309,21 +314,21 @@ def build_list_static_site_users_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -336,10 +341,11 @@ def build_delete_static_site_user_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -348,21 +354,21 @@ def build_delete_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -378,12 +384,12 @@ def build_update_static_site_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -392,23 +398,23 @@ def build_update_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -421,31 +427,32 @@ def build_get_static_site_builds_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -457,10 +464,11 @@ def build_get_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -468,21 +476,21 @@ def build_get_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -494,10 +502,11 @@ def build_delete_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -505,21 +514,21 @@ def build_delete_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -534,12 +543,12 @@ def build_create_or_update_static_site_build_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -547,23 +556,23 @@ def build_create_or_update_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -577,10 +586,11 @@ def build_list_static_site_build_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -588,21 +598,21 @@ def build_list_static_site_build_functions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -614,10 +624,11 @@ def build_list_static_site_build_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -625,21 +636,21 @@ def build_list_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -653,35 +664,35 @@ def build_create_or_update_static_site_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -697,35 +708,35 @@ def build_create_user_roles_invitation_link_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -738,31 +749,32 @@ def build_list_static_site_custom_domains_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -774,10 +786,11 @@ def build_create_or_update_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -785,21 +798,21 @@ def build_create_or_update_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -811,10 +824,11 @@ def build_delete_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -822,21 +836,21 @@ def build_delete_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -848,10 +862,11 @@ def build_validate_custom_domain_can_be_added_to_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -859,21 +874,21 @@ def build_validate_custom_domain_can_be_added_to_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -884,31 +899,32 @@ def build_detach_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -919,31 +935,32 @@ def build_list_static_site_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -954,31 +971,32 @@ def build_list_static_site_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -989,31 +1007,32 @@ def build_list_static_site_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1027,41 +1046,41 @@ def build_reset_static_site_api_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs ) -class StaticSitesOperations(object): +class StaticSitesOperations(object): # pylint: disable=too-many-public-methods """StaticSitesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1092,7 +1111,7 @@ def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -1111,6 +1130,7 @@ def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -1118,6 +1138,7 @@ def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -1125,7 +1146,11 @@ def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1140,7 +1165,7 @@ def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -1150,7 +1175,7 @@ def list( ) -> Iterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -1158,6 +1183,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1168,6 +1195,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1177,6 +1205,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1194,7 +1223,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1208,7 +1241,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -1218,7 +1251,7 @@ def get_static_sites_by_resource_group( ) -> Iterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -1228,6 +1261,8 @@ def get_static_sites_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1239,6 +1274,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1249,6 +1285,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1266,7 +1303,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1280,7 +1321,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_site( @@ -1291,7 +1332,7 @@ def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -1308,17 +1349,24 @@ def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1333,7 +1381,7 @@ def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1346,8 +1394,7 @@ def create_or_update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -1366,6 +1413,7 @@ def create_or_update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -1374,6 +1422,7 @@ def create_or_update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site.metadata['url'], @@ -1381,7 +1430,11 @@ def create_or_update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1400,11 +1453,11 @@ def create_or_update_static_site( return deserialized - create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace - def delete_static_site( + def delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1412,7 +1465,7 @@ def delete_static_site( ) -> None: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1429,17 +1482,24 @@ def delete_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1450,7 +1510,7 @@ def delete_static_site( if cls: return cls(pipeline_response, None, {}) - delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1463,8 +1523,7 @@ def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -1483,6 +1542,7 @@ def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -1491,6 +1551,7 @@ def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -1498,7 +1559,11 @@ def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1517,7 +1582,7 @@ def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -1530,7 +1595,7 @@ def list_static_site_users( ) -> Iterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -1545,6 +1610,8 @@ def list_static_site_users( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1558,6 +1625,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -1570,6 +1638,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1587,7 +1656,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1601,10 +1674,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace - def delete_static_site_user( + def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1614,7 +1687,7 @@ def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -1635,6 +1708,8 @@ def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -1642,12 +1717,17 @@ def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1658,7 +1738,7 @@ def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -1673,7 +1753,7 @@ def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -1697,6 +1777,7 @@ def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -1707,6 +1788,7 @@ def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -1714,7 +1796,11 @@ def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1729,7 +1815,7 @@ def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -1741,7 +1827,7 @@ def get_static_site_builds( ) -> Iterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -1754,6 +1840,8 @@ def get_static_site_builds( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1766,6 +1854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -1777,6 +1866,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1794,7 +1884,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1808,7 +1902,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace def get_static_site_build( @@ -1820,7 +1914,7 @@ def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -1839,18 +1933,25 @@ def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1865,11 +1966,11 @@ def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace - def delete_static_site_build( + def delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1878,7 +1979,7 @@ def delete_static_site_build( ) -> None: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1897,18 +1998,25 @@ def delete_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_static_site_build_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1919,7 +2027,7 @@ def delete_static_site_build( if cls: return cls(pipeline_response, None, {}) - delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}'} # type: ignore + delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}"} # type: ignore @distributed_trace @@ -1933,7 +2041,7 @@ def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -1954,6 +2062,7 @@ def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1963,6 +2072,7 @@ def create_or_update_static_site_build_function_app_settings( name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -1970,7 +2080,11 @@ def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1989,7 +2103,7 @@ def create_or_update_static_site_build_function_app_settings( 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'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/config/functionappsettings"} # type: ignore @distributed_trace @@ -2002,7 +2116,7 @@ def list_static_site_build_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -2017,6 +2131,8 @@ def list_static_site_build_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2030,6 +2146,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -2042,6 +2159,7 @@ def prepare_request(next_link=None): name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2059,7 +2177,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2073,7 +2195,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/functions"} # type: ignore @distributed_trace def list_static_site_build_function_app_settings( @@ -2085,7 +2207,7 @@ def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2104,18 +2226,25 @@ def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, pr_id=pr_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2134,7 +2263,7 @@ def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{prId}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -2147,7 +2276,7 @@ def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -2166,6 +2295,7 @@ def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -2174,6 +2304,7 @@ def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -2181,7 +2312,11 @@ def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2200,7 +2335,7 @@ def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace @@ -2213,7 +2348,7 @@ def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -2233,6 +2368,7 @@ def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -2241,6 +2377,7 @@ def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -2248,7 +2385,11 @@ def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2263,7 +2404,7 @@ def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -2275,7 +2416,7 @@ def list_static_site_custom_domains( ) -> Iterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -2288,6 +2429,8 @@ def list_static_site_custom_domains( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2300,6 +2443,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -2311,6 +2455,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2328,7 +2473,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2342,7 +2491,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace def create_or_update_static_site_custom_domain( @@ -2354,8 +2503,7 @@ def create_or_update_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -2374,18 +2522,25 @@ def create_or_update_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_create_or_update_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.create_or_update_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2404,11 +2559,11 @@ def create_or_update_static_site_custom_domain( return deserialized - create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def delete_static_site_custom_domain( + def delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2417,7 +2572,7 @@ def delete_static_site_custom_domain( ) -> None: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2436,18 +2591,25 @@ def delete_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2458,11 +2620,11 @@ def delete_static_site_custom_domain( if cls: return cls(pipeline_response, None, {}) - delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def validate_custom_domain_can_be_added_to_static_site( + def validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2471,7 +2633,7 @@ def validate_custom_domain_can_be_added_to_static_site( ) -> None: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -2490,18 +2652,25 @@ def validate_custom_domain_can_be_added_to_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_validate_custom_domain_can_be_added_to_static_site_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.validate_custom_domain_can_be_added_to_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2512,11 +2681,11 @@ def validate_custom_domain_can_be_added_to_static_site( if cls: return cls(pipeline_response, None, {}) - validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace - def detach_static_site( + def detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2524,7 +2693,7 @@ def detach_static_site( ) -> None: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2541,17 +2710,24 @@ def detach_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_detach_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2562,7 +2738,7 @@ def detach_static_site( if cls: return cls(pipeline_response, None, {}) - detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace @@ -2574,7 +2750,7 @@ def list_static_site_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -2587,6 +2763,8 @@ def list_static_site_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2599,6 +2777,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -2610,6 +2789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2627,7 +2807,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2641,7 +2825,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace def list_static_site_function_app_settings( @@ -2652,7 +2836,7 @@ def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2669,17 +2853,24 @@ def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2698,7 +2889,7 @@ def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -2710,7 +2901,7 @@ def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -2727,17 +2918,24 @@ def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2752,11 +2950,11 @@ def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace - def reset_static_site_api_key( + def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2765,7 +2963,7 @@ def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -2785,6 +2983,7 @@ def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -2793,6 +2992,7 @@ def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -2800,7 +3000,11 @@ def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2811,5 +3015,5 @@ def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_top_level_domains_operations.py index 85ebb51956e3..19b190674458 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -161,7 +163,7 @@ def list( ) -> Iterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -220,7 +230,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -230,7 +240,7 @@ def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -245,16 +255,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,7 +286,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -281,7 +298,7 @@ def list_agreements( ) -> Iterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -294,6 +311,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -308,6 +326,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -321,6 +340,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -340,7 +360,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,4 +378,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py index d73a9fb66936..3d7e61c13b2a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,35 +188,36 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,35 +231,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -270,33 +274,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -310,35 +315,35 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -354,35 +359,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -395,31 +400,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -431,10 +437,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -442,21 +449,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -468,10 +475,11 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -479,21 +487,21 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -508,12 +516,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -521,23 +529,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -554,12 +562,12 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -567,23 +575,23 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -596,31 +604,32 @@ def build_get_basic_publishing_credentials_policies_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,31 +640,32 @@ def build_get_ftp_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -669,35 +679,35 @@ def build_update_ftp_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -710,31 +720,32 @@ def build_get_scm_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -748,35 +759,35 @@ def build_update_scm_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -789,31 +800,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -827,35 +839,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -868,31 +880,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -906,35 +919,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -947,31 +960,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -985,35 +999,35 @@ def build_update_auth_settings_v2_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1026,31 +1040,32 @@ def build_get_auth_settings_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1064,35 +1079,35 @@ def build_update_azure_storage_accounts_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1105,31 +1120,32 @@ def build_list_azure_storage_accounts_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1143,35 +1159,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1184,31 +1200,32 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1219,31 +1236,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1257,35 +1275,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1298,31 +1316,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1333,31 +1352,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1371,35 +1391,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1415,35 +1435,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1456,31 +1476,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1491,31 +1512,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1529,35 +1551,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1570,31 +1592,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1605,31 +1628,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1643,35 +1667,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1684,31 +1708,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1722,35 +1747,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1766,35 +1791,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1807,31 +1832,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1843,10 +1869,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1854,21 +1881,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1880,10 +1907,11 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1891,21 +1919,21 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1916,31 +1944,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1951,31 +1980,32 @@ def build_get_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1986,31 +2016,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2022,10 +2053,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2033,21 +2065,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2059,10 +2091,11 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2070,21 +2103,21 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2096,10 +2129,11 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2107,21 +2141,21 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2133,10 +2167,11 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2144,21 +2179,21 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2169,31 +2204,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2205,10 +2241,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2216,21 +2253,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2245,12 +2282,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2258,23 +2295,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2288,10 +2325,11 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2299,21 +2337,21 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2325,10 +2363,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2336,21 +2375,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2364,35 +2403,35 @@ def build_discover_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2405,31 +2444,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2441,10 +2481,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2452,21 +2493,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2481,12 +2522,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2494,23 +2535,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2524,10 +2565,11 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2535,21 +2577,21 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2564,12 +2606,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2577,23 +2619,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2606,31 +2648,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2644,35 +2687,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2685,31 +2728,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2720,31 +2764,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2755,31 +2800,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2791,10 +2837,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2802,21 +2849,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2831,12 +2878,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2844,23 +2891,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2874,10 +2921,11 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2885,21 +2933,21 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2915,12 +2963,12 @@ def build_create_or_update_function_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2929,23 +2977,23 @@ def build_create_or_update_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2960,10 +3008,11 @@ def build_delete_function_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2972,21 +3021,21 @@ def build_delete_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2998,10 +3047,11 @@ def build_list_function_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3009,21 +3059,21 @@ def build_list_function_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3035,10 +3085,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3046,21 +3097,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3071,31 +3122,32 @@ def build_list_host_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3106,31 +3158,32 @@ def build_list_sync_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3141,31 +3194,32 @@ def build_sync_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3181,12 +3235,12 @@ def build_create_or_update_host_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3195,23 +3249,23 @@ def build_create_or_update_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3226,10 +3280,11 @@ def build_delete_host_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3238,21 +3293,21 @@ def build_delete_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3263,31 +3318,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3299,10 +3355,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3310,21 +3367,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3339,12 +3396,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3352,23 +3409,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3382,10 +3439,11 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3393,21 +3451,21 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3420,10 +3478,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3432,21 +3491,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3462,12 +3521,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3476,23 +3535,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3507,10 +3566,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3519,21 +3579,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3549,12 +3609,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3563,23 +3623,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3592,31 +3652,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3627,31 +3688,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3663,10 +3725,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3674,21 +3737,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3703,12 +3766,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3716,23 +3779,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3746,10 +3809,11 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3757,21 +3821,21 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3786,12 +3850,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3799,23 +3863,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3828,31 +3892,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3864,10 +3929,11 @@ def build_get_instance_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3875,21 +3941,21 @@ def build_get_instance_info_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3901,10 +3967,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3912,21 +3979,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3941,12 +4008,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3954,23 +4021,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3984,10 +4051,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3995,21 +4063,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4021,10 +4089,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4032,21 +4101,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4059,10 +4128,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4071,21 +4141,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4098,10 +4168,11 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4110,21 +4181,21 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4137,10 +4208,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4149,21 +4221,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4176,10 +4248,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4188,21 +4261,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4216,10 +4289,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4229,21 +4303,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4256,10 +4330,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4268,21 +4343,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4293,31 +4368,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4328,31 +4404,32 @@ def build_list_site_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4363,31 +4440,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4402,36 +4480,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4447,35 +4525,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4488,31 +4566,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4523,31 +4602,32 @@ def build_get_swift_virtual_network_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4561,35 +4641,35 @@ def build_create_or_update_swift_virtual_network_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4602,31 +4682,32 @@ def build_delete_swift_virtual_network_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4640,35 +4721,35 @@ def build_update_swift_virtual_network_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4682,10 +4763,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4693,21 +4775,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4719,10 +4801,11 @@ def build_get_network_trace_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4730,21 +4813,21 @@ def build_get_network_trace_operation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4759,37 +4842,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4804,37 +4888,38 @@ def build_start_web_site_network_trace_operation_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4845,31 +4930,32 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4881,10 +4967,11 @@ def build_get_network_traces_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4892,21 +4979,21 @@ def build_get_network_traces_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4918,10 +5005,11 @@ def build_get_network_trace_operation_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4929,21 +5017,21 @@ def build_get_network_trace_operation_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4955,10 +5043,11 @@ def build_get_network_traces_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4966,21 +5055,21 @@ def build_get_network_traces_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4991,31 +5080,32 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5028,33 +5118,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5065,31 +5156,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5100,31 +5192,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5136,10 +5229,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5147,21 +5241,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5176,12 +5270,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5189,23 +5283,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5219,10 +5313,11 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5230,21 +5325,21 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5259,12 +5354,12 @@ def build_update_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5272,23 +5367,23 @@ def build_update_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5301,31 +5396,32 @@ def build_get_private_access_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5339,35 +5435,35 @@ def build_put_private_access_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5380,31 +5476,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5416,10 +5513,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5427,21 +5525,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5453,10 +5551,11 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5464,21 +5563,21 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5490,10 +5589,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5501,21 +5601,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5527,10 +5627,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5538,21 +5639,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5565,10 +5666,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5577,21 +5679,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5603,10 +5705,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5614,21 +5717,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5639,31 +5742,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5675,10 +5779,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5686,21 +5791,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5715,12 +5820,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5728,23 +5833,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5758,10 +5863,11 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5769,21 +5875,21 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5797,35 +5903,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5838,31 +5944,32 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5876,35 +5983,36 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5918,35 +6026,35 @@ def build_restore_from_backup_blob_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5962,35 +6070,35 @@ def build_restore_from_deleted_app_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6006,35 +6114,35 @@ def build_restore_snapshot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6047,31 +6155,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6083,10 +6192,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6094,21 +6204,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6120,10 +6230,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6131,21 +6242,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6157,10 +6268,11 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6168,21 +6280,21 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6196,35 +6308,35 @@ def build_copy_production_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6237,31 +6349,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6273,10 +6386,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6284,21 +6398,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6313,12 +6427,12 @@ def build_create_or_update_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6326,23 +6440,23 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6359,10 +6473,11 @@ def build_delete_slot_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6370,25 +6485,25 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6403,12 +6518,12 @@ def build_update_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6416,23 +6531,23 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6448,10 +6563,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6459,23 +6575,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6490,12 +6606,12 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6503,23 +6619,23 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6536,12 +6652,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6549,23 +6665,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6579,10 +6695,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6590,21 +6707,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6617,10 +6734,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6629,21 +6747,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6656,10 +6774,11 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6668,21 +6787,21 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6698,12 +6817,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6712,23 +6831,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6746,12 +6865,12 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6760,23 +6879,23 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6790,10 +6909,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6801,21 +6921,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6830,12 +6950,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6843,23 +6963,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6873,10 +6993,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6884,21 +7005,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6913,12 +7034,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6926,23 +7047,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6956,10 +7077,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6967,21 +7089,21 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6996,12 +7118,12 @@ def build_update_auth_settings_v2_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7009,23 +7131,23 @@ def build_update_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7039,10 +7161,11 @@ def build_get_auth_settings_v2_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7050,21 +7173,21 @@ def build_get_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7079,12 +7202,12 @@ def build_update_azure_storage_accounts_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7092,23 +7215,23 @@ def build_update_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7122,10 +7245,11 @@ def build_list_azure_storage_accounts_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7133,21 +7257,21 @@ def build_list_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7162,12 +7286,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7175,23 +7299,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7205,10 +7329,11 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7216,21 +7341,21 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7242,10 +7367,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7253,21 +7379,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7282,12 +7408,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7295,23 +7421,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7325,10 +7451,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7336,21 +7463,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7362,10 +7489,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7373,21 +7501,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7402,12 +7530,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7415,23 +7543,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7448,12 +7576,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7461,23 +7589,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7491,10 +7619,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7502,21 +7631,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7528,10 +7657,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7539,21 +7669,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7568,12 +7698,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7581,23 +7711,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7611,10 +7741,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7622,21 +7753,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7648,10 +7779,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7659,21 +7791,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7688,12 +7820,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7701,23 +7833,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7734,12 +7866,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7747,23 +7879,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7777,10 +7909,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7788,21 +7921,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7815,10 +7948,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7827,21 +7961,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7854,10 +7988,11 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7866,21 +8001,21 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7892,10 +8027,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7903,21 +8039,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7929,10 +8065,11 @@ def build_get_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7940,21 +8077,21 @@ def build_get_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7966,10 +8103,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7977,21 +8115,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8004,10 +8142,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8016,21 +8155,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8043,10 +8182,11 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8055,21 +8195,21 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8082,10 +8222,11 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8094,21 +8235,21 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8121,10 +8262,11 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8133,21 +8275,21 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8159,10 +8301,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8170,21 +8313,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8197,10 +8340,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8209,21 +8353,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8239,12 +8383,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8253,23 +8397,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8284,10 +8428,11 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8296,21 +8441,21 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8323,10 +8468,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8335,21 +8481,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8364,12 +8510,12 @@ def build_discover_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8377,23 +8523,23 @@ def build_discover_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8407,10 +8553,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8418,21 +8565,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8445,10 +8592,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8457,21 +8605,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8487,12 +8635,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8501,23 +8649,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8532,10 +8680,11 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8544,21 +8693,21 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8574,12 +8723,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8588,23 +8737,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8618,10 +8767,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8629,21 +8779,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8658,12 +8808,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8671,23 +8821,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8701,10 +8851,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8712,21 +8863,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8738,10 +8889,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8749,21 +8901,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8775,10 +8927,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8786,21 +8939,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8813,10 +8966,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8825,21 +8979,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8855,12 +9009,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8869,23 +9023,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8900,10 +9054,11 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8912,21 +9067,21 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8943,12 +9098,12 @@ def build_create_or_update_function_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8958,23 +9113,23 @@ def build_create_or_update_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8990,10 +9145,11 @@ def build_delete_function_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9003,21 +9159,21 @@ def build_delete_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9030,10 +9186,11 @@ def build_list_function_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9042,21 +9199,21 @@ def build_list_function_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9069,10 +9226,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9081,21 +9239,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9107,10 +9265,11 @@ def build_list_host_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9118,21 +9277,21 @@ def build_list_host_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9144,10 +9303,11 @@ def build_list_sync_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9155,21 +9315,21 @@ def build_list_sync_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9181,10 +9341,11 @@ def build_sync_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9192,21 +9353,21 @@ def build_sync_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9223,12 +9384,12 @@ def build_create_or_update_host_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9238,23 +9399,23 @@ def build_create_or_update_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9270,10 +9431,11 @@ def build_delete_host_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9283,21 +9445,21 @@ def build_delete_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9309,10 +9471,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9320,21 +9483,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9347,10 +9510,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9359,21 +9523,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9389,12 +9553,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9403,23 +9567,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9434,10 +9598,11 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9446,21 +9611,21 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9474,10 +9639,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9487,21 +9653,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9518,12 +9684,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9533,23 +9699,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9565,10 +9731,11 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9578,21 +9745,21 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9609,12 +9776,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9624,23 +9791,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9654,10 +9821,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9665,21 +9833,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9691,10 +9859,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9702,21 +9871,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9729,10 +9898,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9741,21 +9911,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9771,12 +9941,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9785,23 +9955,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9816,10 +9986,11 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9828,21 +9999,21 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9858,12 +10029,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9872,23 +10043,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9902,10 +10073,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9913,21 +10085,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9940,10 +10112,11 @@ def build_get_instance_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9952,21 +10125,21 @@ def build_get_instance_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9979,10 +10152,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9991,21 +10165,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10021,12 +10195,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10035,23 +10209,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10066,10 +10240,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10078,21 +10253,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10105,10 +10280,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10117,21 +10293,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10145,10 +10321,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10158,21 +10335,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10186,10 +10363,11 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10199,21 +10377,21 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10227,10 +10405,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10240,21 +10419,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10268,10 +10447,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10281,21 +10461,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10310,10 +10490,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10324,21 +10505,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10352,10 +10533,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10365,21 +10547,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10391,10 +10573,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10402,21 +10585,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10428,10 +10611,11 @@ def build_list_site_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10439,21 +10623,21 @@ def build_list_site_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10465,10 +10649,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10476,21 +10661,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10502,10 +10687,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10513,21 +10699,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10539,10 +10725,11 @@ def build_get_swift_virtual_network_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10550,21 +10737,21 @@ def build_get_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10579,12 +10766,12 @@ def build_create_or_update_swift_virtual_network_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10592,23 +10779,23 @@ def build_create_or_update_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10622,10 +10809,11 @@ def build_delete_swift_virtual_network_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10633,21 +10821,21 @@ def build_delete_swift_virtual_network_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10662,12 +10850,12 @@ def build_update_swift_virtual_network_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10675,23 +10863,23 @@ def build_update_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10706,10 +10894,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10718,21 +10907,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10745,10 +10934,11 @@ def build_get_network_trace_operation_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10757,21 +10947,21 @@ def build_get_network_trace_operation_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10787,10 +10977,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10798,27 +10989,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10834,10 +11025,11 @@ def build_start_web_site_network_trace_operation_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10845,27 +11037,27 @@ def build_start_web_site_network_trace_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10877,10 +11069,11 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10888,21 +11081,21 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10915,10 +11108,11 @@ def build_get_network_traces_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10927,21 +11121,21 @@ def build_get_network_traces_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10954,10 +11148,11 @@ def build_get_network_trace_operation_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10966,21 +11161,21 @@ def build_get_network_trace_operation_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10993,10 +11188,11 @@ def build_get_network_traces_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11005,21 +11201,21 @@ def build_get_network_traces_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11031,10 +11227,11 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11042,21 +11239,21 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11070,10 +11267,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11081,23 +11279,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11109,10 +11307,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11120,21 +11319,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11146,10 +11345,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11157,21 +11357,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11184,10 +11384,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11196,21 +11397,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11226,12 +11427,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11240,23 +11441,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11271,10 +11472,11 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11283,21 +11485,21 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11313,12 +11515,12 @@ def build_update_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11327,23 +11529,23 @@ def build_update_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11357,10 +11559,11 @@ def build_get_private_access_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11368,21 +11571,21 @@ def build_get_private_access_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11397,12 +11600,12 @@ def build_put_private_access_vnet_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11410,23 +11613,23 @@ def build_put_private_access_vnet_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11440,10 +11643,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11451,21 +11655,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11480,12 +11684,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11493,23 +11697,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11523,10 +11727,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11534,21 +11739,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11559,31 +11764,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11595,10 +11801,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11606,21 +11813,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11633,10 +11840,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11645,21 +11853,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11672,10 +11880,11 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11684,21 +11893,21 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11711,10 +11920,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11723,21 +11933,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11750,10 +11960,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11762,21 +11973,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11790,10 +12001,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11803,21 +12015,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11830,10 +12042,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11842,21 +12055,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11868,10 +12081,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11879,21 +12093,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11906,10 +12120,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11918,21 +12133,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11948,12 +12163,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11962,23 +12177,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11993,10 +12208,11 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12005,21 +12221,21 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12034,12 +12250,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12047,23 +12263,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12077,10 +12293,11 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12088,21 +12305,21 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12117,10 +12334,11 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12128,25 +12346,25 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12161,12 +12379,12 @@ def build_restore_from_backup_blob_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12174,23 +12392,23 @@ def build_restore_from_backup_blob_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12207,12 +12425,12 @@ def build_restore_from_deleted_app_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12220,23 +12438,23 @@ def build_restore_from_deleted_app_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12253,12 +12471,12 @@ def build_restore_snapshot_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12266,23 +12484,23 @@ def build_restore_snapshot_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12296,10 +12514,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12307,21 +12526,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12334,10 +12553,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12346,21 +12566,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12373,10 +12593,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12385,21 +12606,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12412,10 +12633,11 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12424,21 +12646,21 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12453,12 +12675,12 @@ def build_copy_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12466,23 +12688,23 @@ def build_copy_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12499,12 +12721,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12512,23 +12734,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12545,12 +12767,12 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12558,23 +12780,23 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12588,10 +12810,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12599,21 +12822,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12625,10 +12848,11 @@ def build_list_snapshots_from_dr_secondary_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12636,21 +12860,21 @@ def build_list_snapshots_from_dr_secondary_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12662,10 +12886,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12673,21 +12898,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12702,12 +12927,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12715,23 +12940,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12745,10 +12970,11 @@ def build_delete_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12756,21 +12982,21 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12785,12 +13011,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12798,23 +13024,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12828,10 +13054,11 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12839,21 +13066,21 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12869,10 +13096,11 @@ def build_start_network_trace_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12880,27 +13108,27 @@ def build_start_network_trace_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12912,10 +13140,11 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12923,21 +13152,21 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12949,10 +13178,11 @@ def build_stop_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12960,21 +13190,21 @@ def build_stop_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12986,10 +13216,11 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12997,21 +13228,21 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13023,10 +13254,11 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13034,21 +13266,21 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13060,10 +13292,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13071,21 +13304,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13098,10 +13331,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13110,21 +13344,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13137,10 +13371,11 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13149,21 +13384,21 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13176,10 +13411,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13188,21 +13424,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13216,10 +13452,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13229,21 +13466,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13256,10 +13493,11 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13268,21 +13506,21 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13296,10 +13534,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13307,23 +13546,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13335,10 +13574,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13346,21 +13586,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13373,10 +13613,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13385,21 +13626,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13415,12 +13656,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13429,23 +13670,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13460,10 +13701,11 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13472,21 +13714,21 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13502,12 +13744,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13516,23 +13758,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13548,10 +13790,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13561,21 +13804,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13592,12 +13835,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13607,23 +13850,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13642,12 +13885,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13657,23 +13900,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13687,10 +13930,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13698,21 +13942,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13725,10 +13969,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13737,21 +13982,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13765,35 +14010,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13809,35 +14054,35 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13850,31 +14095,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13885,31 +14131,32 @@ def build_list_snapshots_from_dr_secondary_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13920,31 +14167,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13958,35 +14206,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13999,31 +14247,32 @@ def build_delete_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14037,35 +14286,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14078,31 +14327,32 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14117,37 +14367,38 @@ def build_start_network_trace_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14158,31 +14409,32 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14193,31 +14445,32 @@ def build_stop_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14228,31 +14481,32 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14263,31 +14517,32 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14298,31 +14553,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14334,10 +14590,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14345,21 +14602,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14371,10 +14628,11 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14382,21 +14640,21 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14408,10 +14666,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14419,21 +14678,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14446,10 +14705,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14458,21 +14718,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14484,10 +14744,11 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14495,21 +14756,21 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14522,33 +14783,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14559,31 +14821,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14595,10 +14858,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14606,21 +14870,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14635,12 +14899,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14648,23 +14912,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14678,10 +14942,11 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14689,21 +14954,21 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14718,12 +14983,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14731,23 +14996,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14762,10 +15027,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14774,21 +15040,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14804,12 +15070,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14818,23 +15084,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14852,12 +15118,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14866,23 +15132,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14895,31 +15161,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14931,10 +15198,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14942,25 +15210,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -14989,13 +15257,15 @@ def list( ) -> Iterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15006,6 +15276,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -15015,6 +15286,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15032,7 +15304,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15046,7 +15322,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -15057,7 +15333,7 @@ def list_by_resource_group( ) -> Iterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -15069,6 +15345,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15080,6 +15358,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -15091,6 +15370,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -15109,7 +15389,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15123,7 +15407,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -15134,7 +15418,7 @@ def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -15151,17 +15435,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15178,7 +15469,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -15194,6 +15485,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -15202,6 +15494,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -15209,7 +15502,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15227,7 +15524,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15241,8 +15538,8 @@ def begin_create_or_update( """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. + 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 @@ -15263,8 +15560,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -15276,6 +15574,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15300,13 +15599,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15316,16 +15614,16 @@ def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -15338,11 +15636,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -15350,7 +15651,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -15361,7 +15666,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15375,8 +15680,8 @@ def update( """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. + 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 @@ -15396,6 +15701,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -15404,6 +15710,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -15411,7 +15718,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15430,7 +15741,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15443,13 +15754,13 @@ def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -15462,18 +15773,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15488,11 +15806,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15501,7 +15819,7 @@ def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -15520,6 +15838,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -15528,6 +15847,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -15535,7 +15855,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15546,7 +15870,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -15559,7 +15883,7 @@ def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -15579,6 +15903,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -15587,6 +15912,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -15594,7 +15920,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15609,7 +15939,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -15621,7 +15951,7 @@ def list_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -15633,6 +15963,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15645,6 +15977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -15656,6 +15989,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15673,7 +16007,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15687,7 +16025,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def get_backup_status( @@ -15699,7 +16037,7 @@ def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -15718,18 +16056,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15744,11 +16089,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15757,7 +16102,7 @@ def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -15776,18 +16121,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15798,7 +16150,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -15814,9 +16166,9 @@ def list_backup_status_secrets( 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. + 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 @@ -15837,6 +16189,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -15846,6 +16199,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -15853,7 +16207,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15868,10 +16226,10 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - def _restore_initial( + def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15885,6 +16243,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -15894,6 +16253,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -15901,7 +16261,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15911,11 +16275,11 @@ def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore( + def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15925,7 +16289,7 @@ def begin_restore( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -15947,8 +16311,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -15961,6 +16326,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15982,10 +16348,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def get_basic_publishing_credentials_policies( @@ -15996,8 +16361,7 @@ def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -16014,17 +16378,24 @@ def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16039,7 +16410,7 @@ def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace @@ -16051,7 +16422,7 @@ def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -16068,17 +16439,24 @@ def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16093,7 +16471,7 @@ def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16106,7 +16484,7 @@ def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -16126,6 +16504,7 @@ def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16134,6 +16513,7 @@ def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -16141,7 +16521,11 @@ def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16156,7 +16540,7 @@ def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16168,7 +16552,7 @@ def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -16185,17 +16569,24 @@ def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16210,7 +16601,7 @@ def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16223,7 +16614,7 @@ def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -16243,6 +16634,7 @@ def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16251,6 +16643,7 @@ def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -16258,7 +16651,11 @@ def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16273,7 +16670,7 @@ def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16285,7 +16682,7 @@ def list_configurations( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -16298,6 +16695,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16310,6 +16709,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -16321,6 +16721,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16338,7 +16739,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16352,7 +16757,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -16364,7 +16769,7 @@ def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -16383,6 +16788,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -16391,6 +16797,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -16398,7 +16805,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16413,7 +16824,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -16425,7 +16836,7 @@ def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -16442,17 +16853,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16467,7 +16885,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -16480,7 +16898,7 @@ def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -16499,6 +16917,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -16507,6 +16926,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -16514,7 +16934,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16529,7 +16953,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -16541,7 +16965,7 @@ def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -16558,17 +16982,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16583,7 +17014,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -16596,8 +17027,7 @@ def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -16616,6 +17046,7 @@ def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -16624,6 +17055,7 @@ def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -16631,7 +17063,11 @@ def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16646,7 +17082,7 @@ def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -16658,7 +17094,7 @@ def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -16675,17 +17111,24 @@ def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16700,7 +17143,7 @@ def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -16713,7 +17156,7 @@ def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -16733,6 +17176,7 @@ def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -16741,6 +17185,7 @@ def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -16748,7 +17193,11 @@ def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16763,7 +17212,7 @@ def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -16775,7 +17224,7 @@ def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -16792,17 +17241,24 @@ def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16817,7 +17273,7 @@ def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -16830,7 +17286,7 @@ def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -16849,6 +17305,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16857,6 +17314,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -16864,7 +17322,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16879,11 +17341,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16891,7 +17353,7 @@ def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -16908,17 +17370,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16929,7 +17398,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -16941,7 +17410,7 @@ def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -16958,17 +17427,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16983,7 +17459,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -16996,7 +17472,7 @@ def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -17015,6 +17491,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -17023,6 +17500,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -17030,7 +17508,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17045,7 +17527,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -17057,7 +17539,7 @@ def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -17074,17 +17556,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17099,7 +17588,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -17111,7 +17600,7 @@ def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -17128,17 +17617,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17153,7 +17649,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -17166,7 +17662,7 @@ def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -17186,6 +17682,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -17194,6 +17691,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -17201,7 +17699,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17216,7 +17718,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -17229,7 +17731,7 @@ def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -17248,6 +17750,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -17256,6 +17759,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -17263,7 +17767,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17278,7 +17786,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -17290,7 +17798,7 @@ def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -17307,17 +17815,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17332,7 +17847,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -17347,17 +17862,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17371,7 +17893,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -17383,7 +17905,7 @@ def begin_list_publishing_credentials( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -17401,7 +17923,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -17412,6 +17935,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -17435,10 +17959,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -17450,7 +17973,7 @@ def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -17469,6 +17992,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -17477,6 +18001,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -17484,7 +18009,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17499,7 +18028,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -17511,7 +18040,7 @@ def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -17528,17 +18057,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17553,7 +18089,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -17565,8 +18101,7 @@ def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -17583,17 +18118,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17608,7 +18150,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -17622,8 +18164,8 @@ def update_slot_configuration_names( """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. + 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 @@ -17642,6 +18184,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -17650,6 +18193,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -17657,7 +18201,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17672,7 +18220,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -17685,8 +18233,8 @@ def get_configuration( """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. + 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 @@ -17703,17 +18251,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17728,7 +18283,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17741,7 +18296,7 @@ def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -17760,6 +18315,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -17768,6 +18324,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -17775,7 +18332,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17790,7 +18351,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17803,7 +18364,7 @@ def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -17822,6 +18383,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -17830,6 +18392,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -17837,7 +18400,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17852,7 +18419,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -17865,8 +18432,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -17879,6 +18446,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17891,6 +18460,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -17902,6 +18472,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17919,7 +18490,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17933,7 +18508,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -17945,7 +18520,7 @@ def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -17964,18 +18539,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17990,11 +18572,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18003,7 +18585,7 @@ def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -18022,18 +18604,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18044,7 +18633,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -18056,7 +18645,7 @@ def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -18073,17 +18662,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18099,7 +18695,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -18111,7 +18707,7 @@ def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -18128,17 +18724,24 @@ def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18154,7 +18757,7 @@ def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -18166,7 +18769,7 @@ def list_continuous_web_jobs( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -18179,6 +18782,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18191,6 +18796,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -18202,6 +18808,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18219,7 +18826,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18233,7 +18844,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -18245,7 +18856,7 @@ def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -18264,18 +18875,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18292,11 +18910,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18305,7 +18923,7 @@ def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -18324,18 +18942,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18346,11 +18971,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18359,7 +18984,7 @@ def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -18378,18 +19003,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18400,11 +19032,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18413,7 +19045,7 @@ def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -18432,18 +19064,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18454,7 +19093,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -18466,7 +19105,7 @@ def list_deployments( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -18478,6 +19117,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18490,6 +19131,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -18501,6 +19143,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18518,7 +19161,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18532,7 +19179,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -18544,7 +19191,7 @@ def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -18563,18 +19210,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18589,7 +19243,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -18603,7 +19257,7 @@ def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -18624,6 +19278,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -18633,6 +19288,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -18640,7 +19296,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18655,11 +19315,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18668,7 +19328,7 @@ def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -18687,18 +19347,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18709,7 +19376,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -18722,7 +19389,7 @@ def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -18742,18 +19409,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18768,7 +19442,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -18782,8 +19456,8 @@ def discover_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. - 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. + 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 @@ -18803,6 +19477,7 @@ def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -18811,6 +19486,7 @@ def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -18818,7 +19494,11 @@ def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18833,7 +19513,7 @@ def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -18845,7 +19525,7 @@ def list_domain_ownership_identifiers( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -18857,6 +19537,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18869,6 +19551,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -18880,6 +19563,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18897,7 +19581,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18911,7 +19599,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -18923,7 +19611,7 @@ def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -18942,18 +19630,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18968,7 +19663,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -18982,8 +19677,7 @@ def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19004,6 +19698,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19013,6 +19708,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -19020,7 +19716,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19035,11 +19735,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19048,7 +19748,7 @@ def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -19067,18 +19767,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19089,7 +19796,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19103,8 +19810,7 @@ def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19125,6 +19831,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19134,6 +19841,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -19141,7 +19849,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19156,7 +19868,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19168,7 +19880,7 @@ def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -19185,17 +19897,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19210,7 +19929,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -19226,6 +19945,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -19234,6 +19954,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -19241,7 +19962,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -19257,7 +19982,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -19270,7 +19995,7 @@ def begin_create_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -19291,8 +20016,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -19304,6 +20030,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19328,10 +20055,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -19342,7 +20068,7 @@ def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -19359,17 +20085,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19386,7 +20119,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -19398,7 +20131,7 @@ def list_functions( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -19411,6 +20144,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19423,6 +20158,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -19434,6 +20170,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19451,7 +20188,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19465,7 +20206,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -19476,7 +20217,7 @@ def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -19493,17 +20234,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19518,7 +20266,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -19531,7 +20279,7 @@ def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -19550,18 +20298,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19578,7 +20333,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -19595,6 +20350,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -19604,6 +20360,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -19611,7 +20368,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -19625,7 +20386,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -19639,7 +20400,7 @@ def begin_create_function( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -19662,8 +20423,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -19676,6 +20438,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -19700,13 +20463,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19715,7 +20477,7 @@ def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -19734,18 +20496,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19756,7 +20525,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -19771,7 +20540,7 @@ def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -19794,6 +20563,7 @@ def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -19804,6 +20574,7 @@ def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -19811,7 +20582,11 @@ def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -19830,11 +20605,11 @@ def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret( + def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19844,7 +20619,7 @@ def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -19865,6 +20640,8 @@ def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -19872,12 +20649,17 @@ def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -19888,7 +20670,7 @@ def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -19901,7 +20683,7 @@ def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -19920,18 +20702,25 @@ def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19946,7 +20735,7 @@ def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -19959,7 +20748,7 @@ def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -19978,18 +20767,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20004,7 +20800,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -20016,7 +20812,7 @@ def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -20033,17 +20829,24 @@ def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20058,11 +20861,11 @@ def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status( + def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20070,7 +20873,7 @@ def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -20087,17 +20890,24 @@ def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20108,11 +20918,11 @@ def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions( + def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20120,7 +20930,7 @@ def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -20137,17 +20947,24 @@ def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20158,7 +20975,7 @@ def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace @@ -20173,7 +20990,7 @@ def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -20196,6 +21013,7 @@ def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -20206,6 +21024,7 @@ def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -20213,7 +21032,11 @@ def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -20232,11 +21055,11 @@ def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret( + def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20246,7 +21069,7 @@ def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -20267,6 +21090,8 @@ def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -20274,12 +21099,17 @@ def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20290,7 +21120,7 @@ def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -20302,7 +21132,7 @@ def list_host_name_bindings( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -20315,6 +21145,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20327,6 +21159,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -20338,6 +21171,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20355,7 +21189,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20369,7 +21207,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -20381,7 +21219,7 @@ def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -20400,18 +21238,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20426,7 +21271,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -20440,7 +21285,7 @@ def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -20462,6 +21307,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -20471,6 +21317,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -20478,7 +21325,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20493,11 +21344,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20506,7 +21357,7 @@ def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -20525,18 +21376,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20547,7 +21405,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -20561,7 +21419,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -20582,6 +21440,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -20589,12 +21449,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20609,7 +21474,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20624,7 +21489,7 @@ def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -20647,6 +21512,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -20657,6 +21523,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -20664,7 +21531,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20679,11 +21550,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20693,7 +21564,7 @@ def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -20714,6 +21585,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -20721,12 +21594,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20737,7 +21615,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20752,7 +21630,7 @@ def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -20775,6 +21653,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -20785,6 +21664,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -20792,7 +21672,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20807,7 +21691,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -20819,7 +21703,7 @@ def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -20836,17 +21720,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20861,7 +21752,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -20873,8 +21764,7 @@ def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -20891,17 +21781,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20916,7 +21813,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -20929,7 +21826,7 @@ def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -20948,18 +21845,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20974,7 +21878,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -20988,8 +21892,7 @@ def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21010,6 +21913,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21019,6 +21923,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -21026,7 +21931,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21041,11 +21950,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21054,7 +21963,7 @@ def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -21073,18 +21982,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21095,7 +22011,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21109,8 +22025,7 @@ def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21131,6 +22046,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21140,6 +22056,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -21147,7 +22064,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21162,7 +22083,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21174,7 +22095,7 @@ def list_instance_identifiers( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -21187,6 +22108,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21199,6 +22122,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -21210,6 +22134,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21227,7 +22152,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21241,7 +22170,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_info( @@ -21253,7 +22182,7 @@ def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -21272,18 +22201,25 @@ def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21298,7 +22234,7 @@ def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -21311,7 +22247,7 @@ def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -21330,18 +22266,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21356,7 +22299,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -21373,6 +22316,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -21382,6 +22326,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -21389,7 +22334,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -21405,7 +22354,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -21419,7 +22368,7 @@ def begin_create_instance_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -21442,8 +22391,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -21456,6 +22406,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21480,10 +22431,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -21495,7 +22445,7 @@ def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -21514,18 +22464,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21542,7 +22499,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -21556,8 +22513,8 @@ def list_instance_processes( """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. + 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 @@ -21572,6 +22529,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21585,6 +22544,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -21597,6 +22557,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21614,7 +22575,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21628,7 +22593,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -21641,8 +22606,7 @@ def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21664,6 +22628,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -21671,12 +22637,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21693,11 +22664,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21708,8 +22679,8 @@ def delete_instance_process( """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. + 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 @@ -21731,6 +22702,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -21738,12 +22711,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21754,7 +22732,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -21768,8 +22746,7 @@ def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -21791,6 +22768,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -21798,12 +22777,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21820,7 +22804,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -21835,8 +22819,8 @@ def list_instance_process_modules( """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. + 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 @@ -21854,6 +22838,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21868,6 +22854,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -21881,6 +22868,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21898,7 +22886,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21912,7 +22904,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -21926,8 +22918,7 @@ def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21951,6 +22942,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -21959,12 +22952,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21981,7 +22979,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -21995,8 +22993,7 @@ def list_instance_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -22014,6 +23011,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22028,6 +23027,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -22041,6 +23041,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22058,7 +23059,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22072,7 +23077,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable( @@ -22083,7 +23088,7 @@ def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -22100,17 +23105,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22125,7 +23137,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -22137,7 +23149,7 @@ def list_site_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -22149,6 +23161,8 @@ def list_site_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22161,6 +23175,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -22172,6 +23187,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22189,7 +23205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22203,7 +23223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers( @@ -22214,7 +23234,7 @@ def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -22231,17 +23251,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22256,7 +23283,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore def _migrate_storage_initial( @@ -22273,6 +23300,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -22281,6 +23309,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -22289,7 +23318,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22303,7 +23336,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -22317,7 +23350,7 @@ def begin_migrate_storage( ) -> LROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -22341,8 +23374,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -22355,6 +23389,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22379,10 +23414,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -22397,6 +23431,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -22405,6 +23440,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -22412,7 +23448,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22426,7 +23466,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -22439,7 +23479,7 @@ def begin_migrate_my_sql( ) -> LROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -22459,8 +23499,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -22472,6 +23513,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22496,10 +23538,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -22511,8 +23552,8 @@ def get_migrate_my_sql_status( """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. + 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 @@ -22529,17 +23570,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22554,7 +23602,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -22566,7 +23614,7 @@ def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -22583,17 +23631,24 @@ def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22608,7 +23663,7 @@ def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22624,9 +23679,9 @@ def create_or_update_swift_virtual_network_connection( 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 + 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. @@ -22646,6 +23701,7 @@ def create_or_update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -22654,6 +23710,7 @@ def create_or_update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection.metadata['url'], @@ -22661,7 +23718,11 @@ def create_or_update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22676,11 +23737,11 @@ def create_or_update_swift_virtual_network_connection( return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network( + def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22688,7 +23749,7 @@ def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -22705,17 +23766,24 @@ def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22726,7 +23794,7 @@ def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22742,9 +23810,9 @@ def update_swift_virtual_network_connection( 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 + 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. @@ -22764,6 +23832,7 @@ def update_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -22772,6 +23841,7 @@ def update_swift_virtual_network_connection( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection.metadata['url'], @@ -22779,7 +23849,11 @@ def update_swift_virtual_network_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22794,7 +23868,7 @@ def update_swift_virtual_network_connection( return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -22807,7 +23881,7 @@ def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -22826,18 +23900,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22854,7 +23935,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -22867,8 +23948,7 @@ def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -22887,18 +23967,25 @@ def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22917,7 +24004,7 @@ def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -22932,17 +24019,17 @@ def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -22955,11 +24042,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -22968,7 +24058,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22983,7 +24077,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_initial( @@ -23001,11 +24095,14 @@ def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23014,7 +24111,11 @@ def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23032,7 +24133,7 @@ def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -23047,17 +24148,17 @@ def begin_start_web_site_network_trace_operation( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23072,7 +24173,8 @@ def begin_start_web_site_network_trace_operation( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -23086,6 +24188,7 @@ def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23109,13 +24212,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace( + def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23123,7 +24225,7 @@ def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -23140,17 +24242,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23161,7 +24270,7 @@ def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace @@ -23174,8 +24283,7 @@ def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23194,18 +24302,25 @@ def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23220,7 +24335,7 @@ def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -23233,8 +24348,7 @@ def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23253,18 +24367,25 @@ def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23283,7 +24404,7 @@ def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -23296,8 +24417,7 @@ def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23316,18 +24436,25 @@ def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23342,11 +24469,11 @@ def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23354,8 +24481,7 @@ def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -23372,17 +24498,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23393,7 +24526,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -23406,7 +24539,7 @@ def list_perf_mon_counters( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -23414,7 +24547,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -23423,6 +24556,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23435,6 +24570,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -23447,6 +24583,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -23465,7 +24602,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23479,7 +24620,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -23490,7 +24631,7 @@ def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -23507,17 +24648,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23532,7 +24680,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -23544,7 +24692,7 @@ def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -23561,17 +24709,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23586,7 +24741,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -23599,7 +24754,7 @@ def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -23618,18 +24773,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23644,7 +24806,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23658,7 +24820,7 @@ def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -23679,6 +24841,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -23688,6 +24851,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -23695,7 +24859,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23710,11 +24878,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23723,7 +24891,7 @@ def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -23742,18 +24910,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23764,7 +24939,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23778,7 +24953,7 @@ def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -23799,6 +24974,7 @@ def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -23808,6 +24984,7 @@ def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -23815,7 +24992,11 @@ def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23830,7 +25011,7 @@ def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -23843,8 +25024,8 @@ def get_private_access( """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. + 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 @@ -23861,17 +25042,24 @@ def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23886,7 +25074,7 @@ def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -23900,8 +25088,8 @@ def put_private_access_vnet( """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. + 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 @@ -23920,6 +25108,7 @@ def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -23928,6 +25117,7 @@ def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -23935,7 +25125,11 @@ def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23950,7 +25144,7 @@ def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -23963,8 +25157,8 @@ def list_processes( """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. + 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 @@ -23976,6 +25170,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23988,6 +25184,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -23999,6 +25196,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24016,7 +25214,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24030,7 +25232,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -24042,8 +25244,7 @@ def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -24062,18 +25263,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24090,11 +25298,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24104,8 +25312,8 @@ def delete_process( """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. + 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 @@ -24124,18 +25332,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -24146,7 +25361,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -24159,8 +25374,7 @@ def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -24179,18 +25393,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24207,7 +25428,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -24221,8 +25442,8 @@ def list_process_modules( """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. + 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 @@ -24237,6 +25458,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24250,6 +25473,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -24262,6 +25486,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24279,7 +25504,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24293,7 +25522,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -24306,8 +25535,7 @@ def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -24328,6 +25556,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -24335,12 +25565,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24357,7 +25592,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -24370,8 +25605,7 @@ def list_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -24386,6 +25620,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24399,6 +25635,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -24411,6 +25648,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24428,7 +25666,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24442,7 +25684,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -24453,7 +25695,7 @@ def list_public_certificates( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -24466,6 +25708,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24478,6 +25722,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -24489,6 +25734,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24506,7 +25752,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24520,7 +25770,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -24532,7 +25782,7 @@ def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -24551,18 +25801,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24577,7 +25834,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -24591,7 +25848,7 @@ def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -24613,6 +25870,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -24622,6 +25880,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -24629,7 +25888,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24644,11 +25907,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24657,7 +25920,7 @@ def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -24676,18 +25939,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24698,7 +25968,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -24711,7 +25981,7 @@ def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -24732,6 +26002,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -24740,6 +26011,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -24747,7 +26019,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24762,11 +26038,11 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24775,8 +26051,8 @@ def reset_production_slot_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. + 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 @@ -24793,17 +26069,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24814,11 +26097,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24828,17 +26111,18 @@ def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -24851,11 +26135,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -24863,7 +26150,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24874,10 +26165,10 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - def _restore_from_backup_blob_initial( + def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24890,6 +26181,7 @@ def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -24898,6 +26190,7 @@ def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -24905,7 +26198,11 @@ def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24915,11 +26212,11 @@ def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob( + def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24928,7 +26225,7 @@ def begin_restore_from_backup_blob( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -24948,8 +26245,9 @@ def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -24961,6 +26259,7 @@ def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24982,12 +26281,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_initial( + def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25000,6 +26298,7 @@ def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -25008,6 +26307,7 @@ def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -25015,7 +26315,11 @@ def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25025,11 +26329,11 @@ def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app( + def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25038,7 +26342,7 @@ def begin_restore_from_deleted_app( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -25058,8 +26362,9 @@ def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25071,6 +26376,7 @@ def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25092,12 +26398,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_initial( + def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25110,6 +26415,7 @@ def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -25118,6 +26424,7 @@ def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -25125,7 +26432,11 @@ def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25135,11 +26446,11 @@ def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot( + def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25148,7 +26459,7 @@ def begin_restore_snapshot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -25169,8 +26480,9 @@ def begin_restore_snapshot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25182,6 +26494,7 @@ def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25203,10 +26516,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -25217,7 +26529,7 @@ def list_site_extensions( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -25230,6 +26542,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25242,6 +26556,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -25253,6 +26568,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25270,7 +26586,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25284,7 +26604,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -25296,7 +26616,7 @@ def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -25315,18 +26635,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25343,7 +26670,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -25359,18 +26686,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -25389,7 +26723,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -25402,7 +26736,7 @@ def begin_install_site_extension( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -25423,7 +26757,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -25435,6 +26770,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25458,13 +26794,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25473,7 +26808,7 @@ def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -25492,18 +26827,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -25514,10 +26856,10 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore - def _copy_production_slot_initial( + def _copy_production_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25530,6 +26872,7 @@ def _copy_production_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -25538,6 +26881,7 @@ def _copy_production_slot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_production_slot_initial.metadata['url'], @@ -25545,7 +26889,11 @@ def _copy_production_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25555,11 +26903,11 @@ def _copy_production_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_production_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + _copy_production_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace - def begin_copy_production_slot( + def begin_copy_production_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25568,7 +26916,7 @@ def begin_copy_production_slot( ) -> LROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -25589,8 +26937,9 @@ def begin_copy_production_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25602,6 +26951,7 @@ def begin_copy_production_slot( resource_group_name=resource_group_name, name=name, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25623,10 +26973,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_production_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy'} # type: ignore + begin_copy_production_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotcopy"} # type: ignore @distributed_trace def list_slots( @@ -25637,7 +26986,7 @@ def list_slots( ) -> Iterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -25648,6 +26997,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25660,6 +27011,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -25671,6 +27023,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25688,7 +27041,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25702,7 +27059,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -25714,7 +27071,7 @@ def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -25733,18 +27090,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25761,7 +27125,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -25778,6 +27142,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -25787,6 +27152,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -25794,7 +27160,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25812,7 +27182,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -25827,8 +27197,8 @@ def begin_create_or_update_slot( """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. + 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 @@ -25852,8 +27222,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -25866,6 +27237,7 @@ def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25890,13 +27262,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25907,7 +27278,7 @@ def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -25916,11 +27287,11 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + plan is not deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -25933,12 +27304,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -25946,7 +27320,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -25957,7 +27335,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -25972,8 +27350,8 @@ def update_slot( """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. + 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 @@ -25996,6 +27374,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -26005,6 +27384,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -26012,7 +27392,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26031,7 +27415,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -26045,7 +27429,7 @@ def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -26053,7 +27437,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -26066,19 +27450,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26093,11 +27484,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26107,7 +27498,7 @@ def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -26129,6 +27520,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -26138,6 +27530,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -26145,7 +27538,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26156,7 +27553,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -26170,7 +27567,7 @@ def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -26193,6 +27590,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -26202,6 +27600,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -26209,7 +27608,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26224,7 +27627,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -26237,7 +27640,7 @@ def list_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -26252,6 +27655,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26265,6 +27670,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -26277,6 +27683,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26294,7 +27701,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26308,7 +27719,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def get_backup_status_slot( @@ -26321,7 +27732,7 @@ def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -26343,6 +27754,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -26350,12 +27763,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26370,11 +27788,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26384,7 +27802,7 @@ def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -26406,6 +27824,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -26413,12 +27833,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26429,7 +27854,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -26446,9 +27871,9 @@ def list_backup_status_secrets_slot( 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. + 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 @@ -26471,6 +27896,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -26481,6 +27907,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -26488,7 +27915,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26503,10 +27934,10 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - def _restore_slot_initial( + def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26521,6 +27952,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -26531,6 +27963,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -26538,7 +27971,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26548,11 +27985,11 @@ def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore_slot( + def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26563,7 +28000,7 @@ def begin_restore_slot( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -26588,8 +28025,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26603,6 +28041,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26624,10 +28063,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_configurations_slot( @@ -26639,7 +28077,7 @@ def list_configurations_slot( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -26655,6 +28093,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26668,6 +28108,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -26680,6 +28121,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26697,7 +28139,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26711,7 +28157,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -26724,7 +28170,7 @@ def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -26746,6 +28192,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -26755,6 +28202,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -26762,7 +28210,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26777,7 +28229,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -26790,7 +28242,7 @@ def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -26810,18 +28262,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26836,7 +28295,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -26850,7 +28309,7 @@ def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -26871,6 +28330,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -26880,6 +28340,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -26887,7 +28348,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26902,7 +28367,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -26915,7 +28380,7 @@ def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -26935,18 +28400,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26961,7 +28433,7 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace @@ -26975,8 +28447,7 @@ def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -26997,6 +28468,7 @@ def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -27006,6 +28478,7 @@ def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -27013,7 +28486,11 @@ def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27028,7 +28505,7 @@ def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -27041,7 +28518,7 @@ def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -27061,18 +28538,25 @@ def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27087,7 +28571,7 @@ def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -27101,7 +28585,7 @@ def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -27124,6 +28608,7 @@ def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -27133,6 +28618,7 @@ def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -27140,7 +28626,11 @@ def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27155,7 +28645,7 @@ def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -27168,7 +28658,7 @@ def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -27188,18 +28678,25 @@ def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27214,7 +28711,7 @@ def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -27228,7 +28725,7 @@ def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -27250,6 +28747,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27259,6 +28757,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -27266,7 +28765,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27281,11 +28784,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27294,7 +28797,7 @@ def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -27314,18 +28817,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27336,7 +28846,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -27349,7 +28859,7 @@ def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -27369,18 +28879,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27395,7 +28912,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -27409,7 +28926,7 @@ def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -27431,6 +28948,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -27440,6 +28958,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -27447,7 +28966,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27462,7 +28985,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -27475,7 +28998,7 @@ def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -27495,18 +29018,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27521,7 +29051,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -27534,7 +29064,7 @@ def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -27554,18 +29084,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27580,7 +29117,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -27594,7 +29131,7 @@ def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -27617,6 +29154,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -27626,6 +29164,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -27633,7 +29172,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27648,7 +29191,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -27662,7 +29205,7 @@ def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -27684,6 +29227,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -27693,6 +29237,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -27700,7 +29245,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27715,7 +29264,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -27728,7 +29277,7 @@ def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -27748,18 +29297,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27774,7 +29330,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -27790,18 +29346,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27815,7 +29378,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -27828,7 +29391,7 @@ def begin_list_publishing_credentials_slot( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -27849,7 +29412,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -27861,6 +29425,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -27884,10 +29449,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -27900,7 +29464,7 @@ def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -27921,6 +29485,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -27930,6 +29495,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -27937,7 +29503,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27952,7 +29522,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -27965,7 +29535,7 @@ def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -27984,18 +29554,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28010,7 +29587,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -28024,8 +29601,8 @@ def get_configuration_slot( """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. + 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 @@ -28045,18 +29622,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28071,7 +29655,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -28085,7 +29669,7 @@ def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -28107,6 +29691,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -28116,6 +29701,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -28123,7 +29709,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28138,7 +29728,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -28152,7 +29742,7 @@ def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -28174,6 +29764,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -28183,6 +29774,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -28190,7 +29782,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28205,7 +29801,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -28219,8 +29815,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -28236,6 +29832,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28249,6 +29847,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -28261,6 +29860,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28278,7 +29878,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28292,7 +29896,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -28305,7 +29909,7 @@ def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -28327,6 +29931,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -28334,12 +29940,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28354,11 +29965,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28368,7 +29979,7 @@ def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -28390,6 +30001,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -28397,12 +30010,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -28413,7 +30031,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -28426,7 +30044,7 @@ def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -28445,18 +30063,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28472,7 +30097,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -28485,7 +30110,7 @@ def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -28504,18 +30129,25 @@ def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28531,7 +30163,7 @@ def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -28544,7 +30176,7 @@ def list_continuous_web_jobs_slot( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -28560,6 +30192,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28573,6 +30207,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -28585,6 +30220,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28602,7 +30238,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28616,7 +30256,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -28629,7 +30269,7 @@ def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -28651,6 +30291,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28658,12 +30300,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28680,11 +30327,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28694,7 +30341,7 @@ def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -28716,6 +30363,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28723,12 +30372,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -28739,11 +30393,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28753,7 +30407,7 @@ def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -28775,6 +30429,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28782,12 +30438,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28798,11 +30459,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28812,7 +30473,7 @@ def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -28834,6 +30495,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -28841,12 +30504,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -28857,7 +30525,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -28870,7 +30538,7 @@ def list_deployments_slot( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -28885,6 +30553,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28898,6 +30568,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -28910,6 +30581,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28927,7 +30599,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28941,7 +30617,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -28954,7 +30630,7 @@ def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -28976,6 +30652,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -28983,12 +30661,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29003,7 +30686,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -29018,7 +30701,7 @@ def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -29042,6 +30725,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -29052,6 +30736,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -29059,7 +30744,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29074,11 +30763,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29088,7 +30777,7 @@ def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -29110,6 +30799,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -29117,12 +30808,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -29133,7 +30829,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -29147,7 +30843,7 @@ def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -29170,6 +30866,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -29177,12 +30875,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29197,7 +30900,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -29212,8 +30915,8 @@ def discover_backup_slot( """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. + 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 @@ -29236,6 +30939,7 @@ def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -29245,6 +30949,7 @@ def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -29252,7 +30957,11 @@ def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29267,7 +30976,7 @@ def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -29280,7 +30989,7 @@ def list_domain_ownership_identifiers_slot( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -29295,6 +31004,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29308,6 +31019,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -29320,6 +31032,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29337,7 +31050,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29351,7 +31068,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -29364,7 +31081,7 @@ def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -29386,6 +31103,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -29393,12 +31112,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29413,7 +31137,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29428,8 +31152,7 @@ def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -29453,6 +31176,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -29463,6 +31187,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -29470,7 +31195,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29485,11 +31214,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29499,7 +31228,7 @@ def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -29521,6 +31250,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -29528,12 +31259,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -29544,7 +31280,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29559,8 +31295,7 @@ def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -29584,6 +31319,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -29594,6 +31330,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -29601,7 +31338,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29616,7 +31357,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -29629,7 +31370,7 @@ def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -29648,18 +31389,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29674,7 +31422,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -29691,6 +31439,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -29700,6 +31449,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -29707,7 +31457,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -29723,7 +31477,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -29737,7 +31491,7 @@ def begin_create_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -29760,8 +31514,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -29774,6 +31529,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -29798,10 +31554,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -29813,7 +31568,7 @@ def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -29832,18 +31587,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29860,7 +31622,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -29873,7 +31635,7 @@ def list_instance_functions_slot( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -29888,6 +31650,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29901,6 +31665,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -29913,6 +31678,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29930,7 +31696,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -29944,7 +31714,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -29956,7 +31726,7 @@ def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -29975,18 +31745,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30001,7 +31778,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -30015,7 +31792,7 @@ def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -30036,6 +31813,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -30043,12 +31822,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30065,7 +31849,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -30083,6 +31867,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -30093,6 +31878,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -30100,7 +31886,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -30114,7 +31904,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -30129,7 +31919,7 @@ def begin_create_instance_function_slot( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -30154,8 +31944,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -30169,6 +31960,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -30193,13 +31985,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30209,7 +32000,7 @@ def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -30230,6 +32021,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -30237,12 +32030,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30253,7 +32051,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -30269,7 +32067,7 @@ def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -30294,6 +32092,7 @@ def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -30305,6 +32104,7 @@ def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -30312,7 +32112,11 @@ def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -30331,11 +32135,11 @@ def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret_slot( + def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30346,7 +32150,7 @@ def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -30369,6 +32173,8 @@ def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -30377,12 +32183,17 @@ def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30393,7 +32204,7 @@ def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -30407,7 +32218,7 @@ def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -30428,6 +32239,8 @@ def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -30435,12 +32248,17 @@ def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30455,7 +32273,7 @@ def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -30469,7 +32287,7 @@ def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -30490,6 +32308,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -30497,12 +32317,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30517,7 +32342,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -30530,7 +32355,7 @@ def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -30549,18 +32374,25 @@ def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30575,11 +32407,11 @@ def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status_slot( + def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30588,7 +32420,7 @@ def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -30607,18 +32439,25 @@ def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30629,11 +32468,11 @@ def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions_slot( + def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30642,7 +32481,7 @@ def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -30661,18 +32500,25 @@ def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30683,7 +32529,7 @@ def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace @@ -30699,7 +32545,7 @@ def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -30724,6 +32570,7 @@ def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -30735,6 +32582,7 @@ def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -30742,7 +32590,11 @@ def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -30761,11 +32613,11 @@ def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret_slot( + def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30776,7 +32628,7 @@ def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -30799,6 +32651,8 @@ def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -30807,12 +32661,17 @@ def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -30823,7 +32682,7 @@ def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -30836,7 +32695,7 @@ def list_host_name_bindings_slot( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -30852,6 +32711,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30865,6 +32726,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -30877,6 +32739,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30894,7 +32757,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30908,7 +32775,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -30921,7 +32788,7 @@ def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -30943,6 +32810,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -30950,12 +32819,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30970,7 +32844,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -30985,7 +32859,7 @@ def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -31010,6 +32884,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -31020,6 +32895,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -31027,7 +32903,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31042,11 +32922,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31056,7 +32936,7 @@ def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -31078,6 +32958,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -31085,12 +32967,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -31101,7 +32988,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -31116,7 +33003,7 @@ def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -31139,6 +33026,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -31147,12 +33036,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31167,7 +33061,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -31183,7 +33077,7 @@ def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -31208,6 +33102,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -31219,6 +33114,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -31226,7 +33122,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31241,11 +33141,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31256,7 +33156,7 @@ def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -31279,6 +33179,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -31287,12 +33189,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31303,7 +33210,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -31319,7 +33226,7 @@ def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -31344,6 +33251,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -31355,6 +33263,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -31362,7 +33271,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31377,7 +33290,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -31390,7 +33303,7 @@ def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -31409,18 +33322,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31435,7 +33355,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -31448,8 +33368,7 @@ def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -31469,18 +33388,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31495,7 +33421,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -31509,7 +33435,7 @@ def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -31531,6 +33457,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -31538,12 +33466,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31558,7 +33491,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31573,8 +33506,7 @@ def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -31598,6 +33530,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -31608,6 +33541,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -31615,7 +33549,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31630,11 +33568,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31644,7 +33582,7 @@ def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -31666,6 +33604,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -31673,12 +33613,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31689,7 +33634,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31704,8 +33649,7 @@ def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -31729,6 +33673,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -31739,6 +33684,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -31746,7 +33692,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31761,7 +33711,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -31774,7 +33724,7 @@ def list_instance_identifiers_slot( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -31790,6 +33740,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31803,6 +33755,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -31815,6 +33768,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31832,7 +33786,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31846,7 +33804,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_info_slot( @@ -31859,7 +33817,7 @@ def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -31881,6 +33839,8 @@ def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -31888,12 +33848,17 @@ def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31908,7 +33873,7 @@ def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -31922,7 +33887,7 @@ def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -31943,6 +33908,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -31950,12 +33917,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31970,7 +33942,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -31988,6 +33960,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -31998,6 +33971,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -32005,7 +33979,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -32021,7 +33999,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -32036,7 +34014,7 @@ def begin_create_instance_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -32061,8 +34039,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -32076,6 +34055,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -32100,10 +34080,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -32116,7 +34095,7 @@ def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -32137,6 +34116,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -32144,12 +34125,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32166,7 +34152,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -32181,8 +34167,8 @@ def list_instance_processes_slot( """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. + 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 @@ -32200,6 +34186,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32214,6 +34202,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -32227,6 +34216,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32244,7 +34234,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32258,7 +34252,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -32272,8 +34266,7 @@ def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -32298,6 +34291,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -32306,12 +34301,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32328,11 +34328,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32344,8 +34344,8 @@ def delete_instance_process_slot( """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. + 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 @@ -32370,6 +34370,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -32378,12 +34380,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -32394,7 +34401,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -32409,8 +34416,7 @@ def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -32435,6 +34441,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -32443,12 +34451,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32465,7 +34478,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -32481,8 +34494,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -32503,6 +34516,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32518,6 +34533,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -32532,6 +34548,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32549,7 +34566,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32563,7 +34584,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -32578,8 +34599,7 @@ def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -32606,6 +34626,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -32615,12 +34637,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32637,7 +34664,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -32652,8 +34679,7 @@ def list_instance_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -32674,6 +34700,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32689,6 +34717,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -32703,6 +34732,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32720,7 +34750,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32734,7 +34768,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable_slot( @@ -32746,7 +34780,7 @@ def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -32766,18 +34800,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32792,7 +34833,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -32805,7 +34846,7 @@ def list_site_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -32820,6 +34861,8 @@ def list_site_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32833,6 +34876,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -32845,6 +34889,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32862,7 +34907,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32876,7 +34925,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers_slot( @@ -32888,7 +34937,7 @@ def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -32907,18 +34956,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32933,7 +34989,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -32947,8 +35003,8 @@ def get_migrate_my_sql_status_slot( """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. + 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 @@ -32967,18 +35023,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32993,7 +35056,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -33006,7 +35069,7 @@ def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -33026,18 +35089,25 @@ def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33052,7 +35122,7 @@ def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -33069,9 +35139,9 @@ def create_or_update_swift_virtual_network_connection_slot( 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 + 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. @@ -33094,6 +35164,7 @@ def create_or_update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -33103,6 +35174,7 @@ def create_or_update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_slot.metadata['url'], @@ -33110,7 +35182,11 @@ def create_or_update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33125,11 +35201,11 @@ def create_or_update_swift_virtual_network_connection_slot( 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'} # type: ignore + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network_slot( + def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33138,7 +35214,7 @@ def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -33158,18 +35234,25 @@ def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33180,7 +35263,7 @@ def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -33197,9 +35280,9 @@ def update_swift_virtual_network_connection_slot( 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 + 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. @@ -33222,6 +35305,7 @@ def update_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -33231,6 +35315,7 @@ def update_swift_virtual_network_connection_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_slot.metadata['url'], @@ -33238,7 +35323,11 @@ def update_swift_virtual_network_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33253,7 +35342,7 @@ def update_swift_virtual_network_connection_slot( return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -33267,7 +35356,7 @@ def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -33289,6 +35378,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -33296,12 +35387,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33318,7 +35414,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -33332,8 +35428,7 @@ def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33355,6 +35450,8 @@ def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -33362,12 +35459,17 @@ def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33386,7 +35488,7 @@ def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -33402,7 +35504,7 @@ def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -33410,11 +35512,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -33427,12 +35529,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -33441,7 +35546,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33456,7 +35565,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_slot_initial( @@ -33475,12 +35584,15 @@ def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -33489,7 +35601,11 @@ def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33507,7 +35623,7 @@ def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -33523,7 +35639,7 @@ def begin_start_web_site_network_trace_operation_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -33531,11 +35647,11 @@ def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -33550,7 +35666,8 @@ def begin_start_web_site_network_trace_operation_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -33565,6 +35682,7 @@ def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -33588,13 +35706,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace_slot( + def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33603,7 +35720,7 @@ def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -33622,18 +35739,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -33644,7 +35768,7 @@ def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace @@ -33658,8 +35782,7 @@ def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33681,6 +35804,8 @@ def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -33688,12 +35813,17 @@ def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33708,7 +35838,7 @@ def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -33722,8 +35852,7 @@ def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33745,6 +35874,8 @@ def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -33752,12 +35883,17 @@ def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -33776,7 +35912,7 @@ def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -33790,8 +35926,7 @@ def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -33813,6 +35948,8 @@ def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -33820,12 +35957,17 @@ def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33840,11 +35982,11 @@ def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33853,8 +35995,7 @@ def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -33874,18 +36015,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -33896,7 +36044,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -33910,7 +36058,7 @@ def list_perf_mon_counters_slot( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -33920,7 +36068,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -33929,6 +36077,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33942,6 +36092,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -33955,6 +36106,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -33973,7 +36125,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33987,7 +36143,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -33999,7 +36155,7 @@ def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -34018,18 +36174,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34044,7 +36207,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -34057,7 +36220,7 @@ def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -34077,18 +36240,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34103,7 +36273,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -34117,7 +36287,7 @@ def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -34139,6 +36309,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -34146,12 +36318,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34166,7 +36343,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -34181,7 +36358,7 @@ def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -34205,6 +36382,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -34215,6 +36393,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -34222,7 +36401,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34237,11 +36420,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34251,7 +36434,7 @@ def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -34273,6 +36456,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -34280,12 +36465,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34296,7 +36486,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -34311,7 +36501,7 @@ def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -34335,6 +36525,7 @@ def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -34345,6 +36536,7 @@ def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -34352,7 +36544,11 @@ def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34367,7 +36563,7 @@ def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -34381,8 +36577,8 @@ def get_private_access_slot( """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. + 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 @@ -34401,18 +36597,25 @@ def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34427,7 +36630,7 @@ def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -34442,8 +36645,8 @@ def put_private_access_vnet_slot( """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. + 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 @@ -34464,6 +36667,7 @@ def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -34473,6 +36677,7 @@ def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -34480,7 +36685,11 @@ def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34495,7 +36704,7 @@ def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -34508,7 +36717,7 @@ def get_private_endpoint_connection( ) -> "_models.PrivateEndpointConnectionResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34527,18 +36736,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34553,7 +36769,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -34570,6 +36786,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -34579,6 +36796,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -34586,7 +36804,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -34604,7 +36826,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -34618,7 +36840,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.PrivateEndpointConnectionResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -34643,8 +36865,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.PrivateEndpointConnectionResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -34657,6 +36880,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -34681,10 +36905,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -34699,18 +36922,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -34731,7 +36961,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -34744,7 +36974,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34764,7 +36994,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -34776,6 +37007,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -34799,10 +37031,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -34813,7 +37044,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -34830,17 +37061,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34855,7 +37093,7 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -34869,8 +37107,8 @@ def list_processes_slot( """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. + 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 @@ -34885,6 +37123,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34898,6 +37138,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -34910,6 +37151,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34927,7 +37169,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34941,7 +37187,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -34954,8 +37200,7 @@ def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34977,6 +37222,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -34984,12 +37231,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35006,11 +37258,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35021,8 +37273,8 @@ def delete_process_slot( """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. + 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 @@ -35044,6 +37296,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -35051,12 +37305,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -35067,7 +37326,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -35081,8 +37340,7 @@ def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -35104,6 +37362,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -35111,12 +37371,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35133,7 +37398,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -35148,8 +37413,8 @@ def list_process_modules_slot( """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. + 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 @@ -35167,6 +37432,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35181,6 +37448,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -35194,6 +37462,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35211,7 +37480,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35225,7 +37498,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -35239,8 +37512,7 @@ def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -35264,6 +37536,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -35272,12 +37546,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35294,7 +37573,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -35308,8 +37587,7 @@ def list_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -35327,6 +37605,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35341,6 +37621,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -35354,6 +37635,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35371,7 +37653,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -35385,7 +37671,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -35397,7 +37683,7 @@ def list_public_certificates_slot( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -35413,6 +37699,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35426,6 +37714,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -35438,6 +37727,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -35455,7 +37745,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35469,7 +37763,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -35482,7 +37776,7 @@ def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -35504,6 +37798,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -35511,12 +37807,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35531,7 +37832,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -35546,7 +37847,7 @@ def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -35571,6 +37872,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -35581,6 +37883,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -35588,7 +37891,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35603,11 +37910,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35617,7 +37924,7 @@ def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -35639,6 +37946,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -35646,12 +37955,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35662,7 +37976,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -35676,7 +37990,7 @@ def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -35700,6 +38014,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -35709,6 +38024,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -35716,7 +38032,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35731,11 +38051,11 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35745,8 +38065,8 @@ def reset_slot_configuration_slot( """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. + 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 @@ -35766,18 +38086,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35788,11 +38115,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35803,7 +38130,7 @@ def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -35813,10 +38140,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -35829,12 +38157,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -35842,7 +38173,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35853,10 +38188,10 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - def _restore_from_backup_blob_slot_initial( + def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35870,6 +38205,7 @@ def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -35879,6 +38215,7 @@ def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -35886,7 +38223,11 @@ def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35896,11 +38237,11 @@ def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob_slot( + def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35910,7 +38251,7 @@ def begin_restore_from_backup_blob_slot( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -35933,8 +38274,9 @@ def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -35947,6 +38289,7 @@ def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -35968,12 +38311,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_slot_initial( + def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35987,6 +38329,7 @@ def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -35996,6 +38339,7 @@ def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -36003,7 +38347,11 @@ def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36013,11 +38361,11 @@ def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app_slot( + def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36027,7 +38375,7 @@ def begin_restore_from_deleted_app_slot( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -36049,8 +38397,9 @@ def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36063,6 +38412,7 @@ def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36084,12 +38434,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_slot_initial( + def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36103,6 +38452,7 @@ def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -36112,6 +38462,7 @@ def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -36119,7 +38470,11 @@ def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36129,11 +38484,11 @@ def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot_slot( + def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36143,7 +38498,7 @@ def begin_restore_snapshot_slot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -36166,8 +38521,9 @@ def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36180,6 +38536,7 @@ def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36201,10 +38558,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -36216,7 +38572,7 @@ def list_site_extensions_slot( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -36232,6 +38588,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36245,6 +38603,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -36257,6 +38616,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36274,7 +38634,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36288,7 +38652,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -36301,7 +38665,7 @@ def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -36323,6 +38687,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -36330,12 +38696,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36352,7 +38723,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -36369,6 +38740,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -36376,12 +38749,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -36400,7 +38778,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -36414,7 +38792,7 @@ def begin_install_site_extension_slot( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -36438,7 +38816,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -36451,6 +38830,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -36474,13 +38854,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36490,7 +38869,7 @@ def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -36512,6 +38891,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -36519,12 +38900,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -36535,10 +38921,10 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore - def _copy_slot_initial( + def _copy_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36552,6 +38938,7 @@ def _copy_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(copy_slot_entity, 'CsmCopySlotEntity') @@ -36561,6 +38948,7 @@ def _copy_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._copy_slot_initial.metadata['url'], @@ -36568,7 +38956,11 @@ def _copy_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36578,11 +38970,11 @@ def _copy_slot_initial( if cls: return cls(pipeline_response, None, {}) - _copy_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + _copy_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace - def begin_copy_slot( + def begin_copy_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36592,7 +38984,7 @@ def begin_copy_slot( ) -> LROPoller[None]: """Copies a deployment slot to another deployment slot of an app. - Description for Copies a deployment slot to another deployment slot of an app. + 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 @@ -36616,8 +39008,9 @@ def begin_copy_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36630,6 +39023,7 @@ def begin_copy_slot( name=name, slot=slot, copy_slot_entity=copy_slot_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36651,10 +39045,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_copy_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy'} # type: ignore + begin_copy_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotcopy"} # type: ignore @distributed_trace def list_slot_differences_slot( @@ -36667,7 +39060,7 @@ def list_slot_differences_slot( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -36685,6 +39078,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -36701,6 +39095,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -36716,6 +39111,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -36735,7 +39131,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36749,9 +39149,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36765,6 +39165,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -36774,6 +39175,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -36781,7 +39183,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36791,11 +39197,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36805,7 +39211,7 @@ def begin_swap_slot( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -36828,8 +39234,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -36842,6 +39249,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36863,10 +39271,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -36878,7 +39285,7 @@ def list_snapshots_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -36891,6 +39298,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36904,6 +39313,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -36916,6 +39326,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36933,7 +39344,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36947,7 +39362,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -36959,7 +39374,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -36972,6 +39387,8 @@ def list_snapshots_from_dr_secondary_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36985,6 +39402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -36997,6 +39415,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37014,7 +39433,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37028,7 +39451,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control_slot( @@ -37040,7 +39463,7 @@ def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -37060,18 +39483,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37093,7 +39523,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -37110,6 +39540,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -37119,6 +39550,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -37126,7 +39558,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37147,7 +39583,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -37161,7 +39597,7 @@ def begin_create_or_update_source_control_slot( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -37185,8 +39621,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -37199,6 +39636,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37223,13 +39661,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37238,7 +39675,7 @@ def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -37258,18 +39695,25 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -37280,7 +39724,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -37294,7 +39738,7 @@ def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -37316,6 +39760,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -37325,6 +39770,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -37332,7 +39778,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -37354,11 +39804,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37367,7 +39817,7 @@ def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -37387,18 +39837,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37409,7 +39866,7 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore def _start_network_trace_slot_initial( @@ -37428,12 +39885,15 @@ def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -37442,7 +39902,11 @@ def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37460,7 +39924,7 @@ def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace @@ -37476,7 +39940,7 @@ def begin_start_network_trace_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -37484,11 +39948,11 @@ def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -37503,7 +39967,8 @@ def begin_start_network_trace_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -37518,6 +39983,7 @@ def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -37541,13 +40007,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37556,7 +40021,7 @@ def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -37576,18 +40041,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37598,11 +40070,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def stop_network_trace_slot( + def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37611,7 +40083,7 @@ def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -37630,18 +40102,25 @@ def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37652,11 +40131,11 @@ def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37665,7 +40144,7 @@ def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -37684,18 +40163,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37706,11 +40192,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37719,7 +40205,7 @@ def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -37738,18 +40224,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -37760,7 +40253,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -37773,7 +40266,7 @@ def list_triggered_web_jobs_slot( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -37789,6 +40282,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37802,6 +40297,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -37814,6 +40310,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37831,7 +40328,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37845,7 +40346,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -37858,7 +40359,7 @@ def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -37880,6 +40381,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -37887,12 +40390,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37909,11 +40417,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37923,7 +40431,7 @@ def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -37945,6 +40453,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -37952,12 +40462,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37968,7 +40483,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -37982,7 +40497,7 @@ def list_triggered_web_job_history_slot( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -38000,6 +40515,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38014,6 +40531,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -38027,6 +40545,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38044,7 +40563,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38058,7 +40581,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -38072,8 +40595,7 @@ def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -38097,6 +40619,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -38105,12 +40629,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38127,11 +40656,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38141,7 +40670,7 @@ def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -38163,6 +40692,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -38170,12 +40701,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38186,7 +40722,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -38200,7 +40736,7 @@ def list_usages_slot( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -38212,7 +40748,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -38221,6 +40757,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38234,6 +40772,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -38247,6 +40786,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -38265,7 +40805,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38279,7 +40823,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -38291,7 +40835,7 @@ def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -38311,18 +40855,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38337,7 +40888,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -38351,7 +40902,7 @@ def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -38373,6 +40924,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -38380,12 +40933,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38400,7 +40958,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38416,8 +40974,8 @@ def create_or_update_vnet_connection_slot( """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). + 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 @@ -38441,6 +40999,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -38451,6 +41010,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -38458,7 +41018,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38473,11 +41037,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38487,8 +41051,7 @@ def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -38510,6 +41073,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -38517,12 +41082,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38533,7 +41103,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38549,8 +41119,8 @@ def update_vnet_connection_slot( """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). + 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 @@ -38574,6 +41144,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -38584,6 +41155,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -38591,7 +41163,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38606,7 +41182,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -38621,7 +41197,7 @@ def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -38645,6 +41221,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -38653,12 +41231,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -38675,7 +41258,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38691,7 +41274,7 @@ def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -38717,6 +41300,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -38728,6 +41312,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -38735,7 +41320,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38750,7 +41339,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38766,7 +41355,7 @@ def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -38792,6 +41381,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -38803,6 +41393,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -38810,7 +41401,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38825,7 +41420,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -38838,7 +41433,7 @@ def list_web_jobs_slot( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -38852,6 +41447,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38865,6 +41462,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -38877,6 +41475,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38894,7 +41493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38908,7 +41511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -38921,7 +41524,7 @@ def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -38943,6 +41546,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -38950,12 +41555,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38970,7 +41580,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -38983,7 +41593,7 @@ def list_slot_differences_from_production( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -38998,6 +41608,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -39013,6 +41624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -39027,6 +41639,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -39046,7 +41659,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39060,9 +41677,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39075,6 +41692,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -39083,6 +41701,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -39090,7 +41709,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39100,11 +41723,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39113,7 +41736,7 @@ def begin_swap_slot_with_production( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -39133,8 +41756,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -39146,6 +41770,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -39167,10 +41792,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -39181,7 +41805,7 @@ def list_snapshots( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -39192,6 +41816,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39204,6 +41830,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -39215,6 +41842,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39232,7 +41860,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39246,7 +41878,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -39257,7 +41889,7 @@ def list_snapshots_from_dr_secondary( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -39268,6 +41900,8 @@ def list_snapshots_from_dr_secondary( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39280,6 +41914,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -39291,6 +41926,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39308,7 +41944,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39322,7 +41962,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control( @@ -39333,7 +41973,7 @@ def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -39350,17 +41990,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39382,7 +42029,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -39398,6 +42045,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39406,6 +42054,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -39413,7 +42062,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39434,7 +42087,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39447,7 +42100,7 @@ def begin_create_or_update_source_control( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -39468,8 +42121,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_09_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -39481,6 +42135,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -39505,13 +42160,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39519,7 +42173,7 @@ def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -39536,17 +42190,24 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -39557,7 +42218,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39570,7 +42231,7 @@ def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -39589,6 +42250,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39597,6 +42259,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -39604,7 +42267,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39626,11 +42293,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39638,7 +42305,7 @@ def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -39655,17 +42322,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39676,7 +42350,7 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore def _start_network_trace_initial( @@ -39694,11 +42368,14 @@ def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -39707,7 +42384,11 @@ def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39725,7 +42406,7 @@ def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace @@ -39740,17 +42421,17 @@ def begin_start_network_trace( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -39765,7 +42446,8 @@ def begin_start_network_trace( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_09_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -39779,6 +42461,7 @@ def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -39802,13 +42485,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39816,7 +42498,7 @@ def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -39833,17 +42515,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39854,11 +42543,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def stop_network_trace( + def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39866,7 +42555,7 @@ def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -39883,17 +42572,24 @@ def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39904,11 +42600,11 @@ def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39916,7 +42612,7 @@ def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -39933,17 +42629,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39954,11 +42657,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39966,7 +42669,7 @@ def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -39983,17 +42686,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -40004,7 +42714,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -40016,7 +42726,7 @@ def list_triggered_web_jobs( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -40029,6 +42739,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40041,6 +42753,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -40052,6 +42765,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40069,7 +42783,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40083,7 +42801,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -40095,7 +42813,7 @@ def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -40114,18 +42832,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40142,11 +42867,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40155,7 +42880,7 @@ def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -40174,18 +42899,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -40196,7 +42928,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -40209,7 +42941,7 @@ def list_triggered_web_job_history( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -40224,6 +42956,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40237,6 +42971,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -40249,6 +42984,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40266,7 +43002,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40280,7 +43020,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -40293,8 +43033,7 @@ def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -40315,6 +43054,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -40322,12 +43063,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40344,11 +43090,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40357,7 +43103,7 @@ def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -40376,18 +43122,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40398,7 +43151,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -40411,7 +43164,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -40420,7 +43173,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -40429,6 +43182,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40441,6 +43196,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -40453,6 +43209,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -40471,7 +43228,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40485,7 +43246,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -40496,7 +43257,7 @@ def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -40513,17 +43274,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40538,7 +43306,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -40551,7 +43319,7 @@ def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -40570,18 +43338,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40596,7 +43371,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40611,8 +43386,8 @@ def create_or_update_vnet_connection( """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). + 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 @@ -40633,6 +43408,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40642,6 +43418,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -40649,7 +43426,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40664,11 +43445,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40677,8 +43458,7 @@ def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -40697,18 +43477,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40719,7 +43506,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40734,8 +43521,8 @@ def update_vnet_connection( """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). + 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 @@ -40756,6 +43543,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40765,6 +43553,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -40772,7 +43561,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40787,7 +43580,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40801,7 +43594,7 @@ def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -40822,6 +43615,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -40829,12 +43624,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40851,7 +43651,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40866,7 +43666,7 @@ def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40889,6 +43689,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40899,6 +43700,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -40906,7 +43708,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40921,7 +43727,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40936,7 +43742,7 @@ def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40959,6 +43765,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40969,6 +43776,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -40976,7 +43784,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40991,7 +43803,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -41003,7 +43815,7 @@ def list_web_jobs( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -41014,6 +43826,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41026,6 +43840,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -41037,6 +43852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41054,7 +43870,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41068,7 +43888,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -41080,7 +43900,7 @@ def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -41099,18 +43919,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41125,5 +43952,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_site_management_client_operations.py index b1c8b997a369..8d5a71e28ed9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,34 @@ def build_list_billing_meters_request( os_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') if os_type is not None: - query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,33 +231,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,29 +268,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -300,37 +305,38 @@ def build_list_geo_regions_request( linux_dynamic_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: - query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + _query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') if linux_dynamic_workers_enabled is not None: - query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -342,33 +348,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -379,29 +385,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -410,29 +417,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-09-01" + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -444,33 +452,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,34 +493,34 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -527,34 +535,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -569,34 +577,34 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -611,7 +619,7 @@ def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -624,14 +632,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -646,7 +661,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -657,7 +672,7 @@ def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2020_09_01.models.User @@ -672,11 +687,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -684,7 +701,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -699,7 +720,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -709,7 +730,7 @@ def list_source_controls( ) -> Iterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -718,6 +739,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -727,6 +750,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -735,6 +759,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -752,7 +777,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -766,7 +795,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -776,7 +805,7 @@ def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -791,15 +820,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -814,7 +850,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -826,7 +862,7 @@ def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -843,12 +879,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -856,7 +894,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -871,7 +913,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -883,11 +925,11 @@ def list_billing_meters( ) -> Iterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -895,6 +937,8 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -905,6 +949,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -916,6 +961,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -935,7 +981,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -949,7 +999,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace def check_name_availability( @@ -961,13 +1011,13 @@ def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2020_09_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -980,6 +1030,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -987,6 +1038,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -994,7 +1046,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1009,7 +1065,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -1019,7 +1075,7 @@ def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -1032,15 +1088,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1055,7 +1118,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -1069,24 +1132,26 @@ def list_geo_regions( ) -> Iterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2020_09_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1097,6 +1162,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1110,6 +1176,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1131,7 +1198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1145,7 +1216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1155,7 +1226,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> Iterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2020_09_01.models.NameIdentifier @@ -1165,6 +1236,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1178,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1190,6 +1263,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1209,7 +1283,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1223,7 +1301,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1232,7 +1310,7 @@ def list_premier_add_on_offers( ) -> Iterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -1241,6 +1319,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_09_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1251,6 +1331,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1260,6 +1341,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1277,7 +1359,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1291,7 +1377,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1300,7 +1386,7 @@ def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -1313,15 +1399,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1336,7 +1429,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1348,8 +1441,8 @@ def verify_hosting_environment_vnet( """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. + 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 @@ -1364,12 +1457,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1377,7 +1472,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,11 +1491,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1404,7 +1503,7 @@ def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -1421,6 +1520,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1428,6 +1528,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1435,7 +1536,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1446,7 +1551,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1458,7 +1563,7 @@ def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -1475,6 +1580,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1482,6 +1588,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1489,7 +1596,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1504,11 +1615,11 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1516,7 +1627,7 @@ def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -1533,6 +1644,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-09-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1540,6 +1652,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1547,7 +1660,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1558,5 +1675,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_configuration.py index c0799b14e6e8..b24980640e09 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2020-12-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-12-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_metadata.json index c647c2119739..38468a8defbb 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -122,192 +122,192 @@ "get_publishing_user" : { "sync": { "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_publishing_user(\n self,\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "update_publishing_user" : { "sync": { "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_12_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_12_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_12_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2020_12_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "user_details" }, "list_source_controls" : { "sync": { "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.SourceControlCollection\"]\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_source_controls(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_source_control" : { "sync": { "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type" }, "update_source_control" : { "sync": { "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type, request_message" }, "list_billing_meters" : { "sync": { "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.BillingMeterCollection\"]\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "billing_location, os_type" }, "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, "get_subscription_deployment_locations" : { "sync": { "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.DeploymentLocations\"\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs: Any\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" }, "list_site_identifiers_assigned_to_host_name" : { "sync": { "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.IdentifierCollection\"]\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name_identifier" }, "list_premier_add_on_offers" : { "sync": { "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.PremierAddOnOfferCollection\"]\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_premier_add_on_offers(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_skus" : { "sync": { "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SkuInfos\"\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def list_skus(\n self,\n **kwargs: Any\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "verify_hosting_environment_vnet" : { "sync": { "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.VnetValidationFailureDetails\"\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs: Any\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2020_12_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "parameters" }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" }, "validate" : { "sync": { "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ValidateResponse\"\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs: Any\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2020_12_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2020_12_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, validate_request" }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2020_12_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" } diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_web_site_management_client.py index a27f0207b8d3..9677a8a2af82 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -69,8 +70,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2020-12-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -110,7 +114,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_configuration.py index ef769a7a6bae..d5a172407db0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2020-12-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-12-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_web_site_management_client.py index ac9c66693de9..c7e1802a5262 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -69,8 +70,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2020-12-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_certificate_orders_operations.py index b5d7477c23af..004177768dee 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,17 +121,17 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -140,12 +147,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -153,7 +162,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -164,7 +177,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -175,7 +188,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -186,6 +199,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -197,6 +212,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -207,6 +223,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -224,7 +241,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +259,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -249,7 +270,7 @@ async def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -266,17 +287,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -291,7 +319,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -307,6 +335,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -315,6 +344,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -322,7 +352,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -340,7 +374,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -353,7 +387,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -376,8 +410,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -389,6 +424,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -413,13 +449,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -427,7 +462,7 @@ async def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -444,17 +479,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -465,7 +507,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -478,7 +520,7 @@ async def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -498,6 +540,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -506,6 +549,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -513,7 +557,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -532,7 +580,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -544,7 +592,7 @@ def list_certificates( ) -> AsyncIterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -557,6 +605,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +619,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -580,6 +631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -597,7 +649,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -611,7 +667,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -623,7 +679,7 @@ async def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -642,18 +698,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -668,7 +731,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -685,6 +748,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -694,6 +758,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -701,7 +766,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -719,7 +788,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -733,7 +802,7 @@ async def begin_create_or_update_certificate( ) -> AsyncLROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -757,8 +826,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -771,6 +841,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -795,13 +866,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -810,7 +880,7 @@ async def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -829,18 +899,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -851,7 +928,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -865,7 +942,7 @@ async def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -887,6 +964,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -896,6 +974,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -903,7 +982,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -922,11 +1005,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -935,7 +1018,7 @@ async def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -955,6 +1038,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -963,6 +1047,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -970,7 +1055,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -981,11 +1070,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -994,7 +1083,7 @@ async def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1014,6 +1103,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1022,6 +1112,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1029,7 +1120,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1040,11 +1135,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1052,7 +1147,7 @@ async def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1069,17 +1164,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1090,11 +1192,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1103,7 +1205,7 @@ async def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1122,6 +1224,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1130,6 +1233,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1137,7 +1241,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1148,7 +1256,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1161,7 +1269,7 @@ async def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1180,6 +1288,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1188,6 +1297,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1195,7 +1305,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,11 +1324,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1222,7 +1336,7 @@ async def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1239,17 +1353,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1260,7 +1381,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1272,7 +1393,7 @@ async def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -1289,17 +1410,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1442,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1326,7 +1454,7 @@ async def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -1343,17 +1471,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,5 +1503,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_environments_operations.py index 29adae783372..eb8d84e505dc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -292,7 +320,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -305,7 +333,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -328,8 +356,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -341,6 +370,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -365,12 +395,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,18 +412,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -404,11 +440,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -417,7 +453,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -438,7 +474,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -450,6 +487,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -470,10 +508,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -485,7 +522,7 @@ async def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -505,6 +542,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -513,6 +551,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -520,7 +559,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -542,7 +585,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -554,7 +597,7 @@ def list_capacities( ) -> AsyncIterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -567,6 +610,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -579,6 +624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -590,6 +636,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -607,7 +654,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +672,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def get_vip_info( @@ -632,7 +683,7 @@ async def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -649,17 +700,24 @@ async def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +732,7 @@ async def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore async def _change_vnet_initial( @@ -690,6 +748,7 @@ async def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -698,6 +757,7 @@ async def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -705,7 +765,11 @@ async def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -723,7 +787,7 @@ async def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -736,7 +800,7 @@ async def begin_change_vnet( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -759,6 +823,7 @@ async def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -774,6 +839,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -788,6 +854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -807,7 +874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -818,7 +889,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -830,6 +901,7 @@ async def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -840,8 +912,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -857,10 +928,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -872,7 +942,7 @@ async def get_ase_v3_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Get networking configuration of an App Service Environment. - Description for Get networking configuration of an App Service Environment. + 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 @@ -889,17 +959,24 @@ async def get_ase_v3_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ase_v3_networking_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ase_v3_networking_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +991,7 @@ async def get_ase_v3_networking_configuration( return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + get_ase_v3_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace_async @@ -927,7 +1004,7 @@ async def update_ase_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Update networking configuration of an App Service Environment. - Description for Update networking configuration of an App Service Environment. + 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 @@ -947,6 +1024,7 @@ async def update_ase_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') @@ -955,6 +1033,7 @@ async def update_ase_networking_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ase_networking_configuration.metadata['url'], @@ -962,7 +1041,11 @@ async def update_ase_networking_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,7 +1060,7 @@ async def update_ase_networking_configuration( return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + update_ase_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace_async @@ -989,7 +1072,7 @@ async def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -1006,17 +1089,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,7 +1121,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -1044,7 +1134,7 @@ async def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -1063,18 +1153,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1089,7 +1186,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -1101,8 +1198,7 @@ def get_inbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -1115,6 +1211,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1127,6 +1225,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1138,6 +1237,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1155,7 +1255,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1169,7 +1273,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -1180,7 +1284,7 @@ def list_multi_role_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -1193,6 +1297,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1205,6 +1311,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -1216,6 +1323,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1233,7 +1341,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1247,7 +1359,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1258,7 +1370,7 @@ async def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -1275,17 +1387,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1300,7 +1419,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1316,6 +1435,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1324,6 +1444,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1331,7 +1452,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1349,7 +1474,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1362,7 +1487,7 @@ async def begin_create_or_update_multi_role_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -1384,8 +1509,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1397,6 +1523,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1421,10 +1548,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1436,7 +1562,7 @@ async def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -1455,6 +1581,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1463,6 +1590,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1470,7 +1598,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1489,7 +1621,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1503,8 +1635,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -1519,6 +1651,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1532,6 +1666,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1544,6 +1679,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1561,7 +1697,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1575,7 +1715,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1586,7 +1726,7 @@ def list_multi_role_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -1599,6 +1739,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1611,6 +1753,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1622,6 +1765,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1639,7 +1783,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1653,7 +1801,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1664,7 +1812,7 @@ def list_multi_role_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -1676,6 +1824,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1688,6 +1838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1699,6 +1850,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1716,7 +1868,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1730,7 +1886,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1741,7 +1897,7 @@ def list_multi_role_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -1753,6 +1909,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1765,6 +1923,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1776,6 +1935,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1793,7 +1953,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1807,7 +1971,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -1818,7 +1982,7 @@ async def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -1835,17 +1999,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1860,7 +2031,7 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -1872,8 +2043,7 @@ def get_outbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -1886,6 +2056,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1898,6 +2070,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1909,6 +2082,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1926,7 +2100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1940,7 +2118,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def get_private_endpoint_connection_list( @@ -1951,7 +2129,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoints associated with a hosting environment. - Description for Gets the list of private endpoints associated with a hosting environment. + 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 @@ -1964,6 +2142,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1976,6 +2156,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -1987,6 +2168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2004,7 +2186,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2018,7 +2204,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -2030,7 +2216,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2049,18 +2235,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2075,7 +2268,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -2092,6 +2285,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -2101,6 +2295,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -2108,7 +2303,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2126,7 +2325,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -2140,7 +2339,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -2165,8 +2364,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2179,6 +2379,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2203,10 +2404,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -2221,18 +2421,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2253,7 +2460,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -2266,7 +2473,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2286,7 +2493,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -2298,6 +2506,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2321,10 +2530,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -2335,7 +2543,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2352,17 +2560,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2377,11 +2592,11 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2389,7 +2604,7 @@ async def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -2406,17 +2621,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -2427,7 +2649,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -2442,17 +2664,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2470,7 +2699,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -2482,7 +2711,7 @@ async def begin_resume( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -2503,6 +2732,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2515,6 +2746,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -2526,6 +2758,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2543,7 +2776,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2554,7 +2791,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2565,6 +2802,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2574,8 +2812,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2591,10 +2828,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2606,7 +2842,7 @@ def list_app_service_plans( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -2619,6 +2855,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2631,6 +2869,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2642,6 +2881,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2659,7 +2899,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2673,7 +2917,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2685,13 +2929,14 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2699,6 +2944,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2711,6 +2958,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2723,6 +2971,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2741,7 +2990,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2755,7 +3008,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2769,17 +3022,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2797,7 +3057,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2809,7 +3069,7 @@ async def begin_suspend( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -2830,6 +3090,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2842,6 +3104,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2853,6 +3116,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2870,7 +3134,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2881,7 +3149,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2892,6 +3160,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2901,8 +3170,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2918,10 +3186,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2934,7 +3201,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -2943,7 +3210,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2952,6 +3219,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2964,6 +3233,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2976,6 +3246,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2994,7 +3265,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3008,7 +3283,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -3019,7 +3294,7 @@ def list_worker_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -3032,6 +3307,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3044,6 +3321,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -3055,6 +3333,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3072,7 +3351,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3086,7 +3369,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -3098,7 +3381,7 @@ async def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -3117,18 +3400,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3143,7 +3433,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -3160,6 +3450,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3169,6 +3460,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -3176,7 +3468,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3194,7 +3490,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -3208,7 +3504,7 @@ async def begin_create_or_update_worker_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -3232,8 +3528,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3246,6 +3543,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3270,10 +3568,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -3286,7 +3583,7 @@ async def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -3307,6 +3604,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3316,6 +3614,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -3323,7 +3622,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3342,7 +3645,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -3356,8 +3659,7 @@ def list_worker_pool_instance_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -3374,6 +3676,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3388,6 +3692,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3401,6 +3706,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3418,7 +3724,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3432,7 +3742,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -3444,7 +3754,7 @@ def list_web_worker_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -3459,6 +3769,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3472,6 +3784,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3484,6 +3797,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3501,7 +3815,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3515,7 +3833,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -3527,7 +3845,7 @@ def list_worker_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -3541,6 +3859,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3554,6 +3874,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3566,6 +3887,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3583,7 +3905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3597,7 +3923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3609,7 +3935,7 @@ def list_web_worker_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -3623,6 +3949,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3636,6 +3964,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3648,6 +3977,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3665,7 +3995,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3679,4 +4013,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_plans_operations.py index dd2097ba379f..5c4a0402c456 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -131,7 +138,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -142,6 +149,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -153,6 +162,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -163,6 +173,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -180,7 +191,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +209,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -205,7 +220,7 @@ async def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -222,17 +237,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -249,7 +271,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -265,6 +287,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -273,6 +296,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -280,7 +304,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -298,7 +326,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -311,7 +339,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -332,8 +360,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -345,6 +374,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -369,13 +399,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,7 +412,7 @@ async def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -400,17 +429,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -421,7 +457,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -434,7 +470,7 @@ async def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -453,6 +489,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -461,6 +498,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -468,7 +506,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -487,7 +529,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -499,7 +541,7 @@ async def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -516,17 +558,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -541,7 +590,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -555,7 +604,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -576,6 +625,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -583,12 +634,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -603,11 +659,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -617,7 +673,7 @@ async def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -638,6 +694,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -645,12 +703,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -661,7 +724,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -675,7 +738,7 @@ async def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -696,6 +759,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -703,12 +768,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -723,7 +793,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -737,7 +807,7 @@ def list_web_apps_by_hybrid_connection( ) -> AsyncIterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -753,6 +823,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -767,6 +839,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -780,6 +853,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -797,7 +871,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -811,7 +889,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -822,7 +900,7 @@ async def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -839,17 +917,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,7 +949,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -876,7 +961,7 @@ def list_hybrid_connections( ) -> AsyncIterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -889,6 +974,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -901,6 +988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -912,6 +1000,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -929,7 +1018,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -943,10 +1036,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -955,7 +1048,7 @@ async def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -976,18 +1069,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -998,7 +1098,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1013,7 +1113,7 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -1021,12 +1121,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1034,6 +1135,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1046,6 +1149,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1060,6 +1164,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1080,7 +1185,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1094,7 +1203,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1105,7 +1214,7 @@ async def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -1122,17 +1231,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1147,7 +1263,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1160,14 +1276,15 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1176,6 +1293,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1188,6 +1307,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1200,6 +1320,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1218,7 +1339,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1232,7 +1357,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1243,7 +1368,7 @@ async def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -1260,17 +1385,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1285,7 +1417,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1298,7 +1430,7 @@ async def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -1317,18 +1449,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1345,7 +1484,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1359,7 +1498,7 @@ async def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -1380,6 +1519,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1387,12 +1528,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1407,7 +1553,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1422,7 +1568,7 @@ async def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -1445,6 +1591,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1455,6 +1602,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1462,7 +1610,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1477,7 +1629,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1490,8 +1642,7 @@ async def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -1510,18 +1661,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1694,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1550,7 +1708,7 @@ async def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -1571,6 +1729,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1578,12 +1738,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1600,7 +1765,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1615,7 +1780,7 @@ async def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1638,6 +1803,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1648,6 +1814,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1655,7 +1822,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1672,11 +1843,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1686,7 +1857,7 @@ async def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -1707,6 +1878,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1714,12 +1887,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1730,7 +1908,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1745,7 +1923,7 @@ async def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1768,6 +1946,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1778,6 +1957,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1785,7 +1965,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1802,11 +1986,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1815,7 +1999,7 @@ async def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -1834,18 +2018,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1856,5 +2047,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_orders_diagnostics_operations.py index 7eaa8a901a66..2676a2fd0446 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_orders_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_orders_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ def list_app_service_certificate_order_detector_response( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """Microsoft.CertificateRegistration to get the list of detectors for this RP. - Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + 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 @@ -69,6 +68,8 @@ def list_app_service_certificate_order_detector_response( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_certificate_order_detector_response.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + list_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors"} # type: ignore @distributed_trace_async async def get_app_service_certificate_order_detector_response( @@ -138,8 +145,7 @@ async def get_app_service_certificate_order_detector_response( ) -> "_models.DetectorResponse": """Microsoft.CertificateRegistration call to get a detector response from App Lens. - Description for Microsoft.CertificateRegistration call to get a detector response from App - Lens. + 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 @@ -147,11 +153,11 @@ async def get_app_service_certificate_order_detector_response( :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. + :param start_time: The start time for detector response. Default value is None. :type start_time: ~datetime.datetime - :param end_time: The end time for the detector response. + :param end_time: The end time for the detector response. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: The time grain for the detector response. + :param time_grain: The time grain for the detector response. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -164,12 +170,15 @@ async def get_app_service_certificate_order_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_app_service_certificate_order_detector_response_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -178,7 +187,11 @@ async def get_app_service_certificate_order_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -193,5 +206,5 @@ async def get_app_service_certificate_order_detector_response( return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore + get_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py index e8a945f41e0c..1d9c15213dc4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificates_operations.py index 64ea7e3dc443..b2d12ae20fc7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -54,10 +53,10 @@ def list( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :param filter: Return only information specified in the filter (using OData syntax). For - example: $filter=KeyVaultId eq 'KeyVaultId'. + example: $filter=KeyVaultId eq 'KeyVaultId'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -66,6 +65,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -76,6 +77,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list.metadata['url'], ) @@ -86,6 +88,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -104,7 +107,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -118,7 +125,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -128,7 +135,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -139,6 +146,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -150,6 +159,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -160,6 +170,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,7 +266,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -257,7 +279,7 @@ async def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -276,6 +298,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -284,6 +307,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -291,7 +315,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -306,11 +334,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -318,7 +346,7 @@ async def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -335,17 +363,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -356,7 +391,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -369,7 +404,7 @@ async def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -388,6 +423,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -396,6 +432,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -403,7 +440,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -418,5 +459,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_deleted_web_apps_operations.py index 0802f0f2110b..1d0fbdb44667 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -122,7 +129,7 @@ def list_by_location( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -133,6 +140,8 @@ def list_by_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace_async async def get_deleted_web_app_by_location( @@ -196,7 +211,7 @@ async def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -213,17 +228,24 @@ async def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,5 +260,5 @@ async def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_diagnostics_operations.py index 5e8ec4700d68..99822ae383d9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list_hosting_environment_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -138,7 +145,7 @@ async def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -146,11 +153,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -163,12 +170,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -177,7 +187,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +206,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -204,7 +218,7 @@ def list_site_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -217,6 +231,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -229,6 +245,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -240,6 +257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,7 +293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -286,7 +308,7 @@ async def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -294,11 +316,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -311,12 +333,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -325,7 +350,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,7 +369,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -352,7 +381,7 @@ def list_site_diagnostic_categories( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -365,6 +394,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -377,6 +408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -388,6 +420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -405,7 +438,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -419,7 +456,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -431,7 +468,7 @@ async def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -450,18 +487,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -476,7 +520,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -489,7 +533,7 @@ def list_site_analyses( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -504,6 +548,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -517,6 +563,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -529,6 +576,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -546,7 +594,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -560,7 +612,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -573,7 +625,7 @@ async def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -594,6 +646,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -601,12 +655,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +680,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -638,7 +697,7 @@ async def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -648,11 +707,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -665,6 +724,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -672,6 +733,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -680,7 +742,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -695,7 +761,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -708,7 +774,7 @@ def list_site_detectors( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -723,6 +789,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +804,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -748,6 +817,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -765,7 +835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -779,7 +853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector( @@ -792,7 +866,7 @@ async def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -813,6 +887,8 @@ async def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -820,12 +896,17 @@ async def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -840,7 +921,7 @@ async def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -857,7 +938,7 @@ async def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -867,11 +948,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -884,6 +965,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -891,6 +974,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -899,7 +983,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +1002,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -927,7 +1015,7 @@ def list_site_detector_responses_slot( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -942,6 +1030,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -955,6 +1045,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -967,6 +1058,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -984,7 +1076,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -998,7 +1094,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1014,7 +1110,7 @@ async def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1024,11 +1120,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1041,6 +1137,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1048,6 +1146,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1056,7 +1155,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1071,7 +1174,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1084,7 +1187,7 @@ def list_site_diagnostic_categories_slot( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1099,6 +1202,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1112,6 +1217,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1124,6 +1230,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1141,7 +1248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1155,7 +1266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1168,7 +1279,7 @@ async def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1189,6 +1300,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1196,12 +1309,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1216,7 +1334,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1230,7 +1348,7 @@ def list_site_analyses_slot( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1247,6 +1365,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1261,6 +1381,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1274,6 +1395,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1291,7 +1413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1305,7 +1431,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1319,7 +1445,7 @@ async def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1342,6 +1468,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1350,12 +1478,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1370,7 +1503,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1388,7 +1521,7 @@ async def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1400,11 +1533,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1417,6 +1550,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1425,6 +1560,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1433,7 +1569,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1448,7 +1588,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1462,7 +1602,7 @@ def list_site_detectors_slot( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1479,6 +1619,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1493,6 +1635,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1506,6 +1649,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1523,7 +1667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1537,7 +1685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_slot( @@ -1551,7 +1699,7 @@ async def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1574,6 +1722,8 @@ async def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1582,12 +1732,17 @@ async def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1602,7 +1757,7 @@ async def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -1620,7 +1775,7 @@ async def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1632,11 +1787,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1649,6 +1804,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1657,6 +1814,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1665,7 +1823,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1680,5 +1842,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domain_registration_provider_operations.py index becab1e0373a..0fcf20b96b60 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domains_operations.py index 1cc839d4d5ec..b110cf032fed 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ async def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -99,7 +104,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -109,7 +114,7 @@ def list( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) @@ -117,6 +122,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -127,6 +134,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -136,6 +144,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -153,7 +162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -167,7 +180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -176,7 +189,7 @@ async def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -189,15 +202,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +232,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -223,7 +243,7 @@ def list_recommendations( ) -> AsyncIterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2020_12_01.models.DomainRecommendationSearchParameters @@ -234,6 +254,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -247,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -259,6 +281,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -278,7 +301,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -292,7 +319,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -302,7 +329,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -312,6 +339,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -323,6 +352,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -333,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -350,7 +381,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -364,7 +399,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -375,7 +410,7 @@ async def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -392,17 +427,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +459,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -433,6 +475,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -441,6 +484,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -448,7 +492,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -466,7 +514,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -479,7 +527,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -500,8 +548,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -513,6 +562,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -537,13 +587,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -552,7 +601,7 @@ async def delete( ) -> None: """Delete a domain. - Description for 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 @@ -572,18 +621,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -594,7 +650,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -607,7 +663,7 @@ async def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -626,6 +682,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -634,6 +691,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -641,7 +699,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -660,7 +722,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -672,7 +734,7 @@ def list_ownership_identifiers( ) -> AsyncIterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -685,6 +747,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -697,6 +761,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -708,6 +773,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -725,7 +791,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -739,7 +809,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -751,7 +821,7 @@ async def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -770,18 +840,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -796,7 +873,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -811,8 +888,8 @@ async def create_or_update_ownership_identifier( """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. + 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 @@ -833,6 +910,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -842,6 +920,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -849,7 +928,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,11 +947,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -877,7 +960,7 @@ async def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -896,18 +979,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -918,7 +1008,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -933,8 +1023,8 @@ async def update_ownership_identifier( """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. + 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 @@ -955,6 +1045,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -964,6 +1055,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -971,7 +1063,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -986,11 +1082,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -998,7 +1094,7 @@ async def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1015,17 +1111,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1036,5 +1139,5 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_global_operations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_global_operations_operations.py index aee63222b586..607607dca6ff 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_global_operations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_global_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse @@ -52,7 +51,7 @@ async def get_deleted_web_app( ) -> "_models.DeletedSite": """Get deleted app for a subscription. - Description for Get deleted app for a subscription. + 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 @@ -67,16 +66,23 @@ async def get_deleted_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deleted_web_app_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -91,7 +97,7 @@ async def get_deleted_web_app( return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}"} # type: ignore @distributed_trace_async @@ -102,7 +108,7 @@ async def get_deleted_web_app_snapshots( ) -> List["_models.Snapshot"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + 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 @@ -117,16 +123,23 @@ async def get_deleted_web_app_snapshots( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deleted_web_app_snapshots_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_snapshots.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -141,11 +154,11 @@ async def get_deleted_web_app_snapshots( return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + get_deleted_web_app_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots"} # type: ignore @distributed_trace_async - async def get_subscription_operation_with_async_response( + async def get_subscription_operation_with_async_response( # pylint: disable=inconsistent-return-statements self, location: str, operation_id: str, @@ -153,7 +166,7 @@ async def get_subscription_operation_with_async_response( ) -> None: """Gets an operation in a subscription and given region. - Description for Gets an operation in a subscription and given region. + Gets an operation in a subscription and given region. :param location: Location name. :type location: str @@ -170,17 +183,24 @@ async def get_subscription_operation_with_async_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_subscription_operation_with_async_response_request( location=location, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_operation_with_async_response.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -191,5 +211,5 @@ async def get_subscription_operation_with_async_response( if cls: return cls(pipeline_response, None, {}) - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore + get_subscription_operation_with_async_response.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_provider_operations.py index 37774a1e9fe9..034405a0db32 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,9 +52,9 @@ def get_available_stacks( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_12_01.models.Enum4 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -115,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def get_function_app_stacks( @@ -125,9 +131,9 @@ def get_function_app_stacks( ) -> AsyncIterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions. - Description for Get available Function app frameworks and their versions. + Get available Function app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -136,6 +142,8 @@ def get_function_app_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks.metadata['url'], ) @@ -154,6 +163,7 @@ def prepare_request(next_link=None): else: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + get_function_app_stacks.metadata = {'url': "/providers/Microsoft.Web/functionAppStacks"} # type: ignore @distributed_trace def get_function_app_stacks_for_location( @@ -197,11 +211,11 @@ def get_function_app_stacks_for_location( ) -> AsyncIterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions for location. - Description for Get available Function app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum6 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -210,6 +224,8 @@ def get_function_app_stacks_for_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -220,6 +236,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks_for_location.metadata['url'], ) @@ -230,6 +247,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -248,7 +266,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -262,7 +284,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + get_function_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/functionAppStacks"} # type: ignore @distributed_trace def get_web_app_stacks_for_location( @@ -273,11 +295,11 @@ def get_web_app_stacks_for_location( ) -> AsyncIterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions for location. - Description for Get available Web app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum7 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -286,6 +308,8 @@ def get_web_app_stacks_for_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -296,6 +320,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks_for_location.metadata['url'], ) @@ -306,6 +331,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -324,7 +350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,7 +368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + get_web_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/webAppStacks"} # type: ignore @distributed_trace def list_operations( @@ -348,8 +378,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -358,6 +388,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -367,6 +399,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -375,6 +408,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -392,7 +426,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -406,7 +444,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_web_app_stacks( @@ -416,9 +454,9 @@ def get_web_app_stacks( ) -> AsyncIterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions. - Description for Get available Web app frameworks and their versions. + Get available Web app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum8 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -427,6 +465,8 @@ def get_web_app_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -436,6 +476,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks.metadata['url'], ) @@ -445,6 +486,7 @@ def prepare_request(next_link=None): else: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -463,7 +505,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -477,7 +523,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + get_web_app_stacks.metadata = {'url': "/providers/Microsoft.Web/webAppStacks"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -487,9 +533,9 @@ def get_available_stacks_on_prem( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_12_01.models.Enum9 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -498,6 +544,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -508,6 +556,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -518,6 +567,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -536,7 +586,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -550,4 +604,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_recommendations_operations.py index b8695e96a948..28fbb2e18f0b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,14 +54,14 @@ def list( ) -> AsyncIterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -125,16 +132,16 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -147,15 +154,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -166,19 +180,18 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -193,16 +206,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -213,7 +233,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -227,7 +247,7 @@ def list_history_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -238,7 +258,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -247,6 +267,8 @@ def list_history_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -259,6 +281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -272,6 +295,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -291,7 +315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -305,7 +333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -318,7 +346,7 @@ def list_recommended_rules_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -328,7 +356,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -337,6 +365,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -349,6 +379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -362,6 +393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -381,7 +413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,10 +431,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_hosting_environment( + async def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -407,7 +443,7 @@ async def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -426,18 +462,25 @@ async def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -448,11 +491,11 @@ async def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_hosting_environment( + async def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -461,7 +504,7 @@ async def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -480,18 +523,25 @@ async def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -502,7 +552,7 @@ async def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -517,7 +567,7 @@ async def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -526,10 +576,10 @@ async def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -542,12 +592,15 @@ async def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -555,7 +608,11 @@ async def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -570,11 +627,11 @@ async def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_hosting_environment( + async def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -584,7 +641,7 @@ async def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -605,19 +662,26 @@ async def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -628,7 +692,7 @@ async def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -642,7 +706,7 @@ def list_history_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -653,7 +717,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -662,6 +726,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -674,6 +740,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -687,6 +754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -706,7 +774,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -720,7 +792,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -733,7 +805,7 @@ def list_recommended_rules_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -743,7 +815,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -752,6 +824,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -764,6 +838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -777,6 +852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -796,7 +872,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -810,10 +890,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -821,7 +901,7 @@ async def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -838,17 +918,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -859,11 +946,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -871,7 +958,7 @@ async def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -888,17 +975,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -909,7 +1003,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -924,7 +1018,7 @@ async def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -933,10 +1027,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -949,12 +1043,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -962,7 +1059,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,11 +1078,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -990,7 +1091,7 @@ async def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1009,18 +1110,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,5 +1139,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_resource_health_metadata_operations.py index be0fa91e01bd..36120e21d4de 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,8 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -134,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -155,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -197,8 +211,7 @@ def list_by_site( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -211,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -223,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -234,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -251,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -265,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -276,7 +297,7 @@ async def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -293,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -318,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -331,8 +359,7 @@ def list_by_site_slot( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -347,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -372,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -389,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -403,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -415,7 +450,7 @@ async def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -434,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_static_sites_operations.py index 40b781f848c1..35542c7c21be 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class StaticSitesOperations: +class StaticSitesOperations: # pylint: disable=too-many-public-methods """StaticSitesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -57,7 +56,7 @@ async def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -76,6 +75,7 @@ async def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -83,6 +83,7 @@ async def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -90,7 +91,11 @@ async def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -105,7 +110,7 @@ async def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -115,7 +120,7 @@ def list( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -124,6 +129,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -134,6 +141,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -143,6 +151,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -160,7 +169,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -174,7 +187,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -184,7 +197,7 @@ def get_static_sites_by_resource_group( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -195,6 +208,8 @@ def get_static_sites_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -206,6 +221,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -216,6 +232,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -233,7 +250,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -247,7 +268,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace_async async def get_static_site( @@ -258,7 +279,7 @@ async def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -275,17 +296,24 @@ async def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,7 +328,7 @@ async def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore async def _create_or_update_static_site_initial( @@ -316,6 +344,7 @@ async def _create_or_update_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -324,6 +353,7 @@ async def _create_or_update_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_initial.metadata['url'], @@ -331,7 +361,11 @@ async def _create_or_update_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -349,7 +383,7 @@ async def _create_or_update_static_site_initial( return deserialized - _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _create_or_update_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -362,8 +396,7 @@ async def begin_create_or_update_static_site( ) -> AsyncLROPoller["_models.StaticSiteARMResource"]: """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -385,8 +418,9 @@ async def begin_create_or_update_static_site( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -398,6 +432,7 @@ async def begin_create_or_update_static_site( resource_group_name=resource_group_name, name=name, static_site_envelope=static_site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -422,12 +457,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore - async def _delete_static_site_initial( + async def _delete_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -439,17 +473,24 @@ async def _delete_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -459,11 +500,11 @@ async def _delete_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _delete_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site( + async def begin_delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -471,7 +512,7 @@ async def begin_delete_static_site( ) -> AsyncLROPoller[None]: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -489,7 +530,8 @@ async def begin_delete_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -500,6 +542,7 @@ async def begin_delete_static_site( raw_result = await self._delete_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -520,10 +563,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async async def update_static_site( @@ -535,8 +577,7 @@ async def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -555,6 +596,7 @@ async def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -563,6 +605,7 @@ async def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -570,7 +613,11 @@ async def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -589,7 +636,7 @@ async def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -602,7 +649,7 @@ def list_static_site_users( ) -> AsyncIterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -617,6 +664,8 @@ def list_static_site_users( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -630,6 +679,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -642,6 +692,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -659,7 +710,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -673,10 +728,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace_async - async def delete_static_site_user( + async def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -686,7 +741,7 @@ async def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -707,6 +762,8 @@ async def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -714,12 +771,17 @@ async def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -730,7 +792,7 @@ async def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace_async @@ -745,7 +807,7 @@ async def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -769,6 +831,7 @@ async def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -779,6 +842,7 @@ async def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -786,7 +850,11 @@ async def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -801,7 +869,7 @@ async def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -813,7 +881,7 @@ def get_static_site_builds( ) -> AsyncIterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -826,6 +894,8 @@ def get_static_site_builds( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -838,6 +908,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -849,6 +920,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -866,7 +938,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -880,7 +956,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace_async async def get_static_site_build( @@ -892,7 +968,7 @@ async def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -911,18 +987,25 @@ async def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1020,10 @@ async def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore - async def _delete_static_site_build_initial( + async def _delete_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -953,18 +1036,25 @@ async def _delete_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_static_site_build_request_initial( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_build_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -974,11 +1064,11 @@ async def _delete_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + _delete_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site_build( + async def begin_delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -987,7 +1077,7 @@ async def begin_delete_static_site_build( ) -> AsyncLROPoller[None]: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1007,7 +1097,8 @@ async def begin_delete_static_site_build( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1019,6 +1110,7 @@ async def begin_delete_static_site_build( resource_group_name=resource_group_name, name=name, environment_name=environment_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1039,10 +1131,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + begin_delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace_async async def create_or_update_static_site_build_app_settings( @@ -1055,7 +1146,7 @@ async def create_or_update_static_site_build_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site build. - Description for Creates or updates the app settings of a static site build. + 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 @@ -1076,6 +1167,7 @@ async def create_or_update_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1085,6 +1177,7 @@ async def create_or_update_static_site_build_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_app_settings.metadata['url'], @@ -1092,7 +1185,11 @@ async def create_or_update_static_site_build_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1107,7 +1204,7 @@ async def create_or_update_static_site_build_app_settings( return deserialized - create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + create_or_update_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1121,7 +1218,7 @@ async def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -1142,6 +1239,7 @@ async def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1151,6 +1249,7 @@ async def create_or_update_static_site_build_function_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -1158,7 +1257,11 @@ async def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1173,7 +1276,7 @@ async def create_or_update_static_site_build_function_app_settings( return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings"} # type: ignore @distributed_trace @@ -1186,7 +1289,7 @@ def list_static_site_build_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -1201,6 +1304,8 @@ def list_static_site_build_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1214,6 +1319,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -1226,6 +1332,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1243,7 +1350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1257,7 +1368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions"} # type: ignore @distributed_trace_async async def list_static_site_build_app_settings( @@ -1269,7 +1380,7 @@ async def list_static_site_build_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -1288,18 +1399,25 @@ async def list_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_build_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1432,7 @@ async def list_static_site_build_app_settings( return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + list_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings"} # type: ignore @distributed_trace_async @@ -1327,7 +1445,7 @@ async def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -1346,18 +1464,25 @@ async def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1372,7 +1497,7 @@ async def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -1385,8 +1510,7 @@ def get_user_provided_function_apps_for_static_site_build( ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site build. - Description for Gets the details of the user provided function apps registered with a static - site build. + 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 @@ -1401,6 +1525,8 @@ def get_user_provided_function_apps_for_static_site_build( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1414,6 +1540,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site_build.metadata['url'], ) request = _convert_request(request) @@ -1426,6 +1553,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1443,7 +1571,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1457,7 +1589,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps"} # type: ignore @distributed_trace_async async def get_user_provided_function_app_for_static_site_build( @@ -1470,8 +1602,7 @@ async def get_user_provided_function_app_for_static_site_build( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site build. - Description for Gets the details of the user provided function app registered with a static - site build. + 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 @@ -1492,6 +1623,8 @@ async def get_user_provided_function_app_for_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_user_provided_function_app_for_static_site_build_request( resource_group_name=resource_group_name, @@ -1499,12 +1632,17 @@ async def get_user_provided_function_app_for_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1519,7 +1657,7 @@ async def get_user_provided_function_app_for_static_site_build( return deserialized - get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore async def _register_user_provided_function_app_with_static_site_build_initial( @@ -1538,6 +1676,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -1548,6 +1687,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -1556,7 +1696,11 @@ async def _register_user_provided_function_app_with_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1574,7 +1718,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( return deserialized - _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async @@ -1590,7 +1734,7 @@ async def begin_register_user_provided_function_app_with_static_site_build( ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site build. - Description for Register a user provided function app with a static site build. + 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 @@ -1622,8 +1766,9 @@ async def begin_register_user_provided_function_app_with_static_site_build( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1638,6 +1783,7 @@ async def begin_register_user_provided_function_app_with_static_site_build( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1662,13 +1808,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async - async def detach_user_provided_function_app_from_static_site_build( + async def detach_user_provided_function_app_from_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1678,7 +1823,7 @@ async def detach_user_provided_function_app_from_static_site_build( ) -> None: """Detach the user provided function app from the static site build. - Description for Detach the user provided function app from the static site build. + 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 @@ -1699,6 +1844,8 @@ async def detach_user_provided_function_app_from_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_build_request( resource_group_name=resource_group_name, @@ -1706,12 +1853,17 @@ async def detach_user_provided_function_app_from_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1722,10 +1874,10 @@ async def detach_user_provided_function_app_from_static_site_build( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - async def _create_zip_deployment_for_static_site_build_initial( + async def _create_zip_deployment_for_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1739,6 +1891,7 @@ async def _create_zip_deployment_for_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -1748,6 +1901,7 @@ async def _create_zip_deployment_for_static_site_build_initial( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_build_initial.metadata['url'], @@ -1755,7 +1909,11 @@ async def _create_zip_deployment_for_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1765,11 +1923,11 @@ async def _create_zip_deployment_for_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace_async - async def begin_create_zip_deployment_for_static_site_build( + async def begin_create_zip_deployment_for_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1779,7 +1937,7 @@ async def begin_create_zip_deployment_for_static_site_build( ) -> AsyncLROPoller[None]: """Deploys zipped content to a specific environment of a static site. - Description for Deploys zipped content to a specific environment of a static site. + 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 @@ -1803,8 +1961,9 @@ async def begin_create_zip_deployment_for_static_site_build( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1817,6 +1976,7 @@ async def begin_create_zip_deployment_for_static_site_build( name=name, environment_name=environment_name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1838,10 +1998,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace_async async def create_or_update_static_site_app_settings( @@ -1853,7 +2012,7 @@ async def create_or_update_static_site_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site. - Description for Creates or updates the app settings of a static site. + 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 @@ -1872,6 +2031,7 @@ async def create_or_update_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1880,6 +2040,7 @@ async def create_or_update_static_site_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_app_settings.metadata['url'], @@ -1887,7 +2048,11 @@ async def create_or_update_static_site_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1902,7 +2067,7 @@ async def create_or_update_static_site_app_settings( return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + create_or_update_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1915,7 +2080,7 @@ async def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -1934,6 +2099,7 @@ async def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1942,6 +2108,7 @@ async def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -1949,7 +2116,11 @@ async def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1964,7 +2135,7 @@ async def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace_async @@ -1977,7 +2148,7 @@ async def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -1997,6 +2168,7 @@ async def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -2005,6 +2177,7 @@ async def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -2012,7 +2185,11 @@ async def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2027,7 +2204,7 @@ async def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -2039,7 +2216,7 @@ def list_static_site_custom_domains( ) -> AsyncIterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -2052,6 +2229,8 @@ def list_static_site_custom_domains( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2064,6 +2243,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -2075,6 +2255,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2092,7 +2273,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2106,7 +2291,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace_async async def get_static_site_custom_domain( @@ -2118,7 +2303,7 @@ async def get_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Gets an existing custom domain for a particular static site. - Description for Gets an existing custom domain for a particular static site. + 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 @@ -2137,18 +2322,25 @@ async def get_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2163,7 +2355,7 @@ async def get_static_site_custom_domain( return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + get_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore async def _create_or_update_static_site_custom_domain_initial( @@ -2180,6 +2372,7 @@ async def _create_or_update_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -2189,6 +2382,7 @@ async def _create_or_update_static_site_custom_domain_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_custom_domain_initial.metadata['url'], @@ -2196,7 +2390,11 @@ async def _create_or_update_static_site_custom_domain_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2214,7 +2412,7 @@ async def _create_or_update_static_site_custom_domain_initial( return deserialized - _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _create_or_update_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async @@ -2228,8 +2426,7 @@ async def begin_create_or_update_static_site_custom_domain( ) -> AsyncLROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -2255,8 +2452,9 @@ async def begin_create_or_update_static_site_custom_domain( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2269,6 +2467,7 @@ async def begin_create_or_update_static_site_custom_domain( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2293,12 +2492,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - async def _delete_static_site_custom_domain_initial( + async def _delete_static_site_custom_domain_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2311,18 +2509,25 @@ async def _delete_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_static_site_custom_domain_request_initial( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_custom_domain_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2332,11 +2537,11 @@ async def _delete_static_site_custom_domain_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _delete_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site_custom_domain( + async def begin_delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2345,7 +2550,7 @@ async def begin_delete_static_site_custom_domain( ) -> AsyncLROPoller[None]: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2365,7 +2570,8 @@ async def begin_delete_static_site_custom_domain( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2377,6 +2583,7 @@ async def begin_delete_static_site_custom_domain( resource_group_name=resource_group_name, name=name, domain_name=domain_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2397,12 +2604,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - async def _validate_custom_domain_can_be_added_to_static_site_initial( + async def _validate_custom_domain_can_be_added_to_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2416,6 +2622,7 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -2425,6 +2632,7 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'], @@ -2432,7 +2640,11 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2442,11 +2654,11 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace_async - async def begin_validate_custom_domain_can_be_added_to_static_site( + async def begin_validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2456,7 +2668,7 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( ) -> AsyncLROPoller[None]: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -2480,8 +2692,9 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2494,6 +2707,7 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2515,12 +2729,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore - async def _detach_static_site_initial( + async def _detach_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2532,17 +2745,24 @@ async def _detach_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_detach_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._detach_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2552,11 +2772,11 @@ async def _detach_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + _detach_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace_async - async def begin_detach_static_site( + async def begin_detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2564,7 +2784,7 @@ async def begin_detach_static_site( ) -> AsyncLROPoller[None]: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2582,7 +2802,8 @@ async def begin_detach_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2593,6 +2814,7 @@ async def begin_detach_static_site( raw_result = await self._detach_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2613,10 +2835,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + begin_detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace def list_static_site_functions( @@ -2627,7 +2848,7 @@ def list_static_site_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -2640,6 +2861,8 @@ def list_static_site_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2652,6 +2875,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -2663,6 +2887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2680,7 +2905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2694,7 +2923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace_async async def list_static_site_app_settings( @@ -2705,7 +2934,7 @@ async def list_static_site_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2722,17 +2951,24 @@ async def list_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2747,7 +2983,7 @@ async def list_static_site_app_settings( return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + list_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings"} # type: ignore @distributed_trace_async @@ -2759,7 +2995,7 @@ async def list_static_site_configured_roles( ) -> "_models.StringList": """Lists the roles configured for the static site. - Description for Lists the roles configured for the static site. + 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 @@ -2776,17 +3012,24 @@ async def list_static_site_configured_roles( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_configured_roles_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_configured_roles.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2801,7 +3044,7 @@ async def list_static_site_configured_roles( return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + list_static_site_configured_roles.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles"} # type: ignore @distributed_trace_async @@ -2813,7 +3056,7 @@ async def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2830,17 +3073,24 @@ async def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2855,7 +3105,7 @@ async def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -2867,7 +3117,7 @@ async def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -2884,17 +3134,24 @@ async def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2909,7 +3166,7 @@ async def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace @@ -2921,7 +3178,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a static site. - Description for Gets the list of private endpoint connections associated with a static site. + 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 @@ -2934,6 +3191,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2946,6 +3205,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -2957,6 +3217,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2974,7 +3235,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2988,7 +3253,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -3000,7 +3265,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3019,18 +3284,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3045,7 +3317,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -3062,6 +3334,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -3071,6 +3344,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -3078,7 +3352,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3096,7 +3374,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -3110,7 +3388,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -3135,8 +3413,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3149,6 +3428,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3173,10 +3453,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -3191,18 +3470,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3223,7 +3509,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -3236,7 +3522,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3256,7 +3542,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -3268,6 +3555,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3291,10 +3579,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -3305,7 +3592,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3322,17 +3609,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,11 +3641,11 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources"} # type: ignore @distributed_trace_async - async def reset_static_site_api_key( + async def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3360,7 +3654,7 @@ async def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -3380,6 +3674,7 @@ async def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -3388,6 +3683,7 @@ async def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -3395,7 +3691,11 @@ async def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3406,7 +3706,7 @@ async def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore @distributed_trace @@ -3418,8 +3718,7 @@ def get_user_provided_function_apps_for_static_site( ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site. - Description for Gets the details of the user provided function apps registered with a static - site. + 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 @@ -3432,6 +3731,8 @@ def get_user_provided_function_apps_for_static_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3444,6 +3745,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site.metadata['url'], ) request = _convert_request(request) @@ -3455,6 +3757,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3472,7 +3775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3486,7 +3793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps"} # type: ignore @distributed_trace_async async def get_user_provided_function_app_for_static_site( @@ -3498,8 +3805,7 @@ async def get_user_provided_function_app_for_static_site( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site. - Description for Gets the details of the user provided function app registered with a static - site. + 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 @@ -3518,18 +3824,25 @@ async def get_user_provided_function_app_for_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_user_provided_function_app_for_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3544,7 +3857,7 @@ async def get_user_provided_function_app_for_static_site( return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore async def _register_user_provided_function_app_with_static_site_initial( @@ -3562,6 +3875,7 @@ async def _register_user_provided_function_app_with_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -3571,6 +3885,7 @@ async def _register_user_provided_function_app_with_static_site_initial( name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -3579,7 +3894,11 @@ async def _register_user_provided_function_app_with_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3597,7 +3916,7 @@ async def _register_user_provided_function_app_with_static_site_initial( return deserialized - _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async @@ -3612,7 +3931,7 @@ async def begin_register_user_provided_function_app_with_static_site( ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site. - Description for Register a user provided function app with a static site. + 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 @@ -3642,8 +3961,9 @@ async def begin_register_user_provided_function_app_with_static_site( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3657,6 +3977,7 @@ async def begin_register_user_provided_function_app_with_static_site( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3681,13 +4002,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async - async def detach_user_provided_function_app_from_static_site( + async def detach_user_provided_function_app_from_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3696,7 +4016,7 @@ async def detach_user_provided_function_app_from_static_site( ) -> None: """Detach the user provided function app from the static site. - Description for Detach the user provided function app from the static site. + 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 @@ -3715,18 +4035,25 @@ async def detach_user_provided_function_app_from_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3737,10 +4064,10 @@ async def detach_user_provided_function_app_from_static_site( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - async def _create_zip_deployment_for_static_site_initial( + async def _create_zip_deployment_for_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3753,6 +4080,7 @@ async def _create_zip_deployment_for_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -3761,6 +4089,7 @@ async def _create_zip_deployment_for_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_initial.metadata['url'], @@ -3768,7 +4097,11 @@ async def _create_zip_deployment_for_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3778,11 +4111,11 @@ async def _create_zip_deployment_for_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore @distributed_trace_async - async def begin_create_zip_deployment_for_static_site( + async def begin_create_zip_deployment_for_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3791,7 +4124,7 @@ async def begin_create_zip_deployment_for_static_site( ) -> AsyncLROPoller[None]: """Deploys zipped content to a static site. - Description for Deploys zipped content to a static site. + 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 @@ -3813,8 +4146,9 @@ async def begin_create_zip_deployment_for_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -3826,6 +4160,7 @@ async def begin_create_zip_deployment_for_static_site( resource_group_name=resource_group_name, name=name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3847,7 +4182,6 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_top_level_domains_operations.py index 86763c0d1837..827f42212e9c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -122,7 +129,7 @@ async def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -137,16 +144,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -161,7 +175,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -173,7 +187,7 @@ def list_agreements( ) -> AsyncIterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -186,6 +200,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -200,6 +215,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -213,6 +229,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -232,7 +249,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -246,4 +267,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_apps_operations.py index 8c9adb25155f..ef7b8540db3f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -137,6 +144,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -148,6 +157,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -159,6 +169,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -246,7 +268,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -262,6 +284,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -270,6 +293,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -277,7 +301,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -295,7 +323,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -309,8 +337,8 @@ async def begin_create_or_update( """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. + 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 @@ -331,8 +359,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -344,6 +373,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -368,13 +398,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -384,16 +413,16 @@ async def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -406,11 +435,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -418,7 +450,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -429,7 +465,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -443,8 +479,8 @@ async def update( """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. + 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 @@ -464,6 +500,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -472,6 +509,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -479,7 +517,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -498,7 +540,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -511,13 +553,13 @@ async def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -530,18 +572,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -556,11 +605,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -569,7 +618,7 @@ async def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -588,6 +637,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -596,6 +646,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -603,7 +654,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -614,7 +669,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -627,7 +682,7 @@ async def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -647,6 +702,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -655,6 +711,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -662,7 +719,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -677,7 +738,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -689,7 +750,7 @@ def list_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -702,6 +763,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -714,6 +777,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -725,6 +789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -742,7 +807,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -756,7 +825,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def get_backup_status( @@ -768,7 +837,7 @@ async def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -787,18 +856,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -813,11 +889,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -826,7 +902,7 @@ async def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -845,18 +921,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -867,7 +950,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -883,9 +966,9 @@ async def list_backup_status_secrets( 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. + 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 @@ -906,6 +989,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -915,6 +999,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -922,7 +1007,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1026,10 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - async def _restore_initial( + async def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -954,6 +1043,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -963,6 +1053,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -970,7 +1061,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -980,11 +1075,11 @@ async def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore( + async def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -994,7 +1089,7 @@ async def begin_restore( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -1016,8 +1111,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1030,6 +1126,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1051,10 +1148,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async async def get_basic_publishing_credentials_policies( @@ -1065,8 +1161,7 @@ async def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -1083,17 +1178,24 @@ async def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1108,7 +1210,7 @@ async def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async @@ -1120,7 +1222,7 @@ async def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -1137,17 +1239,24 @@ async def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1162,7 +1271,7 @@ async def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1175,7 +1284,7 @@ async def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -1195,6 +1304,7 @@ async def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1203,6 +1313,7 @@ async def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -1210,7 +1321,11 @@ async def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1225,7 +1340,7 @@ async def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1237,7 +1352,7 @@ async def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -1254,17 +1369,24 @@ async def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1279,7 +1401,7 @@ async def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -1292,7 +1414,7 @@ async def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -1312,6 +1434,7 @@ async def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1320,6 +1443,7 @@ async def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -1327,7 +1451,11 @@ async def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1342,7 +1470,7 @@ async def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -1354,7 +1482,7 @@ def list_configurations( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -1367,6 +1495,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1379,6 +1509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1390,6 +1521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1407,7 +1539,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1421,7 +1557,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1433,7 +1569,7 @@ async def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -1452,6 +1588,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1460,6 +1597,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1467,7 +1605,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1482,7 +1624,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1494,7 +1636,7 @@ async def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -1511,17 +1653,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1685,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1549,7 +1698,7 @@ async def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -1568,6 +1717,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1576,6 +1726,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1583,7 +1734,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1598,7 +1753,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1610,7 +1765,7 @@ async def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -1627,17 +1782,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1652,7 +1814,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1665,8 +1827,7 @@ async def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -1685,6 +1846,7 @@ async def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -1693,6 +1855,7 @@ async def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -1700,7 +1863,11 @@ async def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1715,7 +1882,7 @@ async def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -1727,7 +1894,7 @@ async def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -1744,17 +1911,24 @@ async def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1769,7 +1943,7 @@ async def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -1782,7 +1956,7 @@ async def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -1802,6 +1976,7 @@ async def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -1810,6 +1985,7 @@ async def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -1817,7 +1993,11 @@ async def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1832,7 +2012,7 @@ async def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -1844,7 +2024,7 @@ async def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -1861,17 +2041,24 @@ async def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1886,7 +2073,7 @@ async def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -1899,7 +2086,7 @@ async def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -1918,6 +2105,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -1926,6 +2114,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -1933,7 +2122,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1948,11 +2141,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1960,7 +2153,7 @@ async def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -1977,17 +2170,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1998,7 +2198,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -2010,7 +2210,7 @@ async def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -2027,17 +2227,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2052,7 +2259,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -2064,7 +2271,7 @@ def get_app_settings_key_vault_references( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -2077,6 +2284,8 @@ def get_app_settings_key_vault_references( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2089,6 +2298,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -2100,6 +2310,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2117,7 +2328,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2131,7 +2346,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async async def get_app_setting_key_vault_reference( @@ -2143,7 +2358,7 @@ async def get_app_setting_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2162,18 +2377,25 @@ async def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2188,7 +2410,7 @@ async def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -2200,7 +2422,7 @@ def get_site_connection_string_key_vault_references( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -2213,6 +2435,8 @@ def get_site_connection_string_key_vault_references( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2225,6 +2449,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -2236,6 +2461,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2253,7 +2479,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2267,7 +2497,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace_async async def get_site_connection_string_key_vault_reference( @@ -2279,7 +2509,7 @@ async def get_site_connection_string_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2298,18 +2528,25 @@ async def get_site_connection_string_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_connection_string_key_vault_reference_request( resource_group_name=resource_group_name, name=name, connection_string_key=connection_string_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2324,7 +2561,7 @@ async def get_site_connection_string_key_vault_reference( return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace_async @@ -2337,7 +2574,7 @@ async def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -2356,6 +2593,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -2364,6 +2602,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -2371,7 +2610,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2386,7 +2629,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -2398,7 +2641,7 @@ async def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -2415,17 +2658,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2440,7 +2690,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -2452,7 +2702,7 @@ async def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -2469,17 +2719,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2494,7 +2751,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2507,7 +2764,7 @@ async def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -2527,6 +2784,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -2535,6 +2793,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -2542,7 +2801,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2557,7 +2820,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2570,7 +2833,7 @@ async def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -2589,6 +2852,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -2597,6 +2861,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -2604,7 +2869,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2619,7 +2888,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -2631,7 +2900,7 @@ async def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -2648,17 +2917,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2673,7 +2949,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -2688,17 +2964,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2712,7 +2995,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -2724,7 +3007,7 @@ async def begin_list_publishing_credentials( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -2742,7 +3025,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2753,6 +3037,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2776,10 +3061,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2791,7 +3075,7 @@ async def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -2810,6 +3094,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2818,6 +3103,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2825,7 +3111,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2840,7 +3130,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2852,7 +3142,7 @@ async def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -2869,17 +3159,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2894,7 +3191,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2906,8 +3203,7 @@ async def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -2924,17 +3220,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2949,7 +3252,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2963,8 +3266,8 @@ async def update_slot_configuration_names( """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. + 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 @@ -2983,6 +3286,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -2991,6 +3295,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -2998,7 +3303,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3013,7 +3322,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -3026,8 +3335,8 @@ async def get_configuration( """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. + 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 @@ -3044,17 +3353,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3069,7 +3385,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -3082,7 +3398,7 @@ async def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -3101,6 +3417,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -3109,6 +3426,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -3116,7 +3434,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3131,7 +3453,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -3144,7 +3466,7 @@ async def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -3163,6 +3485,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -3171,6 +3494,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -3178,7 +3502,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3193,7 +3521,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -3206,8 +3534,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -3220,6 +3548,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3232,6 +3562,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -3243,6 +3574,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3260,7 +3592,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3274,7 +3610,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -3286,7 +3622,7 @@ async def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -3305,18 +3641,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3331,11 +3674,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3344,7 +3687,7 @@ async def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -3363,18 +3706,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3385,7 +3735,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -3397,7 +3747,7 @@ async def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -3414,17 +3764,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3440,7 +3797,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -3452,7 +3809,7 @@ async def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -3469,17 +3826,24 @@ async def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3495,7 +3859,7 @@ async def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -3507,7 +3871,7 @@ def list_continuous_web_jobs( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -3520,6 +3884,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3532,6 +3898,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -3543,6 +3910,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3560,7 +3928,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3574,7 +3946,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -3586,7 +3958,7 @@ async def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3605,18 +3977,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3633,11 +4012,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3646,7 +4025,7 @@ async def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3665,18 +4044,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3687,11 +4073,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3700,7 +4086,7 @@ async def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -3719,18 +4105,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3741,11 +4134,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3754,7 +4147,7 @@ async def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -3773,18 +4166,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3795,7 +4195,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3807,7 +4207,7 @@ def list_deployments( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -3820,6 +4220,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3832,6 +4234,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3843,6 +4246,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3860,7 +4264,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3874,7 +4282,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3886,7 +4294,7 @@ async def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -3905,18 +4313,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3931,7 +4346,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3945,7 +4360,7 @@ async def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -3966,6 +4381,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -3975,6 +4391,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -3982,7 +4399,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3997,11 +4418,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4010,7 +4431,7 @@ async def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -4029,18 +4450,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4051,7 +4479,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -4064,7 +4492,7 @@ async def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -4084,18 +4512,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4110,7 +4545,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -4124,8 +4559,8 @@ async def discover_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. - 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. + 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 @@ -4145,6 +4580,7 @@ async def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -4153,6 +4589,7 @@ async def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -4160,7 +4597,11 @@ async def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4175,7 +4616,7 @@ async def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -4187,7 +4628,7 @@ def list_domain_ownership_identifiers( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -4200,6 +4641,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4212,6 +4655,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -4223,6 +4667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4240,7 +4685,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4254,7 +4703,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -4266,7 +4715,7 @@ async def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -4285,18 +4734,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4311,7 +4767,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4325,8 +4781,7 @@ async def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4347,6 +4802,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4356,6 +4812,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -4363,7 +4820,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4378,11 +4839,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4391,7 +4852,7 @@ async def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -4410,18 +4871,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4432,7 +4900,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4446,8 +4914,7 @@ async def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4468,6 +4935,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4477,6 +4945,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -4484,7 +4953,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4499,7 +4972,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4511,7 +4984,7 @@ async def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -4528,17 +5001,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4553,7 +5033,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -4569,6 +5049,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -4577,6 +5058,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -4584,7 +5066,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -4600,7 +5086,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -4613,7 +5099,7 @@ async def begin_create_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -4634,8 +5120,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -4647,6 +5134,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4671,10 +5159,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -4685,7 +5172,7 @@ async def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -4702,17 +5189,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4729,7 +5223,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -4741,7 +5235,7 @@ def list_functions( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -4754,6 +5248,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4766,6 +5262,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -4777,6 +5274,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4794,7 +5292,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4808,7 +5310,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -4819,7 +5321,7 @@ async def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -4836,17 +5338,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4861,7 +5370,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -4874,7 +5383,7 @@ async def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -4893,18 +5402,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4921,7 +5437,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -4938,6 +5454,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -4947,6 +5464,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -4954,7 +5472,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4968,7 +5490,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4982,7 +5504,7 @@ async def begin_create_function( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -5005,8 +5527,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -5019,6 +5542,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5043,13 +5567,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5058,7 +5581,7 @@ async def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -5077,18 +5600,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5099,7 +5629,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -5114,7 +5644,7 @@ async def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -5137,6 +5667,7 @@ async def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5147,6 +5678,7 @@ async def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -5154,7 +5686,11 @@ async def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5173,11 +5709,11 @@ async def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret( + async def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5187,7 +5723,7 @@ async def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -5208,6 +5744,8 @@ async def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -5215,12 +5753,17 @@ async def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5231,7 +5774,7 @@ async def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -5244,7 +5787,7 @@ async def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -5263,18 +5806,25 @@ async def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5289,7 +5839,7 @@ async def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -5302,7 +5852,7 @@ async def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -5321,18 +5871,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5347,7 +5904,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -5359,7 +5916,7 @@ async def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -5376,17 +5933,24 @@ async def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5401,11 +5965,11 @@ async def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status( + async def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5413,7 +5977,7 @@ async def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -5430,17 +5994,24 @@ async def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5451,11 +6022,11 @@ async def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions( + async def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5463,7 +6034,7 @@ async def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -5480,17 +6051,24 @@ async def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5501,7 +6079,7 @@ async def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace_async @@ -5516,7 +6094,7 @@ async def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -5539,6 +6117,7 @@ async def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5549,6 +6128,7 @@ async def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -5556,7 +6136,11 @@ async def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5575,11 +6159,11 @@ async def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret( + async def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5589,7 +6173,7 @@ async def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -5610,6 +6194,8 @@ async def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -5617,12 +6203,17 @@ async def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5633,7 +6224,7 @@ async def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -5645,7 +6236,7 @@ def list_host_name_bindings( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -5658,6 +6249,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5670,6 +6263,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -5681,6 +6275,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5698,7 +6293,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5712,7 +6311,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -5724,7 +6323,7 @@ async def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -5743,18 +6342,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5769,7 +6375,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5783,7 +6389,7 @@ async def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -5805,6 +6411,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -5814,6 +6421,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -5821,7 +6429,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5836,11 +6448,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5849,7 +6461,7 @@ async def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -5868,18 +6480,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5890,7 +6509,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5904,7 +6523,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -5925,6 +6544,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5932,12 +6553,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5952,7 +6578,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5967,7 +6593,7 @@ async def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -5990,6 +6616,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -6000,6 +6627,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -6007,7 +6635,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6022,11 +6654,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6036,7 +6668,7 @@ async def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -6057,6 +6689,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -6064,12 +6698,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6080,7 +6719,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6095,7 +6734,7 @@ async def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -6118,6 +6757,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -6128,6 +6768,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -6135,7 +6776,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6150,7 +6795,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6162,7 +6807,7 @@ async def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -6179,17 +6824,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6204,7 +6856,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -6216,8 +6868,7 @@ async def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -6234,17 +6885,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6259,7 +6917,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -6272,7 +6930,7 @@ async def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -6291,18 +6949,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6317,7 +6982,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6331,8 +6996,7 @@ async def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6353,6 +7017,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6362,6 +7027,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -6369,7 +7035,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6384,11 +7054,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6397,7 +7067,7 @@ async def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -6416,18 +7086,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6438,7 +7115,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6452,8 +7129,7 @@ async def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6474,6 +7150,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6483,6 +7160,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -6490,7 +7168,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6505,7 +7187,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -6517,7 +7199,7 @@ def list_instance_identifiers( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -6530,6 +7212,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6542,6 +7226,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -6553,6 +7238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6570,7 +7256,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6584,7 +7274,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_info( @@ -6596,7 +7286,7 @@ async def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -6615,18 +7305,25 @@ async def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6641,7 +7338,7 @@ async def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -6654,7 +7351,7 @@ async def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -6673,18 +7370,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6699,7 +7403,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -6716,6 +7420,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -6725,6 +7430,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -6732,7 +7438,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -6748,7 +7458,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -6762,7 +7472,7 @@ async def begin_create_instance_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -6785,8 +7495,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -6799,6 +7510,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6823,10 +7535,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -6838,7 +7549,7 @@ async def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -6857,18 +7568,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6885,7 +7603,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -6899,8 +7617,8 @@ def list_instance_processes( """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. + 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 @@ -6916,6 +7634,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6929,6 +7649,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -6941,6 +7662,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6958,7 +7680,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6972,7 +7698,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -6985,8 +7711,7 @@ async def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7008,6 +7733,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -7015,12 +7742,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7037,11 +7769,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7052,8 +7784,8 @@ async def delete_instance_process( """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. + 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 @@ -7075,6 +7807,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -7082,12 +7816,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -7098,7 +7837,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -7112,8 +7851,7 @@ async def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -7135,6 +7873,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -7142,12 +7882,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7164,7 +7909,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -7179,8 +7924,8 @@ def list_instance_process_modules( """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. + 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 @@ -7198,6 +7943,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7212,6 +7959,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -7225,6 +7973,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7242,7 +7991,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7256,7 +8009,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -7270,8 +8023,7 @@ async def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7295,6 +8047,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -7303,12 +8057,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7325,7 +8084,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -7339,8 +8098,7 @@ def list_instance_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -7358,6 +8116,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7372,6 +8132,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -7385,6 +8146,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7402,7 +8164,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7416,7 +8182,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable( @@ -7427,7 +8193,7 @@ async def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -7444,17 +8210,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7469,7 +8242,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -7481,7 +8254,7 @@ def list_site_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -7494,6 +8267,8 @@ def list_site_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7506,6 +8281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -7517,6 +8293,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7534,7 +8311,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7548,7 +8329,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers( @@ -7559,7 +8340,7 @@ async def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -7576,17 +8357,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7601,7 +8389,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore async def _migrate_storage_initial( @@ -7618,6 +8406,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -7626,6 +8415,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -7634,7 +8424,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7648,7 +8442,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -7662,7 +8456,7 @@ async def begin_migrate_storage( ) -> AsyncLROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -7686,8 +8480,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -7700,6 +8495,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7724,10 +8520,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -7742,6 +8537,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -7750,6 +8546,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -7757,7 +8554,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7771,7 +8572,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -7784,7 +8585,7 @@ async def begin_migrate_my_sql( ) -> AsyncLROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -7805,8 +8606,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -7818,6 +8620,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7842,10 +8645,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -7857,8 +8659,8 @@ async def get_migrate_my_sql_status( """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. + 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 @@ -7875,17 +8677,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7900,7 +8709,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -7912,7 +8721,7 @@ async def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -7929,17 +8738,24 @@ async def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7954,7 +8770,7 @@ async def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7970,9 +8786,9 @@ async def create_or_update_swift_virtual_network_connection_with_check( 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 + 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. @@ -7992,6 +8808,7 @@ async def create_or_update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -8000,6 +8817,7 @@ async def create_or_update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check.metadata['url'], @@ -8007,7 +8825,11 @@ async def create_or_update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8022,11 +8844,11 @@ async def create_or_update_swift_virtual_network_connection_with_check( return deserialized - create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network( + async def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8034,7 +8856,7 @@ async def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -8051,17 +8873,24 @@ async def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8072,7 +8901,7 @@ async def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -8085,7 +8914,7 @@ async def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -8104,18 +8933,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8132,7 +8968,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -8145,8 +8981,7 @@ async def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8165,18 +9000,25 @@ async def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8195,7 +9037,7 @@ async def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8210,17 +9052,17 @@ async def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -8233,11 +9075,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8246,7 +9091,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8261,7 +9110,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_initial( @@ -8279,11 +9128,14 @@ async def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8292,7 +9144,11 @@ async def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8310,7 +9166,7 @@ async def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -8325,17 +9181,17 @@ async def begin_start_web_site_network_trace_operation( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -8351,7 +9207,8 @@ async def begin_start_web_site_network_trace_operation( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -8365,6 +9222,7 @@ async def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -8388,13 +9246,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace( + async def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8402,7 +9259,7 @@ async def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -8419,17 +9276,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8440,7 +9304,7 @@ async def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -8453,8 +9317,7 @@ async def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8473,18 +9336,25 @@ async def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8499,7 +9369,7 @@ async def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -8512,8 +9382,7 @@ async def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8532,18 +9401,25 @@ async def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8562,7 +9438,7 @@ async def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8575,8 +9451,7 @@ async def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8595,18 +9470,25 @@ async def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8621,11 +9503,11 @@ async def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8633,8 +9515,7 @@ async def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -8651,17 +9532,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8672,7 +9560,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -8685,7 +9573,7 @@ def list_perf_mon_counters( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -8693,7 +9581,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -8702,6 +9590,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8714,6 +9604,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -8726,6 +9617,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -8744,7 +9636,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8758,7 +9654,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -8769,7 +9665,7 @@ async def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -8786,17 +9682,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8811,7 +9714,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -8823,7 +9726,7 @@ async def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -8840,17 +9743,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8865,7 +9775,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -8878,7 +9788,7 @@ async def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -8897,18 +9807,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8923,7 +9840,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8937,7 +9854,7 @@ async def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -8958,6 +9875,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -8967,6 +9885,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -8974,7 +9893,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8989,11 +9912,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9002,7 +9925,7 @@ async def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -9021,18 +9944,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9043,7 +9973,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9057,7 +9987,7 @@ async def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -9078,6 +10008,7 @@ async def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -9087,6 +10018,7 @@ async def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -9094,7 +10026,11 @@ async def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9109,7 +10045,7 @@ async def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9122,8 +10058,8 @@ async def get_private_access( """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. + 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 @@ -9140,17 +10076,24 @@ async def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9165,7 +10108,7 @@ async def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -9179,8 +10122,8 @@ async def put_private_access_vnet( """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. + 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 @@ -9199,6 +10142,7 @@ async def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -9207,6 +10151,7 @@ async def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -9214,7 +10159,11 @@ async def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9229,7 +10178,7 @@ async def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -9241,7 +10190,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -9254,6 +10203,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9266,6 +10217,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -9277,6 +10229,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9294,7 +10247,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9308,7 +10265,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -9320,7 +10277,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9339,18 +10296,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9365,7 +10329,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -9382,6 +10346,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -9391,6 +10356,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -9398,7 +10364,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9416,7 +10386,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -9430,7 +10400,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -9455,8 +10425,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -9469,6 +10440,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -9493,10 +10465,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -9511,18 +10482,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -9543,7 +10521,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -9556,7 +10534,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9576,7 +10554,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -9588,6 +10567,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -9611,10 +10591,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -9625,7 +10604,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9642,17 +10621,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9667,7 +10653,7 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -9680,8 +10666,8 @@ def list_processes( """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. + 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 @@ -9694,6 +10680,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9706,6 +10694,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -9717,6 +10706,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9734,7 +10724,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9748,7 +10742,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -9760,8 +10754,7 @@ async def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9780,18 +10773,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9808,11 +10808,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9822,8 +10822,8 @@ async def delete_process( """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. + 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 @@ -9842,18 +10842,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -9864,7 +10871,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -9877,8 +10884,7 @@ async def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -9897,18 +10903,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9925,7 +10938,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -9939,8 +10952,8 @@ def list_process_modules( """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. + 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 @@ -9955,6 +10968,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9968,6 +10983,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -9980,6 +10996,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9997,7 +11014,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10011,7 +11032,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -10024,8 +11045,7 @@ async def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -10046,6 +11066,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -10053,12 +11075,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10075,7 +11102,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -10088,8 +11115,7 @@ def list_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -10104,6 +11130,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10117,6 +11145,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -10129,6 +11158,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10146,7 +11176,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10160,7 +11194,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -10171,7 +11205,7 @@ def list_public_certificates( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -10184,6 +11218,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10196,6 +11232,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -10207,6 +11244,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10224,7 +11262,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10238,7 +11280,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -10250,7 +11292,7 @@ async def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -10269,18 +11311,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10295,7 +11344,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -10309,7 +11358,7 @@ async def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -10331,6 +11380,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -10340,6 +11390,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -10347,7 +11398,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10362,11 +11417,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10375,7 +11430,7 @@ async def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -10394,18 +11449,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -10416,7 +11478,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -10429,7 +11491,7 @@ async def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -10450,6 +11512,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -10458,6 +11521,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -10465,7 +11529,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10480,11 +11548,11 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10493,8 +11561,8 @@ async def reset_production_slot_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. + 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 @@ -10511,17 +11579,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10532,11 +11607,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10546,17 +11621,18 @@ async def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -10569,11 +11645,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -10581,7 +11660,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10592,10 +11675,10 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - async def _restore_from_backup_blob_initial( + async def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10608,6 +11691,7 @@ async def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -10616,6 +11700,7 @@ async def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -10623,7 +11708,11 @@ async def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10633,11 +11722,11 @@ async def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob( + async def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10646,7 +11735,7 @@ async def begin_restore_from_backup_blob( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -10666,8 +11755,9 @@ async def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10679,6 +11769,7 @@ async def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10700,12 +11791,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_initial( + async def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10718,6 +11808,7 @@ async def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -10726,6 +11817,7 @@ async def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -10733,7 +11825,11 @@ async def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10743,11 +11839,11 @@ async def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app( + async def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10756,7 +11852,7 @@ async def begin_restore_from_deleted_app( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -10776,8 +11872,9 @@ async def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10789,6 +11886,7 @@ async def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10810,12 +11908,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_initial( + async def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10828,6 +11925,7 @@ async def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -10836,6 +11934,7 @@ async def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -10843,7 +11942,11 @@ async def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10853,11 +11956,11 @@ async def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot( + async def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10866,7 +11969,7 @@ async def begin_restore_snapshot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -10887,8 +11990,9 @@ async def begin_restore_snapshot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10900,6 +12004,7 @@ async def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10921,10 +12026,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -10935,7 +12039,7 @@ def list_site_extensions( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -10948,6 +12052,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10960,6 +12066,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -10971,6 +12078,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10988,7 +12096,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11002,7 +12114,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -11014,7 +12126,7 @@ async def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -11033,18 +12145,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11061,7 +12180,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -11077,18 +12196,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -11107,7 +12233,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -11120,7 +12246,7 @@ async def begin_install_site_extension( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -11142,7 +12268,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -11154,6 +12281,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -11177,13 +12305,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11192,7 +12319,7 @@ async def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -11211,18 +12338,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -11233,7 +12367,7 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -11245,7 +12379,7 @@ def list_slots( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -11257,6 +12391,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11269,6 +12405,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -11280,6 +12417,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11297,7 +12435,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11311,7 +12453,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -11323,7 +12465,7 @@ async def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -11342,18 +12484,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11370,7 +12519,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -11387,6 +12536,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -11396,6 +12546,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -11403,7 +12554,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11421,7 +12576,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11436,8 +12591,8 @@ async def begin_create_or_update_slot( """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. + 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 @@ -11461,8 +12616,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -11475,6 +12631,7 @@ async def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11499,13 +12656,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11516,7 +12672,7 @@ async def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -11525,10 +12681,10 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -11541,12 +12697,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -11554,7 +12713,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -11565,7 +12728,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11580,8 +12743,8 @@ async def update_slot( """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. + 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 @@ -11604,6 +12767,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -11613,6 +12777,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -11620,7 +12785,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11639,7 +12808,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11653,7 +12822,7 @@ async def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -11661,7 +12830,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -11674,19 +12843,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11701,11 +12877,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11715,7 +12891,7 @@ async def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -11737,6 +12913,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -11746,6 +12923,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -11753,7 +12931,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11764,7 +12946,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -11778,7 +12960,7 @@ async def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -11801,6 +12983,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11810,6 +12993,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -11817,7 +13001,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11832,7 +13020,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -11845,7 +13033,7 @@ def list_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -11861,6 +13049,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11874,6 +13064,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -11886,6 +13077,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11903,7 +13095,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11917,7 +13113,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def get_backup_status_slot( @@ -11930,7 +13126,7 @@ async def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -11952,6 +13148,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -11959,12 +13157,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11979,11 +13182,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11993,7 +13196,7 @@ async def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -12015,6 +13218,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -12022,12 +13227,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -12038,7 +13248,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -12055,9 +13265,9 @@ async def list_backup_status_secrets_slot( 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. + 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 @@ -12080,6 +13290,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12090,6 +13301,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -12097,7 +13309,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12112,10 +13328,10 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - async def _restore_slot_initial( + async def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12130,6 +13346,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -12140,6 +13357,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -12147,7 +13365,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -12157,11 +13379,11 @@ async def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore_slot( + async def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12172,7 +13394,7 @@ async def begin_restore_slot( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -12197,8 +13419,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -12212,6 +13435,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -12233,10 +13457,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async async def get_basic_publishing_credentials_policies_slot( @@ -12248,8 +13471,7 @@ async def get_basic_publishing_credentials_policies_slot( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -12268,18 +13490,25 @@ async def get_basic_publishing_credentials_policies_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_basic_publishing_credentials_policies_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12294,7 +13523,7 @@ async def get_basic_publishing_credentials_policies_slot( return deserialized - get_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async @@ -12307,7 +13536,7 @@ async def get_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -12326,18 +13555,25 @@ async def get_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ftp_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12352,7 +13588,7 @@ async def get_ftp_allowed_slot( return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -12366,7 +13602,7 @@ async def update_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -12388,6 +13624,7 @@ async def update_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -12397,6 +13634,7 @@ async def update_ftp_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed_slot.metadata['url'], @@ -12404,7 +13642,11 @@ async def update_ftp_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12419,7 +13661,7 @@ async def update_ftp_allowed_slot( return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -12432,7 +13674,7 @@ async def get_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -12451,18 +13693,25 @@ async def get_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_scm_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12477,7 +13726,7 @@ async def get_scm_allowed_slot( return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -12491,7 +13740,7 @@ async def update_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -12513,6 +13762,7 @@ async def update_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -12522,6 +13772,7 @@ async def update_scm_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed_slot.metadata['url'], @@ -12529,7 +13780,11 @@ async def update_scm_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12544,7 +13799,7 @@ async def update_scm_allowed_slot( return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -12557,7 +13812,7 @@ def list_configurations_slot( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -12573,6 +13828,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12586,6 +13843,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -12598,6 +13856,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12615,7 +13874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12629,7 +13892,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -12642,7 +13905,7 @@ async def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -12664,6 +13927,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -12673,6 +13937,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -12680,7 +13945,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12695,7 +13964,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -12708,7 +13977,7 @@ async def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -12728,18 +13997,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12754,7 +14030,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -12768,7 +14044,7 @@ async def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -12789,6 +14065,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -12798,6 +14075,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -12805,7 +14083,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12820,7 +14102,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -12833,7 +14115,7 @@ async def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -12853,18 +14135,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12879,7 +14168,7 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -12893,8 +14182,7 @@ async def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -12915,6 +14203,7 @@ async def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -12924,6 +14213,7 @@ async def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -12931,7 +14221,11 @@ async def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12946,7 +14240,7 @@ async def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -12959,7 +14253,7 @@ async def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -12979,18 +14273,25 @@ async def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13005,7 +14306,7 @@ async def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -13019,7 +14320,7 @@ async def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -13042,6 +14343,7 @@ async def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -13051,6 +14353,7 @@ async def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -13058,7 +14361,11 @@ async def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13073,7 +14380,7 @@ async def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -13086,7 +14393,7 @@ async def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -13106,18 +14413,25 @@ async def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13132,7 +14446,7 @@ async def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -13146,7 +14460,7 @@ async def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -13168,6 +14482,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -13177,6 +14492,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -13184,7 +14500,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13199,11 +14519,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13212,7 +14532,7 @@ async def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -13232,18 +14552,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13254,7 +14581,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -13267,7 +14594,7 @@ async def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -13287,18 +14614,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13313,7 +14647,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -13326,7 +14660,7 @@ def get_app_settings_key_vault_references_slot( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -13341,6 +14675,8 @@ def get_app_settings_key_vault_references_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13354,6 +14690,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -13366,6 +14703,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13383,7 +14721,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13397,7 +14739,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async async def get_app_setting_key_vault_reference_slot( @@ -13410,7 +14752,7 @@ async def get_app_setting_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -13431,6 +14773,8 @@ async def get_app_setting_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_app_setting_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -13438,12 +14782,17 @@ async def get_app_setting_key_vault_reference_slot( app_setting_key=app_setting_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13458,7 +14807,7 @@ async def get_app_setting_key_vault_reference_slot( return deserialized - get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -13471,7 +14820,7 @@ def get_site_connection_string_key_vault_references_slot( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -13486,6 +14835,8 @@ def get_site_connection_string_key_vault_references_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13499,6 +14850,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -13511,6 +14863,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13528,7 +14881,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13542,7 +14899,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace_async async def get_site_connection_string_key_vault_reference_slot( @@ -13555,7 +14912,7 @@ async def get_site_connection_string_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -13576,6 +14933,8 @@ async def get_site_connection_string_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_connection_string_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -13583,12 +14942,17 @@ async def get_site_connection_string_key_vault_reference_slot( connection_string_key=connection_string_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13603,7 +14967,7 @@ async def get_site_connection_string_key_vault_reference_slot( return deserialized - get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace_async @@ -13617,7 +14981,7 @@ async def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -13639,6 +15003,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -13648,6 +15013,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -13655,7 +15021,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13670,7 +15040,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -13683,7 +15053,7 @@ async def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -13703,18 +15073,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13729,7 +15106,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -13742,7 +15119,7 @@ async def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -13762,18 +15139,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13788,7 +15172,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -13802,7 +15186,7 @@ async def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -13825,6 +15209,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -13834,6 +15219,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -13841,7 +15227,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13856,7 +15246,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -13870,7 +15260,7 @@ async def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -13892,6 +15282,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -13901,6 +15292,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -13908,7 +15300,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13923,7 +15319,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -13936,7 +15332,7 @@ async def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -13956,18 +15352,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13982,7 +15385,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -13998,18 +15401,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14023,7 +15433,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -14036,7 +15446,7 @@ async def begin_list_publishing_credentials_slot( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -14057,7 +15467,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -14069,6 +15480,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -14092,10 +15504,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -14108,7 +15519,7 @@ async def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -14129,6 +15540,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -14138,6 +15550,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -14145,7 +15558,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14160,7 +15577,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -14173,7 +15590,7 @@ async def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -14192,18 +15609,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14218,7 +15642,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -14232,8 +15656,8 @@ async def get_configuration_slot( """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. + 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 @@ -14253,18 +15677,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14279,7 +15710,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -14293,7 +15724,7 @@ async def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -14315,6 +15746,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14324,6 +15756,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -14331,7 +15764,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14346,7 +15783,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -14360,7 +15797,7 @@ async def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -14382,6 +15819,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14391,6 +15829,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -14398,7 +15837,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14413,7 +15856,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -14427,8 +15870,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -14444,6 +15887,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14457,6 +15902,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -14469,6 +15915,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14486,7 +15933,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14500,7 +15951,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -14513,7 +15964,7 @@ async def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -14535,6 +15986,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -14542,12 +15995,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14562,11 +16020,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14576,7 +16034,7 @@ async def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -14598,6 +16056,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -14605,12 +16065,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -14621,7 +16086,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -14634,7 +16099,7 @@ async def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -14653,18 +16118,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14680,7 +16152,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -14693,7 +16165,7 @@ async def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -14712,18 +16184,25 @@ async def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14739,7 +16218,7 @@ async def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -14752,7 +16231,7 @@ def list_continuous_web_jobs_slot( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -14768,6 +16247,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14781,6 +16262,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -14793,6 +16275,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14810,7 +16293,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14824,7 +16311,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -14837,7 +16324,7 @@ async def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -14859,6 +16346,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -14866,12 +16355,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14888,11 +16382,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14902,7 +16396,7 @@ async def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -14924,6 +16418,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -14931,12 +16427,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14947,11 +16448,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14961,7 +16462,7 @@ async def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -14983,6 +16484,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -14990,12 +16493,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15006,11 +16514,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15020,7 +16528,7 @@ async def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -15042,6 +16550,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15049,12 +16559,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15065,7 +16580,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -15078,7 +16593,7 @@ def list_deployments_slot( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -15094,6 +16609,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15107,6 +16624,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -15119,6 +16637,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15136,7 +16655,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15150,7 +16673,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -15163,7 +16686,7 @@ async def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -15185,6 +16708,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -15192,12 +16717,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15212,7 +16742,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -15227,7 +16757,7 @@ async def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -15251,6 +16781,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -15261,6 +16792,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -15268,7 +16800,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15283,11 +16819,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15297,7 +16833,7 @@ async def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -15319,6 +16855,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -15326,12 +16864,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15342,7 +16885,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -15356,7 +16899,7 @@ async def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -15379,6 +16922,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -15386,12 +16931,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15406,7 +16956,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -15421,8 +16971,8 @@ async def discover_backup_slot( """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. + 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 @@ -15445,6 +16995,7 @@ async def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -15454,6 +17005,7 @@ async def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -15461,7 +17013,11 @@ async def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15476,7 +17032,7 @@ async def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -15489,7 +17045,7 @@ def list_domain_ownership_identifiers_slot( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -15505,6 +17061,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15518,6 +17076,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -15530,6 +17089,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15547,7 +17107,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15561,7 +17125,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -15574,7 +17138,7 @@ async def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -15596,6 +17160,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -15603,12 +17169,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15623,7 +17194,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15638,8 +17209,7 @@ async def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -15663,6 +17233,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15673,6 +17244,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -15680,7 +17252,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15695,11 +17271,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15709,7 +17285,7 @@ async def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -15731,6 +17307,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -15738,12 +17316,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15754,7 +17337,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15769,8 +17352,7 @@ async def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -15794,6 +17376,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15804,6 +17387,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -15811,7 +17395,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15826,7 +17414,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15839,7 +17427,7 @@ async def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -15858,18 +17446,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15884,7 +17479,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -15901,6 +17496,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -15910,6 +17506,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -15917,7 +17514,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -15933,7 +17534,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -15947,7 +17548,7 @@ async def begin_create_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -15970,8 +17571,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -15984,6 +17586,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16008,10 +17611,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -16023,7 +17625,7 @@ async def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -16042,18 +17644,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16070,7 +17679,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -16083,7 +17692,7 @@ def list_instance_functions_slot( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -16098,6 +17707,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16111,6 +17722,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -16123,6 +17735,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16140,7 +17753,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16154,7 +17771,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -16166,7 +17783,7 @@ async def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -16185,18 +17802,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16211,7 +17835,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -16225,7 +17849,7 @@ async def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -16246,6 +17870,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -16253,12 +17879,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16275,7 +17906,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -16293,6 +17924,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -16303,6 +17935,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -16310,7 +17943,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -16324,7 +17961,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -16339,7 +17976,7 @@ async def begin_create_instance_function_slot( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -16364,8 +18001,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -16379,6 +18017,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16403,13 +18042,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16419,7 +18057,7 @@ async def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -16440,6 +18078,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -16447,12 +18087,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -16463,7 +18108,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -16479,7 +18124,7 @@ async def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -16504,6 +18149,7 @@ async def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -16515,6 +18161,7 @@ async def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -16522,7 +18169,11 @@ async def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -16541,11 +18192,11 @@ async def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret_slot( + async def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16556,7 +18207,7 @@ async def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -16579,6 +18230,8 @@ async def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -16587,12 +18240,17 @@ async def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -16603,7 +18261,7 @@ async def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -16617,7 +18275,7 @@ async def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -16638,6 +18296,8 @@ async def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -16645,12 +18305,17 @@ async def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16665,7 +18330,7 @@ async def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -16679,7 +18344,7 @@ async def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -16700,6 +18365,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -16707,12 +18374,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16727,7 +18399,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -16740,7 +18412,7 @@ async def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -16759,18 +18431,25 @@ async def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16785,11 +18464,11 @@ async def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status_slot( + async def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16798,7 +18477,7 @@ async def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -16817,18 +18496,25 @@ async def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16839,11 +18525,11 @@ async def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions_slot( + async def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16852,7 +18538,7 @@ async def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -16871,18 +18557,25 @@ async def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16893,7 +18586,7 @@ async def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace_async @@ -16909,7 +18602,7 @@ async def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -16934,6 +18627,7 @@ async def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -16945,6 +18639,7 @@ async def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -16952,7 +18647,11 @@ async def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -16971,11 +18670,11 @@ async def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret_slot( + async def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16986,7 +18685,7 @@ async def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -17009,6 +18708,8 @@ async def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -17017,12 +18718,17 @@ async def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -17033,7 +18739,7 @@ async def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -17046,7 +18752,7 @@ def list_host_name_bindings_slot( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -17062,6 +18768,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17075,6 +18783,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -17087,6 +18796,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17104,7 +18814,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17118,7 +18832,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -17131,7 +18845,7 @@ async def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -17153,6 +18867,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -17160,12 +18876,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17180,7 +18901,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -17195,7 +18916,7 @@ async def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -17220,6 +18941,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -17230,6 +18952,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -17237,7 +18960,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17252,11 +18979,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17266,7 +18993,7 @@ async def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -17288,6 +19015,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -17295,12 +19024,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -17311,7 +19045,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -17326,7 +19060,7 @@ async def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -17349,6 +19083,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -17357,12 +19093,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17377,7 +19118,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17393,7 +19134,7 @@ async def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -17418,6 +19159,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -17429,6 +19171,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -17436,7 +19179,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17451,11 +19198,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17466,7 +19213,7 @@ async def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -17489,6 +19236,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -17497,12 +19246,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17513,7 +19267,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17529,7 +19283,7 @@ async def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -17554,6 +19308,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -17565,6 +19320,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -17572,7 +19328,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17587,7 +19347,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17600,7 +19360,7 @@ async def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -17619,18 +19379,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17645,7 +19412,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -17658,8 +19425,7 @@ async def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -17679,18 +19445,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17705,7 +19478,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -17719,7 +19492,7 @@ async def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -17741,6 +19514,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -17748,12 +19523,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17768,7 +19548,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -17783,8 +19563,7 @@ async def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -17808,6 +19587,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -17818,6 +19598,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -17825,7 +19606,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17840,11 +19625,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17854,7 +19639,7 @@ async def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -17876,6 +19661,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -17883,12 +19670,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17899,7 +19691,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -17914,8 +19706,7 @@ async def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -17939,6 +19730,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -17949,6 +19741,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -17956,7 +19749,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17971,7 +19768,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -17984,7 +19781,7 @@ def list_instance_identifiers_slot( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -18000,6 +19797,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18013,6 +19812,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -18025,6 +19825,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18042,7 +19843,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18056,7 +19861,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_info_slot( @@ -18069,7 +19874,7 @@ async def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -18091,6 +19896,8 @@ async def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -18098,12 +19905,17 @@ async def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18118,7 +19930,7 @@ async def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -18132,7 +19944,7 @@ async def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -18153,6 +19965,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -18160,12 +19974,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18180,7 +19999,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -18198,6 +20017,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -18208,6 +20028,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -18215,7 +20036,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -18231,7 +20056,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -18246,7 +20071,7 @@ async def begin_create_instance_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -18271,8 +20096,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -18286,6 +20112,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18310,10 +20137,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -18326,7 +20152,7 @@ async def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -18347,6 +20173,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -18354,12 +20182,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18376,7 +20209,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -18391,8 +20224,8 @@ def list_instance_processes_slot( """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. + 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 @@ -18411,6 +20244,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18425,6 +20260,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -18438,6 +20274,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18455,7 +20292,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18469,7 +20310,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -18483,8 +20324,7 @@ async def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -18509,6 +20349,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -18517,12 +20359,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18539,11 +20386,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18555,8 +20402,8 @@ async def delete_instance_process_slot( """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. + 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 @@ -18581,6 +20428,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -18589,12 +20438,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -18605,7 +20459,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -18620,8 +20474,7 @@ async def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -18646,6 +20499,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -18654,12 +20509,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18676,7 +20536,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -18692,8 +20552,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -18714,6 +20574,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18729,6 +20591,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -18743,6 +20606,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18760,7 +20624,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18774,7 +20642,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -18789,8 +20657,7 @@ async def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -18817,6 +20684,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -18826,12 +20695,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18848,7 +20722,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -18863,8 +20737,7 @@ def list_instance_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -18885,6 +20758,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18900,6 +20775,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -18914,6 +20790,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18931,7 +20808,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18945,7 +20826,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable_slot( @@ -18957,7 +20838,7 @@ async def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -18977,18 +20858,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19003,7 +20891,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -19016,7 +20904,7 @@ def list_site_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -19032,6 +20920,8 @@ def list_site_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19045,6 +20935,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -19057,6 +20948,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19074,7 +20966,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19088,7 +20984,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers_slot( @@ -19100,7 +20996,7 @@ async def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -19119,18 +21015,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19145,7 +21048,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace_async @@ -19159,8 +21062,8 @@ async def get_migrate_my_sql_status_slot( """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. + 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 @@ -19179,18 +21082,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19205,7 +21115,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -19218,7 +21128,7 @@ async def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -19238,18 +21148,25 @@ async def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19264,11 +21181,11 @@ async def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network_slot( + async def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19277,7 +21194,7 @@ async def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -19297,18 +21214,25 @@ async def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19319,7 +21243,7 @@ async def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -19333,7 +21257,7 @@ async def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -19355,6 +21279,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -19362,12 +21288,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19384,7 +21315,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -19398,8 +21329,7 @@ async def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19421,6 +21351,8 @@ async def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -19428,12 +21360,17 @@ async def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19452,7 +21389,7 @@ async def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -19468,7 +21405,7 @@ async def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -19476,11 +21413,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -19493,12 +21430,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -19507,7 +21447,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19522,7 +21466,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_slot_initial( @@ -19541,12 +21485,15 @@ async def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -19555,7 +21502,11 @@ async def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19573,7 +21524,7 @@ async def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -19589,7 +21540,7 @@ async def begin_start_web_site_network_trace_operation_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -19597,11 +21548,11 @@ async def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -19617,7 +21568,8 @@ async def begin_start_web_site_network_trace_operation_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -19632,6 +21584,7 @@ async def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -19655,13 +21608,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace_slot( + async def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19670,7 +21622,7 @@ async def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -19689,18 +21641,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19711,7 +21670,7 @@ async def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -19725,8 +21684,7 @@ async def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19748,6 +21706,8 @@ async def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -19755,12 +21715,17 @@ async def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19775,7 +21740,7 @@ async def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -19789,8 +21754,7 @@ async def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19812,6 +21776,8 @@ async def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -19819,12 +21785,17 @@ async def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19843,7 +21814,7 @@ async def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -19857,8 +21828,7 @@ async def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19880,6 +21850,8 @@ async def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -19887,12 +21859,17 @@ async def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19907,11 +21884,11 @@ async def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19920,8 +21897,7 @@ async def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -19941,18 +21917,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19963,7 +21946,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -19977,7 +21960,7 @@ def list_perf_mon_counters_slot( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -19987,7 +21970,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -19996,6 +21979,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20009,6 +21994,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -20022,6 +22008,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -20040,7 +22027,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20054,7 +22045,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -20066,7 +22057,7 @@ async def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -20085,18 +22076,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20111,7 +22109,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -20124,7 +22122,7 @@ async def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -20144,18 +22142,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20170,7 +22175,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -20184,7 +22189,7 @@ async def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -20206,6 +22211,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -20213,12 +22220,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20233,7 +22245,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20248,7 +22260,7 @@ async def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -20272,6 +22284,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -20282,6 +22295,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -20289,7 +22303,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20304,11 +22322,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20318,7 +22336,7 @@ async def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -20340,6 +22358,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -20347,12 +22367,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20363,7 +22388,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20378,7 +22403,7 @@ async def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -20402,6 +22427,7 @@ async def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -20412,6 +22438,7 @@ async def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -20419,7 +22446,11 @@ async def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20434,7 +22465,7 @@ async def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20448,8 +22479,8 @@ async def get_private_access_slot( """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. + 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 @@ -20468,18 +22499,25 @@ async def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20494,7 +22532,7 @@ async def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -20509,8 +22547,8 @@ async def put_private_access_vnet_slot( """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. + 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 @@ -20531,6 +22569,7 @@ async def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -20540,6 +22579,7 @@ async def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -20547,7 +22587,11 @@ async def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20562,7 +22606,7 @@ async def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -20575,7 +22619,7 @@ def get_private_endpoint_connection_list_slot( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -20590,6 +22634,8 @@ def get_private_endpoint_connection_list_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20603,6 +22649,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list_slot.metadata['url'], ) request = _convert_request(request) @@ -20615,6 +22662,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20632,7 +22680,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20646,7 +22698,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection_slot( @@ -20659,7 +22711,7 @@ async def get_private_endpoint_connection_slot( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20680,6 +22732,8 @@ async def get_private_endpoint_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_endpoint_connection_slot_request( resource_group_name=resource_group_name, @@ -20687,12 +22741,17 @@ async def get_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20707,7 +22766,7 @@ async def get_private_endpoint_connection_slot( return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_slot_initial( @@ -20725,6 +22784,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -20735,6 +22795,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'], @@ -20742,7 +22803,11 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20760,7 +22825,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( return deserialized - _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -20775,7 +22840,7 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -20802,8 +22867,9 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -20817,6 +22883,7 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20841,10 +22908,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_slot_initial( self, @@ -20860,6 +22926,8 @@ async def _delete_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_private_endpoint_connection_slot_request_initial( resource_group_name=resource_group_name, @@ -20867,12 +22935,17 @@ async def _delete_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -20893,7 +22966,7 @@ async def _delete_private_endpoint_connection_slot_initial( return deserialized - _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -20907,7 +22980,7 @@ async def begin_delete_private_endpoint_connection_slot( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20929,7 +23002,8 @@ async def begin_delete_private_endpoint_connection_slot( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -20942,6 +23016,7 @@ async def begin_delete_private_endpoint_connection_slot( name=name, private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -20965,10 +23040,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources_slot( @@ -20980,7 +23054,7 @@ async def get_private_link_resources_slot( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20999,18 +23073,25 @@ async def get_private_link_resources_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_link_resources_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21025,7 +23106,7 @@ async def get_private_link_resources_slot( return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + get_private_link_resources_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources"} # type: ignore @distributed_trace @@ -21039,8 +23120,8 @@ def list_processes_slot( """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. + 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 @@ -21056,6 +23137,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21069,6 +23152,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -21081,6 +23165,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21098,7 +23183,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21112,7 +23201,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -21125,8 +23214,7 @@ async def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21148,6 +23236,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -21155,12 +23245,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21177,11 +23272,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21192,8 +23287,8 @@ async def delete_process_slot( """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. + 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 @@ -21215,6 +23310,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -21222,12 +23319,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21238,7 +23340,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -21252,8 +23354,7 @@ async def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -21275,6 +23376,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -21282,12 +23385,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21304,7 +23412,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -21319,8 +23427,8 @@ def list_process_modules_slot( """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. + 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 @@ -21338,6 +23446,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21352,6 +23462,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -21365,6 +23476,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21382,7 +23494,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21396,7 +23512,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -21410,8 +23526,7 @@ async def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21435,6 +23550,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -21443,12 +23560,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21465,7 +23587,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -21479,8 +23601,7 @@ def list_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -21498,6 +23619,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21512,6 +23635,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -21525,6 +23649,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21542,7 +23667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21556,7 +23685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -21568,7 +23697,7 @@ def list_public_certificates_slot( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -21584,6 +23713,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21597,6 +23728,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -21609,6 +23741,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21626,7 +23759,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21640,7 +23777,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -21653,7 +23790,7 @@ async def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -21675,6 +23812,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -21682,12 +23821,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21702,7 +23846,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -21717,7 +23861,7 @@ async def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -21742,6 +23886,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -21752,6 +23897,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -21759,7 +23905,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21774,11 +23924,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21788,7 +23938,7 @@ async def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -21810,6 +23960,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -21817,12 +23969,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -21833,7 +23990,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -21847,7 +24004,7 @@ async def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -21871,6 +24028,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -21880,6 +24038,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -21887,7 +24046,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21902,11 +24065,11 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21916,8 +24079,8 @@ async def reset_slot_configuration_slot( """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. + 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 @@ -21937,18 +24100,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21959,11 +24129,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21974,7 +24144,7 @@ async def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -21984,10 +24154,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -22000,12 +24171,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -22013,7 +24187,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22024,10 +24202,10 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - async def _restore_from_backup_blob_slot_initial( + async def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22041,6 +24219,7 @@ async def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -22050,6 +24229,7 @@ async def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -22057,7 +24237,11 @@ async def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22067,11 +24251,11 @@ async def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob_slot( + async def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22081,7 +24265,7 @@ async def begin_restore_from_backup_blob_slot( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -22104,8 +24288,9 @@ async def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22118,6 +24303,7 @@ async def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22139,12 +24325,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_slot_initial( + async def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22158,6 +24343,7 @@ async def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -22167,6 +24353,7 @@ async def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -22174,7 +24361,11 @@ async def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22184,11 +24375,11 @@ async def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app_slot( + async def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22198,7 +24389,7 @@ async def begin_restore_from_deleted_app_slot( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -22220,8 +24411,9 @@ async def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22234,6 +24426,7 @@ async def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22255,12 +24448,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_slot_initial( + async def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22274,6 +24466,7 @@ async def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -22283,6 +24476,7 @@ async def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -22290,7 +24484,11 @@ async def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22300,11 +24498,11 @@ async def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot_slot( + async def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22314,7 +24512,7 @@ async def begin_restore_snapshot_slot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -22337,8 +24535,9 @@ async def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22351,6 +24550,7 @@ async def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22372,10 +24572,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -22387,7 +24586,7 @@ def list_site_extensions_slot( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -22403,6 +24602,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22416,6 +24617,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -22428,6 +24630,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22445,7 +24648,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22459,7 +24666,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -22472,7 +24679,7 @@ async def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -22494,6 +24701,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -22501,12 +24710,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22523,7 +24737,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -22540,6 +24754,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -22547,12 +24763,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -22571,7 +24792,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -22585,7 +24806,7 @@ async def begin_install_site_extension_slot( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -22610,7 +24831,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -22623,6 +24845,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -22646,13 +24869,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22662,7 +24884,7 @@ async def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -22684,6 +24906,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -22691,12 +24915,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -22707,7 +24936,7 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -22721,7 +24950,7 @@ def list_slot_differences_slot( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -22739,6 +24968,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -22755,6 +24985,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -22770,6 +25001,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -22789,7 +25021,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22803,9 +25039,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22819,6 +25055,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -22828,6 +25065,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -22835,7 +25073,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22845,11 +25087,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22859,7 +25101,7 @@ async def begin_swap_slot( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -22882,8 +25124,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22896,6 +25139,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22917,10 +25161,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -22932,7 +25175,7 @@ def list_snapshots_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -22946,6 +25189,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22959,6 +25204,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -22971,6 +25217,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22988,7 +25235,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23002,7 +25253,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -23014,7 +25265,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -23028,6 +25279,8 @@ def list_snapshots_from_dr_secondary_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23041,6 +25294,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -23053,6 +25307,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23070,7 +25325,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23084,7 +25343,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -23096,7 +25355,7 @@ async def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -23116,18 +25375,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23149,7 +25415,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -23166,6 +25432,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23175,6 +25442,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -23182,7 +25450,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23203,7 +25475,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23217,7 +25489,7 @@ async def begin_create_or_update_source_control_slot( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -23242,8 +25514,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -23256,6 +25529,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23280,13 +25554,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23296,7 +25569,7 @@ async def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -23305,7 +25578,7 @@ async def delete_source_control_slot( :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: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -23318,19 +25591,26 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -23341,7 +25621,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23355,7 +25635,7 @@ async def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -23377,6 +25657,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23386,6 +25667,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -23393,7 +25675,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23415,11 +25701,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23428,7 +25714,7 @@ async def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -23448,18 +25734,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23470,7 +25763,7 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore async def _start_network_trace_slot_initial( @@ -23489,12 +25782,15 @@ async def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23503,7 +25799,11 @@ async def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23521,7 +25821,7 @@ async def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -23537,7 +25837,7 @@ async def begin_start_network_trace_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -23545,11 +25845,11 @@ async def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23565,7 +25865,8 @@ async def begin_start_network_trace_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -23580,6 +25881,7 @@ async def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23603,13 +25905,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23618,7 +25919,7 @@ async def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -23638,18 +25939,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23660,11 +25968,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace_slot( + async def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23673,7 +25981,7 @@ async def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -23692,18 +26000,25 @@ async def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23714,11 +26029,11 @@ async def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23727,7 +26042,7 @@ async def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -23746,18 +26061,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23768,11 +26090,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23781,7 +26103,7 @@ async def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -23800,18 +26122,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -23822,7 +26151,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -23835,7 +26164,7 @@ def list_triggered_web_jobs_slot( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -23851,6 +26180,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23864,6 +26195,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -23876,6 +26208,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23893,7 +26226,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23907,7 +26244,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -23920,7 +26257,7 @@ async def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -23942,6 +26279,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -23949,12 +26288,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23971,11 +26315,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23985,7 +26329,7 @@ async def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -24007,6 +26351,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24014,12 +26360,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24030,7 +26381,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -24044,7 +26395,7 @@ def list_triggered_web_job_history_slot( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -24062,6 +26413,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24076,6 +26429,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -24089,6 +26443,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24106,7 +26461,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24120,7 +26479,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -24134,8 +26493,7 @@ async def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -24159,6 +26517,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -24167,12 +26527,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24189,11 +26554,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24203,7 +26568,7 @@ async def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -24225,6 +26590,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24232,12 +26599,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24248,7 +26620,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -24262,7 +26634,7 @@ def list_usages_slot( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -24274,7 +26646,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -24283,6 +26655,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24296,6 +26670,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -24309,6 +26684,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24327,7 +26703,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24341,7 +26721,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -24353,7 +26733,7 @@ async def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -24373,18 +26753,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24399,7 +26786,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -24413,7 +26800,7 @@ async def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -24435,6 +26822,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -24442,12 +26831,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24462,7 +26856,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24478,8 +26872,8 @@ async def create_or_update_vnet_connection_slot( """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). + 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 @@ -24503,6 +26897,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -24513,6 +26908,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -24520,7 +26916,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24535,11 +26935,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24549,8 +26949,7 @@ async def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -24572,6 +26971,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -24579,12 +26980,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24595,7 +27001,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24611,8 +27017,8 @@ async def update_vnet_connection_slot( """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). + 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 @@ -24636,6 +27042,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -24646,6 +27053,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -24653,7 +27061,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24668,7 +27080,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24683,7 +27095,7 @@ async def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -24707,6 +27119,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -24715,12 +27129,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24737,7 +27156,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -24753,7 +27172,7 @@ async def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -24779,6 +27198,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -24790,6 +27210,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -24797,7 +27218,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24812,7 +27237,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -24828,7 +27253,7 @@ async def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -24854,6 +27279,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -24865,6 +27291,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -24872,7 +27299,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24887,7 +27318,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -24900,7 +27331,7 @@ def list_web_jobs_slot( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -24915,6 +27346,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24928,6 +27361,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -24940,6 +27374,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24957,7 +27392,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24971,7 +27410,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -24984,7 +27423,7 @@ async def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -25006,6 +27445,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -25013,12 +27454,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25033,7 +27479,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -25046,7 +27492,7 @@ def list_slot_differences_from_production( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -25061,6 +27507,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -25076,6 +27523,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -25090,6 +27538,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -25109,7 +27558,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25123,9 +27576,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25138,6 +27591,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -25146,6 +27600,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -25153,7 +27608,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25163,11 +27622,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25176,7 +27635,7 @@ async def begin_swap_slot_with_production( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -25196,8 +27655,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25209,6 +27669,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25230,10 +27691,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -25244,7 +27704,7 @@ def list_snapshots( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -25256,6 +27716,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25268,6 +27730,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -25279,6 +27742,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25296,7 +27760,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25310,7 +27778,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -25321,7 +27789,7 @@ def list_snapshots_from_dr_secondary( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -25333,6 +27801,8 @@ def list_snapshots_from_dr_secondary( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25345,6 +27815,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -25356,6 +27827,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25373,7 +27845,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25387,7 +27863,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control( @@ -25398,7 +27874,7 @@ async def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -25415,17 +27891,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25447,7 +27930,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -25463,6 +27946,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -25471,6 +27955,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -25478,7 +27963,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25499,7 +27988,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -25512,7 +28001,7 @@ async def begin_create_or_update_source_control( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -25534,8 +28023,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -25547,6 +28037,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25571,13 +28062,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25586,13 +28076,13 @@ async def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 additional_flags: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -25605,18 +28095,25 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -25627,7 +28124,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -25640,7 +28137,7 @@ async def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -25659,6 +28156,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -25667,6 +28165,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -25674,7 +28173,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25696,11 +28199,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25708,7 +28211,7 @@ async def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -25725,17 +28228,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25746,7 +28256,7 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore async def _start_network_trace_initial( @@ -25764,11 +28274,14 @@ async def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -25777,7 +28290,11 @@ async def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25795,7 +28312,7 @@ async def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -25810,17 +28327,17 @@ async def begin_start_network_trace( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -25836,7 +28353,8 @@ async def begin_start_network_trace( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -25850,6 +28368,7 @@ async def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25873,13 +28392,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25887,7 +28405,7 @@ async def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -25904,17 +28422,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25925,11 +28450,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace( + async def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25937,7 +28462,7 @@ async def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -25954,17 +28479,24 @@ async def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -25975,11 +28507,11 @@ async def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25987,7 +28519,7 @@ async def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -26004,17 +28536,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26025,11 +28564,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26037,7 +28576,7 @@ async def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -26054,17 +28593,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -26075,7 +28621,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -26087,7 +28633,7 @@ def list_triggered_web_jobs( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -26100,6 +28646,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26112,6 +28660,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -26123,6 +28672,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26140,7 +28690,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26154,7 +28708,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -26166,7 +28720,7 @@ async def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -26185,18 +28739,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26213,11 +28774,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26226,7 +28787,7 @@ async def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -26245,18 +28806,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -26267,7 +28835,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -26280,7 +28848,7 @@ def list_triggered_web_job_history( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -26295,6 +28863,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26308,6 +28878,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -26320,6 +28891,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26337,7 +28909,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26351,7 +28927,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -26364,8 +28940,7 @@ async def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -26386,6 +28961,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -26393,12 +28970,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26415,11 +28997,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26428,7 +29010,7 @@ async def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -26447,18 +29029,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26469,7 +29058,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -26482,7 +29071,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -26491,7 +29080,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -26500,6 +29089,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26512,6 +29103,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -26524,6 +29116,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -26542,7 +29135,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26556,7 +29153,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -26567,7 +29164,7 @@ async def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -26584,17 +29181,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26609,7 +29213,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -26622,7 +29226,7 @@ async def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -26641,18 +29245,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26667,7 +29278,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -26682,8 +29293,8 @@ async def create_or_update_vnet_connection( """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). + 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 @@ -26704,6 +29315,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -26713,6 +29325,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -26720,7 +29333,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26735,11 +29352,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26748,8 +29365,7 @@ async def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -26768,18 +29384,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26790,7 +29413,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -26805,8 +29428,8 @@ async def update_vnet_connection( """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). + 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 @@ -26827,6 +29450,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -26836,6 +29460,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -26843,7 +29468,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26858,7 +29487,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -26872,7 +29501,7 @@ async def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -26893,6 +29522,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -26900,12 +29531,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26922,7 +29558,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -26937,7 +29573,7 @@ async def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -26960,6 +29596,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -26970,6 +29607,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -26977,7 +29615,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26992,7 +29634,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -27007,7 +29649,7 @@ async def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -27030,6 +29672,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -27040,6 +29683,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -27047,7 +29691,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27062,7 +29710,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -27074,7 +29722,7 @@ def list_web_jobs( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -27086,6 +29734,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27098,6 +29748,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -27109,6 +29760,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27126,7 +29778,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27140,7 +29796,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -27152,7 +29808,7 @@ async def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -27171,18 +29827,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27197,5 +29860,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_site_management_client_operations.py index 288083ec29ce..f10f0414446d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -33,7 +32,7 @@ async def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -68,7 +74,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -79,7 +85,7 @@ async def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2020_12_01.models.User @@ -94,11 +100,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -106,7 +114,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +133,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -131,7 +143,7 @@ def list_source_controls( ) -> AsyncIterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -140,6 +152,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -149,6 +163,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -157,6 +172,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -174,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -188,7 +208,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -198,7 +218,7 @@ async def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -213,15 +233,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -236,7 +263,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -248,7 +275,7 @@ async def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -265,12 +292,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -278,7 +307,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -293,7 +326,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -305,11 +338,11 @@ def list_billing_meters( ) -> AsyncIterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -318,6 +351,8 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -328,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -339,6 +375,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -358,7 +395,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -372,7 +413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace_async async def check_name_availability( @@ -384,13 +425,13 @@ async def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -403,6 +444,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -410,6 +452,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -417,7 +460,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -432,7 +479,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace_async @@ -442,7 +489,7 @@ async def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -455,15 +502,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -478,7 +532,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -492,18 +546,18 @@ def list_geo_regions( ) -> AsyncIterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -511,6 +565,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -521,6 +577,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -534,6 +591,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -555,7 +613,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -569,7 +631,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -579,7 +641,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> AsyncIterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier @@ -590,6 +652,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -603,6 +666,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -615,6 +679,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -634,7 +699,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -648,7 +717,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -657,7 +726,7 @@ def list_premier_add_on_offers( ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -666,6 +735,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -676,6 +747,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -685,6 +757,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -702,7 +775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -716,7 +793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -725,7 +802,7 @@ async def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -738,15 +815,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -761,7 +845,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -773,8 +857,8 @@ async def verify_hosting_environment_vnet( """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. + 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 @@ -789,12 +873,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -802,7 +888,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -817,11 +907,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -829,7 +919,7 @@ async def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -846,6 +936,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -853,6 +944,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -860,7 +952,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -871,7 +967,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -883,7 +979,7 @@ async def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -900,6 +996,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -907,6 +1004,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -914,7 +1012,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -929,11 +1031,11 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -941,7 +1043,7 @@ async def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -958,6 +1060,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -965,6 +1068,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -972,7 +1076,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -983,5 +1091,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_certificate_orders_operations.py index b543cc062cab..db3cf9290da0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,33 +68,33 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -105,30 +106,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -297,31 +301,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -333,10 +338,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -344,21 +350,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -373,12 +379,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -386,23 +392,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -416,10 +422,11 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -427,21 +434,21 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -456,12 +463,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -469,23 +476,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -501,35 +508,35 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -545,35 +552,35 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -586,31 +593,32 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -624,35 +632,35 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -668,35 +676,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -709,31 +717,32 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -744,31 +753,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -779,35 +789,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -836,7 +847,7 @@ def list( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -845,6 +856,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -855,6 +868,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -864,6 +878,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -881,7 +896,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -895,17 +914,17 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -921,12 +940,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -934,7 +955,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -945,7 +970,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -956,7 +981,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -967,6 +992,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -978,6 +1005,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -988,6 +1016,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1005,7 +1034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1019,7 +1052,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1030,7 +1063,7 @@ def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -1047,17 +1080,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1072,7 +1112,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1088,6 +1128,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1096,6 +1137,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1103,7 +1145,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1121,7 +1167,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1134,7 +1180,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -1157,8 +1203,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1170,6 +1217,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1194,13 +1242,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1208,7 +1255,7 @@ def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -1225,17 +1272,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1246,7 +1300,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1259,7 +1313,7 @@ def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -1279,6 +1333,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1287,6 +1342,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1294,7 +1350,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1313,7 +1373,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1325,7 +1385,7 @@ def list_certificates( ) -> Iterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -1338,6 +1398,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1350,6 +1412,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1361,6 +1424,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1378,7 +1442,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,7 +1460,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1404,7 +1472,7 @@ def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -1423,18 +1491,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1449,7 +1524,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1466,6 +1541,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1475,6 +1551,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1482,7 +1559,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1500,7 +1581,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1514,7 +1595,7 @@ def begin_create_or_update_certificate( ) -> LROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1538,8 +1619,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1552,6 +1634,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1576,13 +1659,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1591,7 +1673,7 @@ def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -1610,18 +1692,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1632,7 +1721,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1646,7 +1735,7 @@ def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1668,6 +1757,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1677,6 +1767,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1684,7 +1775,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1703,11 +1798,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1716,7 +1811,7 @@ def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -1736,6 +1831,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1744,6 +1840,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1751,7 +1848,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1762,11 +1863,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1775,7 +1876,7 @@ def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1795,6 +1896,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1803,6 +1905,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1810,7 +1913,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1821,11 +1928,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1833,7 +1940,7 @@ def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1850,17 +1957,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1871,11 +1985,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1884,7 +1998,7 @@ def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1903,6 +2017,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1911,6 +2026,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1918,7 +2034,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1929,7 +2049,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1942,7 +2062,7 @@ def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1961,6 +2081,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1969,6 +2090,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1976,7 +2098,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1991,11 +2117,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -2003,7 +2129,7 @@ def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -2020,17 +2146,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2041,7 +2174,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2053,7 +2186,7 @@ def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -2070,17 +2203,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2095,7 +2235,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2107,7 +2247,7 @@ def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -2124,17 +2264,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2149,5 +2296,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_environments_operations.py index bcc0793ec2d8..27c113ed42c4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,33 +183,34 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -296,31 +301,32 @@ def build_get_vip_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -334,35 +340,35 @@ def build_change_vnet_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -375,31 +381,32 @@ def build_get_ase_v3_networking_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -413,35 +420,35 @@ def build_update_ase_networking_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -454,31 +461,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -490,10 +498,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -501,21 +510,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -526,31 +535,32 @@ def build_get_inbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -561,31 +571,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -596,31 +607,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -634,35 +646,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -678,35 +690,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -720,10 +732,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -731,21 +744,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -756,31 +769,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -791,31 +805,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -826,31 +841,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -861,31 +877,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -896,31 +913,32 @@ def build_get_outbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -931,31 +949,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -967,10 +986,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -978,21 +998,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1027,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1020,23 +1040,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1050,10 +1070,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1061,21 +1082,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1086,31 +1107,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1121,31 +1143,32 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1156,31 +1179,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1191,31 +1215,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1228,33 +1253,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1265,31 +1291,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1302,33 +1329,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1339,31 +1367,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1375,10 +1404,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1386,21 +1416,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1415,12 +1445,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1428,23 +1458,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1461,12 +1491,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1474,23 +1504,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1505,10 +1535,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1517,21 +1548,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1543,10 +1574,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1554,21 +1586,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1580,10 +1612,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1591,21 +1624,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1617,10 +1650,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1628,25 +1662,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1675,7 +1709,7 @@ def list( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -1684,6 +1718,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1694,6 +1730,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1703,6 +1740,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1720,7 +1758,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1734,7 +1776,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1744,7 +1786,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -1755,6 +1797,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1766,6 +1810,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1776,6 +1821,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1793,7 +1839,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1807,7 +1857,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1818,7 +1868,7 @@ def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -1835,17 +1885,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1860,7 +1917,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1876,6 +1933,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1884,6 +1942,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1891,7 +1950,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1912,7 +1975,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1925,7 +1988,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -1948,8 +2011,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1961,6 +2025,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1985,12 +2050,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2003,18 +2067,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -2024,11 +2095,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2037,7 +2108,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -2058,7 +2129,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2070,6 +2142,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2090,10 +2163,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -2105,7 +2177,7 @@ def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -2125,6 +2197,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -2133,6 +2206,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -2140,7 +2214,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -2162,7 +2240,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -2174,7 +2252,7 @@ def list_capacities( ) -> Iterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -2187,6 +2265,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2199,6 +2279,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -2210,6 +2291,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2227,7 +2309,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2241,7 +2327,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def get_vip_info( @@ -2252,7 +2338,7 @@ def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -2269,17 +2355,24 @@ def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2294,7 +2387,7 @@ def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore def _change_vnet_initial( @@ -2310,6 +2403,7 @@ def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -2318,6 +2412,7 @@ def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -2325,7 +2420,11 @@ def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2343,7 +2442,7 @@ def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2356,7 +2455,7 @@ def begin_change_vnet( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -2379,6 +2478,7 @@ def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -2394,6 +2494,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -2408,6 +2509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -2427,7 +2529,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2438,7 +2544,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2450,6 +2556,7 @@ def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2460,8 +2567,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -2477,10 +2583,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2492,7 +2597,7 @@ def get_ase_v3_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Get networking configuration of an App Service Environment. - Description for Get networking configuration of an App Service Environment. + 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 @@ -2509,17 +2614,24 @@ def get_ase_v3_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ase_v3_networking_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ase_v3_networking_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2534,7 +2646,7 @@ def get_ase_v3_networking_configuration( return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + get_ase_v3_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace @@ -2547,7 +2659,7 @@ def update_ase_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Update networking configuration of an App Service Environment. - Description for Update networking configuration of an App Service Environment. + 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 @@ -2567,6 +2679,7 @@ def update_ase_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') @@ -2575,6 +2688,7 @@ def update_ase_networking_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ase_networking_configuration.metadata['url'], @@ -2582,7 +2696,11 @@ def update_ase_networking_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2597,7 +2715,7 @@ def update_ase_networking_configuration( return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + update_ase_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace @@ -2609,7 +2727,7 @@ def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -2626,17 +2744,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2651,7 +2776,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2664,7 +2789,7 @@ def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -2683,18 +2808,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2709,7 +2841,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2721,8 +2853,7 @@ def get_inbound_network_dependencies_endpoints( ) -> Iterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -2735,6 +2866,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2747,6 +2880,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2758,6 +2892,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2775,7 +2910,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2789,7 +2928,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2800,7 +2939,7 @@ def list_multi_role_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -2812,6 +2951,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2824,6 +2965,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2835,6 +2977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2852,7 +2995,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2866,7 +3013,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2877,7 +3024,7 @@ def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -2894,17 +3041,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2919,7 +3073,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2935,6 +3089,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2943,6 +3098,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2950,7 +3106,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2968,7 +3128,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2981,7 +3141,7 @@ def begin_create_or_update_multi_role_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -3002,8 +3162,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3015,6 +3176,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3039,10 +3201,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -3054,7 +3215,7 @@ def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -3073,6 +3234,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -3081,6 +3243,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -3088,7 +3251,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3107,7 +3274,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -3121,8 +3288,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -3137,6 +3304,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3150,6 +3319,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3162,6 +3332,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3179,7 +3350,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3193,7 +3368,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -3204,7 +3379,7 @@ def list_multi_role_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -3217,6 +3392,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3229,6 +3406,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3240,6 +3418,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3257,7 +3436,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3271,7 +3454,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -3282,7 +3465,7 @@ def list_multi_role_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -3293,6 +3476,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3305,6 +3490,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3316,6 +3502,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3333,7 +3520,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,7 +3538,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -3358,7 +3549,7 @@ def list_multi_role_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -3369,6 +3560,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3381,6 +3574,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3392,6 +3586,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3409,7 +3604,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3423,7 +3622,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3434,7 +3633,7 @@ def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -3451,17 +3650,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3476,7 +3682,7 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -3488,8 +3694,7 @@ def get_outbound_network_dependencies_endpoints( ) -> Iterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -3502,6 +3707,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3514,6 +3721,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -3525,6 +3733,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3542,7 +3751,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3556,7 +3769,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def get_private_endpoint_connection_list( @@ -3567,7 +3780,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoints associated with a hosting environment. - Description for Gets the list of private endpoints associated with a hosting environment. + 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 @@ -3580,6 +3793,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3592,6 +3807,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -3603,6 +3819,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3620,7 +3837,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3634,7 +3855,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -3646,7 +3867,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3665,18 +3886,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3691,7 +3919,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -3708,6 +3936,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -3717,6 +3946,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -3724,7 +3954,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3742,7 +3976,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -3756,7 +3990,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -3781,8 +4015,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3795,6 +4030,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3819,10 +4055,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -3837,18 +4072,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3869,7 +4111,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -3882,7 +4124,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3902,7 +4144,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -3914,6 +4157,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3937,10 +4181,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -3951,7 +4194,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3968,17 +4211,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3993,11 +4243,11 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4005,7 +4255,7 @@ def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -4022,17 +4272,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -4043,7 +4300,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -4058,17 +4315,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4086,7 +4350,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -4098,7 +4362,7 @@ def begin_resume( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -4119,6 +4383,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4131,6 +4397,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -4142,6 +4409,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4159,7 +4427,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4170,7 +4442,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4181,6 +4453,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4190,8 +4463,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4207,10 +4479,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -4222,7 +4493,7 @@ def list_app_service_plans( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -4235,6 +4506,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4247,6 +4520,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -4258,6 +4532,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4275,7 +4550,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4289,7 +4568,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -4301,19 +4580,22 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4326,6 +4608,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -4338,6 +4621,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -4356,7 +4640,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4370,7 +4658,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -4384,17 +4672,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4412,7 +4707,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4424,7 +4719,7 @@ def begin_suspend( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -4445,6 +4740,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4457,6 +4754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -4468,6 +4766,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4485,7 +4784,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4496,7 +4799,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4507,6 +4810,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4516,8 +4820,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4533,10 +4836,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4549,7 +4851,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -4558,7 +4860,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -4567,6 +4869,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4579,6 +4883,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -4591,6 +4896,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -4609,7 +4915,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4623,7 +4933,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -4634,7 +4944,7 @@ def list_worker_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -4646,6 +4956,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4658,6 +4970,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -4669,6 +4982,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4686,7 +5000,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4700,7 +5018,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -4712,7 +5030,7 @@ def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -4731,18 +5049,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4757,7 +5082,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -4774,6 +5099,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4783,6 +5109,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -4790,7 +5117,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4808,7 +5139,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4822,7 +5153,7 @@ def begin_create_or_update_worker_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -4845,8 +5176,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4859,6 +5191,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4883,10 +5216,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4899,7 +5231,7 @@ def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -4920,6 +5252,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4929,6 +5262,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4936,7 +5270,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4955,7 +5293,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4969,8 +5307,7 @@ def list_worker_pool_instance_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -4987,6 +5324,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5001,6 +5340,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -5014,6 +5354,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5031,7 +5372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5045,7 +5390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -5057,7 +5402,7 @@ def list_web_worker_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -5072,6 +5417,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5085,6 +5432,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -5097,6 +5445,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5114,7 +5463,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5128,7 +5481,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -5140,7 +5493,7 @@ def list_worker_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -5153,6 +5506,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5166,6 +5521,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -5178,6 +5534,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5195,7 +5552,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5209,7 +5570,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -5221,7 +5582,7 @@ def list_web_worker_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -5234,6 +5595,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5247,6 +5610,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -5259,6 +5623,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5276,7 +5641,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5290,4 +5659,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py index 9e4dff0252bc..72e2ed07868e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,31 +185,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +303,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -310,21 +316,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -337,10 +343,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -349,21 +356,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -376,10 +383,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -388,21 +396,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -415,10 +423,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -427,21 +436,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -452,31 +461,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -487,31 +497,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -524,33 +535,34 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -565,37 +577,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,31 +619,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -643,33 +657,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -680,31 +695,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -716,10 +732,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -727,21 +744,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -754,10 +771,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -766,21 +784,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -796,12 +814,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -810,23 +828,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -840,10 +858,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -851,21 +870,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -878,10 +897,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -890,21 +910,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -920,12 +940,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -934,23 +954,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -965,10 +985,11 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -977,21 +998,21 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1028,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1021,23 +1042,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1051,10 +1072,11 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1062,25 +1084,25 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1110,7 +1132,7 @@ def list( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -1123,6 +1145,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1133,6 +1157,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1143,6 +1168,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1161,7 +1187,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1175,7 +1205,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1185,7 +1215,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -1196,6 +1226,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1207,6 +1239,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1217,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1234,7 +1268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1248,7 +1286,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1259,7 +1297,7 @@ def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -1276,17 +1314,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1303,7 +1348,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1319,6 +1364,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1327,6 +1373,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1334,7 +1381,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1352,7 +1403,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1365,7 +1416,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -1386,8 +1437,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1399,6 +1451,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1423,13 +1476,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1437,7 +1489,7 @@ def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -1454,17 +1506,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1475,7 +1534,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1488,7 +1547,7 @@ def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -1507,6 +1566,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1515,6 +1575,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1522,7 +1583,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1541,7 +1606,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1553,7 +1618,7 @@ def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -1570,17 +1635,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1595,7 +1667,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1609,7 +1681,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -1630,6 +1702,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1637,12 +1711,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1657,11 +1736,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1671,7 +1750,7 @@ def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -1692,6 +1771,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1699,12 +1780,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1715,7 +1801,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1729,7 +1815,7 @@ def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -1750,6 +1836,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1757,12 +1845,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1777,7 +1870,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1791,7 +1884,7 @@ def list_web_apps_by_hybrid_connection( ) -> Iterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -1806,6 +1899,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1820,6 +1915,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1833,6 +1929,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1850,7 +1947,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1864,7 +1965,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1875,7 +1976,7 @@ def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -1892,17 +1993,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1917,7 +2025,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1929,7 +2037,7 @@ def list_hybrid_connections( ) -> Iterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -1942,6 +2050,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1954,6 +2064,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -1965,6 +2076,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1982,7 +2094,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1996,10 +2112,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2008,7 +2124,7 @@ def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -2029,18 +2145,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2051,7 +2174,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2066,7 +2189,7 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -2074,18 +2197,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2098,6 +2224,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2112,6 +2239,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2132,7 +2260,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2146,7 +2278,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2157,7 +2289,7 @@ def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -2174,17 +2306,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2199,7 +2338,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2212,14 +2351,15 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2228,6 +2368,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2240,6 +2382,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2252,6 +2395,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2270,7 +2414,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2284,7 +2432,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2295,7 +2443,7 @@ def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -2312,17 +2460,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2337,7 +2492,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2350,7 +2505,7 @@ def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -2369,18 +2524,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2397,7 +2559,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2411,7 +2573,7 @@ def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -2432,6 +2594,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2439,12 +2603,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2459,7 +2628,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2474,7 +2643,7 @@ def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -2497,6 +2666,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2507,6 +2677,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2514,7 +2685,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2529,7 +2704,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2542,8 +2717,7 @@ def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -2562,18 +2736,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2588,7 +2769,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2602,7 +2783,7 @@ def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -2623,6 +2804,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2630,12 +2813,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2652,7 +2840,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2667,7 +2855,7 @@ def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2690,6 +2878,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2700,6 +2889,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2707,7 +2897,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2724,11 +2918,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2738,7 +2932,7 @@ def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -2759,6 +2953,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2766,12 +2962,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2782,7 +2983,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2797,7 +2998,7 @@ def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2820,6 +3021,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2830,6 +3032,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -2837,7 +3040,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2854,11 +3061,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2867,7 +3074,7 @@ def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -2886,18 +3093,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2908,5 +3122,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py index c41f932a36b8..b43ccfe40062 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_orders_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_app_service_certificate_order_detector_response_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_app_service_certificate_order_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -84,27 +86,27 @@ def build_get_app_service_certificate_order_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,7 +141,7 @@ def list_app_service_certificate_order_detector_response( ) -> Iterable["_models.DetectorResponseCollection"]: """Microsoft.CertificateRegistration to get the list of detectors for this RP. - Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + 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 @@ -152,6 +154,8 @@ def list_app_service_certificate_order_detector_response( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_certificate_order_detector_response.metadata['url'], ) request = _convert_request(request) @@ -175,6 +180,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -192,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -206,7 +216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + list_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors"} # type: ignore @distributed_trace def get_app_service_certificate_order_detector_response( @@ -221,8 +231,7 @@ def get_app_service_certificate_order_detector_response( ) -> "_models.DetectorResponse": """Microsoft.CertificateRegistration call to get a detector response from App Lens. - Description for Microsoft.CertificateRegistration call to get a detector response from App - Lens. + 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 @@ -230,11 +239,11 @@ def get_app_service_certificate_order_detector_response( :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. + :param start_time: The start time for detector response. Default value is None. :type start_time: ~datetime.datetime - :param end_time: The end time for the detector response. + :param end_time: The end time for the detector response. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: The time grain for the detector response. + :param time_grain: The time grain for the detector response. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -247,12 +256,15 @@ def get_app_service_certificate_order_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_app_service_certificate_order_detector_response_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -261,7 +273,11 @@ def get_app_service_certificate_order_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -276,5 +292,5 @@ def get_app_service_certificate_order_detector_response( return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore + get_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_registration_provider_operations.py index d42e7b48d490..61787ec420ff 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificates_operations.py index a05169e76c55..08a5c01ba063 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,30 +68,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -101,31 +103,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,35 +142,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,31 +183,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -218,35 +222,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -282,10 +286,10 @@ def list( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :param filter: Return only information specified in the filter (using OData syntax). For - example: $filter=KeyVaultId eq 'KeyVaultId'. + example: $filter=KeyVaultId eq 'KeyVaultId'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -293,6 +297,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -303,6 +309,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list.metadata['url'], ) @@ -313,6 +320,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -331,7 +339,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -345,7 +357,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -355,7 +367,7 @@ def list_by_resource_group( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -365,6 +377,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -376,6 +390,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -386,6 +401,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -403,7 +419,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +437,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -428,7 +448,7 @@ def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -445,17 +465,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -470,7 +497,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -483,7 +510,7 @@ def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -502,6 +529,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -510,6 +538,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -517,7 +546,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -532,11 +565,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -544,7 +577,7 @@ def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -561,17 +594,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -582,7 +622,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -595,7 +635,7 @@ def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -614,6 +654,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -622,6 +663,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -629,7 +671,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -644,5 +690,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_deleted_web_apps_operations.py index 5fc430cbd273..4a97a5c9e815 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_get_deleted_web_app_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -153,7 +156,7 @@ def list( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -162,6 +165,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -172,6 +177,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -181,6 +187,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -198,7 +205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -222,7 +233,7 @@ def list_by_location( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -233,6 +244,8 @@ def list_by_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -244,6 +257,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -254,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -271,7 +286,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -285,7 +304,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace def get_deleted_web_app_by_location( @@ -296,7 +315,7 @@ def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -313,17 +332,24 @@ def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,5 +364,5 @@ def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_diagnostics_operations.py index 154649c6501e..c58265d3c40e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -967,7 +989,7 @@ def list_hosting_environment_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1049,7 +1079,7 @@ def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -1057,11 +1087,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1074,12 +1104,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1088,7 +1121,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1103,7 +1140,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1115,7 +1152,7 @@ def list_site_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1128,6 +1165,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1140,6 +1179,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1151,6 +1191,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1168,7 +1209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1182,7 +1227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1197,7 +1242,7 @@ def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1205,11 +1250,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1222,12 +1267,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1236,7 +1284,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1303,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1263,7 +1315,7 @@ def list_site_diagnostic_categories( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1276,6 +1328,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1288,6 +1342,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1299,6 +1354,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1316,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1330,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1342,7 +1402,7 @@ def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1361,18 +1421,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1454,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1400,7 +1467,7 @@ def list_site_analyses( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1415,6 +1482,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1428,6 +1497,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1440,6 +1510,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1457,7 +1528,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,7 +1546,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1484,7 +1559,7 @@ def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1505,6 +1580,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1512,12 +1589,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1614,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1549,7 +1631,7 @@ def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1559,11 +1641,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1576,6 +1658,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1583,6 +1667,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1591,7 +1676,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1695,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1619,7 +1708,7 @@ def list_site_detectors( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1634,6 +1723,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1647,6 +1738,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1751,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1769,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1787,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1703,7 +1800,7 @@ def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1724,6 +1821,8 @@ def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -1731,12 +1830,17 @@ def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1751,7 +1855,7 @@ def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1768,7 +1872,7 @@ def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1778,11 +1882,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1795,6 +1899,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1802,6 +1908,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1810,7 +1917,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1825,7 +1936,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1838,7 +1949,7 @@ def list_site_detector_responses_slot( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1853,6 +1964,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1866,6 +1979,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1878,6 +1992,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1895,7 +2010,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1909,7 +2028,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1925,7 +2044,7 @@ def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1935,11 +2054,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1952,6 +2071,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1959,6 +2080,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1967,7 +2089,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1982,7 +2108,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1995,7 +2121,7 @@ def list_site_diagnostic_categories_slot( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -2010,6 +2136,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2023,6 +2151,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2164,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2182,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2200,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2079,7 +2213,7 @@ def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -2100,6 +2234,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2107,12 +2243,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2127,7 +2268,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2141,7 +2282,7 @@ def list_site_analyses_slot( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -2158,6 +2299,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2172,6 +2315,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2185,6 +2329,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2202,7 +2347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2216,7 +2365,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2230,7 +2379,7 @@ def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -2253,6 +2402,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2261,12 +2412,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2281,7 +2437,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2299,7 +2455,7 @@ def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2311,11 +2467,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2328,6 +2484,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2336,6 +2494,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2344,7 +2503,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2359,7 +2522,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2373,7 +2536,7 @@ def list_site_detectors_slot( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2390,6 +2553,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2404,6 +2569,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2417,6 +2583,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2434,7 +2601,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2448,7 +2619,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2462,7 +2633,7 @@ def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2485,6 +2656,8 @@ def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2493,12 +2666,17 @@ def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2513,7 +2691,7 @@ def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2531,7 +2709,7 @@ def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2543,11 +2721,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2560,6 +2738,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2568,6 +2748,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2576,7 +2757,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2591,5 +2776,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domain_registration_provider_operations.py index 12c670a9b03f..32faf5c86976 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domains_operations.py index a54416056821..77e50802e31a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,33 +295,34 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,35 +336,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -372,31 +377,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -408,10 +414,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -419,21 +426,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -448,12 +455,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -461,23 +468,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -491,10 +498,11 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -502,21 +510,21 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -531,12 +539,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -544,23 +552,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -573,31 +581,32 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,7 +640,7 @@ def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier @@ -646,12 +655,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -659,7 +670,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +689,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -684,13 +699,15 @@ def list( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -701,6 +718,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -710,6 +728,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -727,7 +746,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -741,7 +764,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -750,7 +773,7 @@ def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -763,15 +786,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -786,7 +816,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -797,7 +827,7 @@ def list_recommendations( ) -> Iterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2020_12_01.models.DomainRecommendationSearchParameters @@ -808,6 +838,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -821,6 +852,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -833,6 +865,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -852,7 +885,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -866,7 +903,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -876,7 +913,7 @@ def list_by_resource_group( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -885,6 +922,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -896,6 +935,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -906,6 +946,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -923,7 +964,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,7 +982,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -948,7 +993,7 @@ def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -965,17 +1010,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -990,7 +1042,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -1006,6 +1058,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -1014,6 +1067,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1021,7 +1075,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1039,7 +1097,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1052,7 +1110,7 @@ def begin_create_or_update( ) -> LROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -1072,8 +1130,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1085,6 +1144,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1109,13 +1169,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1124,7 +1183,7 @@ def delete( ) -> None: """Delete a domain. - Description for 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 @@ -1144,18 +1203,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1166,7 +1232,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1179,7 +1245,7 @@ def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -1198,6 +1264,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1206,6 +1273,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1213,7 +1281,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1304,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1244,7 +1316,7 @@ def list_ownership_identifiers( ) -> Iterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -1257,6 +1329,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1269,6 +1343,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1280,6 +1355,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1297,7 +1373,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1311,7 +1391,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1323,7 +1403,7 @@ def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -1342,18 +1422,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,7 +1455,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1383,8 +1470,8 @@ def create_or_update_ownership_identifier( """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. + 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 @@ -1405,6 +1492,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1414,6 +1502,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1421,7 +1510,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1436,11 +1529,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1449,7 +1542,7 @@ def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -1468,18 +1561,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1490,7 +1590,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1505,8 +1605,8 @@ def update_ownership_identifier( """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. + 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 @@ -1527,6 +1627,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1536,6 +1637,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1543,7 +1645,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1558,11 +1664,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1570,7 +1676,7 @@ def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1587,17 +1693,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1608,5 +1721,5 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_global_operations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_global_operations_operations.py index cfb9e387f4aa..09d3ef876a21 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_global_operations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_global_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, List, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse @@ -15,7 +16,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,30 +30,31 @@ def build_get_deleted_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}") path_format_arguments = { "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_deleted_web_app_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_subscription_operation_with_async_response_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,7 +158,7 @@ def get_deleted_web_app( ) -> "_models.DeletedSite": """Get deleted app for a subscription. - Description for Get deleted app for a subscription. + 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 @@ -170,16 +173,23 @@ def get_deleted_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deleted_web_app_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +204,7 @@ def get_deleted_web_app( return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}"} # type: ignore @distributed_trace @@ -205,7 +215,7 @@ def get_deleted_web_app_snapshots( ) -> List["_models.Snapshot"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + 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 @@ -220,16 +230,23 @@ def get_deleted_web_app_snapshots( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deleted_web_app_snapshots_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_snapshots.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,11 +261,11 @@ def get_deleted_web_app_snapshots( return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + get_deleted_web_app_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots"} # type: ignore @distributed_trace - def get_subscription_operation_with_async_response( + def get_subscription_operation_with_async_response( # pylint: disable=inconsistent-return-statements self, location: str, operation_id: str, @@ -256,7 +273,7 @@ def get_subscription_operation_with_async_response( ) -> None: """Gets an operation in a subscription and given region. - Description for Gets an operation in a subscription and given region. + Gets an operation in a subscription and given region. :param location: Location name. :type location: str @@ -273,17 +290,24 @@ def get_subscription_operation_with_async_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_subscription_operation_with_async_response_request( location=location, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_operation_with_async_response.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -294,5 +318,5 @@ def get_subscription_operation_with_async_response( if cls: return cls(pipeline_response, None, {}) - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore + get_subscription_operation_with_async_response.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_provider_operations.py index 5bd343877b87..dbbe7deeb4f4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum4"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -60,26 +61,27 @@ def build_get_function_app_stacks_request( stack_os_type: Optional[Union[str, "_models.Enum5"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/functionAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/functionAppStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -90,31 +92,32 @@ def build_get_function_app_stacks_for_location_request( stack_os_type: Optional[Union[str, "_models.Enum6"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/locations/{location}/functionAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/locations/{location}/functionAppStacks") path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -125,31 +128,32 @@ def build_get_web_app_stacks_for_location_request( stack_os_type: Optional[Union[str, "_models.Enum7"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/locations/{location}/webAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/locations/{location}/webAppStacks") path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -157,24 +161,25 @@ def build_get_web_app_stacks_for_location_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -184,26 +189,27 @@ def build_get_web_app_stacks_request( stack_os_type: Optional[Union[str, "_models.Enum8"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/webAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/webAppStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -214,31 +220,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum9"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -272,9 +279,9 @@ def get_available_stacks( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_12_01.models.Enum4 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -283,6 +290,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -292,6 +301,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -301,6 +311,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -319,7 +330,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -333,7 +348,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def get_function_app_stacks( @@ -343,9 +358,9 @@ def get_function_app_stacks( ) -> Iterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions. - Description for Get available Function app frameworks and their versions. + Get available Function app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum5 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -354,6 +369,8 @@ def get_function_app_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -363,6 +380,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks.metadata['url'], ) @@ -372,6 +390,7 @@ def prepare_request(next_link=None): else: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -390,7 +409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -404,7 +427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + get_function_app_stacks.metadata = {'url': "/providers/Microsoft.Web/functionAppStacks"} # type: ignore @distributed_trace def get_function_app_stacks_for_location( @@ -415,11 +438,11 @@ def get_function_app_stacks_for_location( ) -> Iterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions for location. - Description for Get available Function app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum6 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -428,6 +451,8 @@ def get_function_app_stacks_for_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -438,6 +463,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks_for_location.metadata['url'], ) @@ -448,6 +474,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -466,7 +493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -480,7 +511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + get_function_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/functionAppStacks"} # type: ignore @distributed_trace def get_web_app_stacks_for_location( @@ -491,11 +522,11 @@ def get_web_app_stacks_for_location( ) -> Iterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions for location. - Description for Get available Web app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum7 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -503,6 +534,8 @@ def get_web_app_stacks_for_location( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -513,6 +546,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks_for_location.metadata['url'], ) @@ -523,6 +557,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -541,7 +576,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -555,7 +594,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + get_web_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/webAppStacks"} # type: ignore @distributed_trace def list_operations( @@ -565,8 +604,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -574,6 +613,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -583,6 +624,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -591,6 +633,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -608,7 +651,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -622,7 +669,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_web_app_stacks( @@ -632,9 +679,9 @@ def get_web_app_stacks( ) -> Iterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions. - Description for Get available Web app frameworks and their versions. + Get available Web app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2020_12_01.models.Enum8 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -642,6 +689,8 @@ def get_web_app_stacks( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -651,6 +700,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks.metadata['url'], ) @@ -660,6 +710,7 @@ def prepare_request(next_link=None): else: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -678,7 +729,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -692,7 +747,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + get_web_app_stacks.metadata = {'url': "/providers/Microsoft.Web/webAppStacks"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -702,9 +757,9 @@ def get_available_stacks_on_prem( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2020_12_01.models.Enum9 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -713,6 +768,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -723,6 +780,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -733,6 +791,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -751,7 +810,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -765,4 +828,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_recommendations_operations.py index 1117fbbd8c44..4d6bf4756d3a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,29 +69,30 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -100,30 +102,31 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,36 @@ def build_list_history_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +183,36 @@ def build_list_recommended_rules_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,32 +225,33 @@ def build_disable_all_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,32 +264,33 @@ def build_reset_all_filters_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +305,11 @@ def build_get_rule_details_by_hosting_environment_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), @@ -309,25 +317,25 @@ def build_get_rule_details_by_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -341,10 +349,11 @@ def build_disable_recommendation_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -352,22 +361,22 @@ def build_disable_recommendation_for_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -381,35 +390,36 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -423,35 +433,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -462,31 +473,32 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -497,31 +509,32 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,10 +549,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -547,25 +561,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -577,10 +591,11 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -588,21 +603,21 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -637,14 +652,14 @@ def list( ) -> Iterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -653,6 +668,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -663,6 +680,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -674,6 +692,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -693,7 +712,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -707,16 +730,16 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -729,15 +752,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -748,19 +778,18 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -775,16 +804,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -795,7 +831,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -809,7 +845,7 @@ def list_history_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -820,7 +856,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -829,6 +865,8 @@ def list_history_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -841,6 +879,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -854,6 +893,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -873,7 +913,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -887,7 +931,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -900,7 +944,7 @@ def list_recommended_rules_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -910,7 +954,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -919,6 +963,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -931,6 +977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -944,6 +991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -963,7 +1011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,10 +1029,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_hosting_environment( + def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -989,7 +1041,7 @@ def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1008,18 +1060,25 @@ def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1030,11 +1089,11 @@ def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_hosting_environment( + def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1043,7 +1102,7 @@ def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1062,18 +1121,25 @@ def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1084,7 +1150,7 @@ def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1099,7 +1165,7 @@ def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1108,10 +1174,10 @@ def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1124,12 +1190,15 @@ def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -1137,7 +1206,11 @@ def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1152,11 +1225,11 @@ def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_hosting_environment( + def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1166,7 +1239,7 @@ def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1187,19 +1260,26 @@ def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,7 +1290,7 @@ def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -1224,7 +1304,7 @@ def list_history_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -1235,7 +1315,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1244,6 +1324,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1256,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -1269,6 +1352,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -1288,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1302,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -1315,7 +1403,7 @@ def list_recommended_rules_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -1325,7 +1413,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1334,6 +1422,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1346,6 +1436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -1359,6 +1450,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -1378,7 +1470,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,10 +1488,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1403,7 +1499,7 @@ def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1420,17 +1516,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1441,11 +1544,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1453,7 +1556,7 @@ def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1470,17 +1573,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1491,7 +1601,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1506,7 +1616,7 @@ def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1515,10 +1625,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1531,12 +1641,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -1544,7 +1657,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1559,11 +1676,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1572,7 +1689,7 @@ def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1591,18 +1708,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,5 +1737,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_resource_health_metadata_operations.py index 7282e2337563..b3b3ce8f8a30 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -262,7 +268,7 @@ def list( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -331,8 +345,7 @@ def list_by_resource_group( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -343,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -354,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -364,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -381,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -406,8 +427,7 @@ def list_by_site( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -420,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -432,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -443,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -460,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -474,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -485,7 +513,7 @@ def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -502,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -527,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -540,8 +575,7 @@ def list_by_site_slot( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -556,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -581,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -598,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -624,7 +666,7 @@ def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -643,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_static_sites_operations.py index 2e387c880404..6d391f72009f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -37,34 +37,34 @@ def build_preview_workflow_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -75,29 +75,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -107,30 +108,31 @@ def build_get_static_sites_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,31 +143,32 @@ def build_get_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +182,35 @@ def build_create_or_update_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -220,31 +223,32 @@ def build_delete_static_site_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,35 +262,35 @@ def build_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -300,10 +304,11 @@ def build_list_static_site_users_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -311,21 +316,21 @@ def build_list_static_site_users_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -338,10 +343,11 @@ def build_delete_static_site_user_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -350,21 +356,21 @@ def build_delete_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -380,12 +386,12 @@ def build_update_static_site_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -394,23 +400,23 @@ def build_update_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -423,31 +429,32 @@ def build_get_static_site_builds_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -459,10 +466,11 @@ def build_get_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -470,21 +478,21 @@ def build_get_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -496,10 +504,11 @@ def build_delete_static_site_build_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -507,21 +516,21 @@ def build_delete_static_site_build_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,12 +545,12 @@ def build_create_or_update_static_site_build_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -549,23 +558,23 @@ def build_create_or_update_static_site_build_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -582,12 +591,12 @@ def build_create_or_update_static_site_build_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -595,23 +604,23 @@ def build_create_or_update_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -625,10 +634,11 @@ def build_list_static_site_build_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -636,21 +646,21 @@ def build_list_static_site_build_functions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -662,10 +672,11 @@ def build_list_static_site_build_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -673,21 +684,21 @@ def build_list_static_site_build_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -699,10 +710,11 @@ def build_list_static_site_build_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -710,21 +722,21 @@ def build_list_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -736,10 +748,11 @@ def build_get_user_provided_function_apps_for_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -747,21 +760,21 @@ def build_get_user_provided_function_apps_for_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -774,10 +787,11 @@ def build_get_user_provided_function_app_for_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -786,21 +800,21 @@ def build_get_user_provided_function_app_for_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -817,12 +831,12 @@ def build_register_user_provided_function_app_with_static_site_build_request_ini is_forced: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -831,25 +845,25 @@ def build_register_user_provided_function_app_with_static_site_build_request_ini "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if is_forced is not None: - query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -864,10 +878,11 @@ def build_detach_user_provided_function_app_from_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -876,21 +891,21 @@ def build_detach_user_provided_function_app_from_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -905,12 +920,12 @@ def build_create_zip_deployment_for_static_site_build_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -918,23 +933,23 @@ def build_create_zip_deployment_for_static_site_build_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -950,35 +965,35 @@ def build_create_or_update_static_site_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -994,35 +1009,35 @@ def build_create_or_update_static_site_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1038,35 +1053,35 @@ def build_create_user_roles_invitation_link_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1079,31 +1094,32 @@ def build_list_static_site_custom_domains_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1115,10 +1131,11 @@ def build_get_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1126,21 +1143,21 @@ def build_get_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1155,12 +1172,12 @@ def build_create_or_update_static_site_custom_domain_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1168,23 +1185,23 @@ def build_create_or_update_static_site_custom_domain_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1198,10 +1215,11 @@ def build_delete_static_site_custom_domain_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1209,21 +1227,21 @@ def build_delete_static_site_custom_domain_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1238,12 +1256,12 @@ def build_validate_custom_domain_can_be_added_to_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1251,23 +1269,23 @@ def build_validate_custom_domain_can_be_added_to_static_site_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1280,31 +1298,32 @@ def build_detach_static_site_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1315,31 +1334,32 @@ def build_list_static_site_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1350,31 +1370,32 @@ def build_list_static_site_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1385,31 +1406,32 @@ def build_list_static_site_configured_roles_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1420,31 +1442,32 @@ def build_list_static_site_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1455,31 +1478,32 @@ def build_list_static_site_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1490,31 +1514,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1526,10 +1551,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1537,21 +1563,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1566,12 +1592,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1579,23 +1605,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1609,10 +1635,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1620,21 +1647,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1645,31 +1672,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1683,35 +1711,35 @@ def build_reset_static_site_api_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1724,31 +1752,32 @@ def build_get_user_provided_function_apps_for_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1760,10 +1789,11 @@ def build_get_user_provided_function_app_for_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1771,21 +1801,21 @@ def build_get_user_provided_function_app_for_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1801,12 +1831,12 @@ def build_register_user_provided_function_app_with_static_site_request_initial( is_forced: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1814,25 +1844,25 @@ def build_register_user_provided_function_app_with_static_site_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if is_forced is not None: - query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1846,10 +1876,11 @@ def build_detach_user_provided_function_app_from_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1857,21 +1888,21 @@ def build_detach_user_provided_function_app_from_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1885,41 +1916,41 @@ def build_create_zip_deployment_for_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs ) -class StaticSitesOperations(object): +class StaticSitesOperations(object): # pylint: disable=too-many-public-methods """StaticSitesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1950,7 +1981,7 @@ def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -1969,6 +2000,7 @@ def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -1976,6 +2008,7 @@ def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -1983,7 +2016,11 @@ def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1998,7 +2035,7 @@ def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -2008,7 +2045,7 @@ def list( ) -> Iterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -2016,6 +2053,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2026,6 +2065,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2075,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2093,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2111,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -2076,7 +2121,7 @@ def get_static_sites_by_resource_group( ) -> Iterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -2086,6 +2131,8 @@ def get_static_sites_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2097,6 +2144,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -2107,6 +2155,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2124,7 +2173,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2138,7 +2191,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_site( @@ -2149,7 +2202,7 @@ def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -2166,17 +2219,24 @@ def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2191,7 +2251,7 @@ def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore def _create_or_update_static_site_initial( @@ -2207,6 +2267,7 @@ def _create_or_update_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -2215,6 +2276,7 @@ def _create_or_update_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_initial.metadata['url'], @@ -2222,7 +2284,11 @@ def _create_or_update_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2240,7 +2306,7 @@ def _create_or_update_static_site_initial( return deserialized - _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _create_or_update_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -2253,8 +2319,7 @@ def begin_create_or_update_static_site( ) -> LROPoller["_models.StaticSiteARMResource"]: """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -2275,8 +2340,9 @@ def begin_create_or_update_static_site( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2288,6 +2354,7 @@ def begin_create_or_update_static_site( resource_group_name=resource_group_name, name=name, static_site_envelope=static_site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2312,12 +2379,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore - def _delete_static_site_initial( + def _delete_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2329,17 +2395,24 @@ def _delete_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2349,11 +2422,11 @@ def _delete_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _delete_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace - def begin_delete_static_site( + def begin_delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2361,7 +2434,7 @@ def begin_delete_static_site( ) -> LROPoller[None]: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2379,7 +2452,8 @@ def begin_delete_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2390,6 +2464,7 @@ def begin_delete_static_site( raw_result = self._delete_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2410,10 +2485,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace def update_static_site( @@ -2425,8 +2499,7 @@ def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -2445,6 +2518,7 @@ def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -2453,6 +2527,7 @@ def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -2460,7 +2535,11 @@ def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2479,7 +2558,7 @@ def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -2492,7 +2571,7 @@ def list_static_site_users( ) -> Iterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -2507,6 +2586,8 @@ def list_static_site_users( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2520,6 +2601,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -2532,6 +2614,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2549,7 +2632,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2563,10 +2650,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace - def delete_static_site_user( + def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2576,7 +2663,7 @@ def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -2597,6 +2684,8 @@ def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -2604,12 +2693,17 @@ def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2620,7 +2714,7 @@ def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -2635,7 +2729,7 @@ def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -2659,6 +2753,7 @@ def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -2669,6 +2764,7 @@ def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -2676,7 +2772,11 @@ def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2691,7 +2791,7 @@ def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -2703,7 +2803,7 @@ def get_static_site_builds( ) -> Iterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -2716,6 +2816,8 @@ def get_static_site_builds( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2728,6 +2830,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -2739,6 +2842,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2756,7 +2860,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2770,7 +2878,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace def get_static_site_build( @@ -2782,7 +2890,7 @@ def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -2801,18 +2909,25 @@ def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2827,10 +2942,10 @@ def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore - def _delete_static_site_build_initial( + def _delete_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2843,18 +2958,25 @@ def _delete_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_static_site_build_request_initial( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_build_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2864,11 +2986,11 @@ def _delete_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + _delete_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace - def begin_delete_static_site_build( + def begin_delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2877,7 +2999,7 @@ def begin_delete_static_site_build( ) -> LROPoller[None]: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2897,7 +3019,8 @@ def begin_delete_static_site_build( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2909,6 +3032,7 @@ def begin_delete_static_site_build( resource_group_name=resource_group_name, name=name, environment_name=environment_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2929,10 +3053,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + begin_delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace def create_or_update_static_site_build_app_settings( @@ -2945,7 +3068,7 @@ def create_or_update_static_site_build_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site build. - Description for Creates or updates the app settings of a static site build. + 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 @@ -2966,6 +3089,7 @@ def create_or_update_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -2975,6 +3099,7 @@ def create_or_update_static_site_build_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_app_settings.metadata['url'], @@ -2982,7 +3107,11 @@ def create_or_update_static_site_build_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2997,7 +3126,7 @@ def create_or_update_static_site_build_app_settings( return deserialized - create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + create_or_update_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings"} # type: ignore @distributed_trace @@ -3011,7 +3140,7 @@ def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -3032,6 +3161,7 @@ def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3041,6 +3171,7 @@ def create_or_update_static_site_build_function_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -3048,7 +3179,11 @@ def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3063,7 +3198,7 @@ def create_or_update_static_site_build_function_app_settings( return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings"} # type: ignore @distributed_trace @@ -3076,7 +3211,7 @@ def list_static_site_build_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -3091,6 +3226,8 @@ def list_static_site_build_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3104,6 +3241,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -3116,6 +3254,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3133,7 +3272,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3147,7 +3290,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions"} # type: ignore @distributed_trace def list_static_site_build_app_settings( @@ -3159,7 +3302,7 @@ def list_static_site_build_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -3178,18 +3321,25 @@ def list_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_build_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3204,7 +3354,7 @@ def list_static_site_build_app_settings( return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + list_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings"} # type: ignore @distributed_trace @@ -3217,7 +3367,7 @@ def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -3236,18 +3386,25 @@ def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3262,7 +3419,7 @@ def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -3275,8 +3432,7 @@ def get_user_provided_function_apps_for_static_site_build( ) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site build. - Description for Gets the details of the user provided function apps registered with a static - site build. + 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 @@ -3291,6 +3447,8 @@ def get_user_provided_function_apps_for_static_site_build( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3304,6 +3462,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site_build.metadata['url'], ) request = _convert_request(request) @@ -3316,6 +3475,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3333,7 +3493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,7 +3511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps"} # type: ignore @distributed_trace def get_user_provided_function_app_for_static_site_build( @@ -3360,8 +3524,7 @@ def get_user_provided_function_app_for_static_site_build( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site build. - Description for Gets the details of the user provided function app registered with a static - site build. + 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 @@ -3382,6 +3545,8 @@ def get_user_provided_function_app_for_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_user_provided_function_app_for_static_site_build_request( resource_group_name=resource_group_name, @@ -3389,12 +3554,17 @@ def get_user_provided_function_app_for_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3409,7 +3579,7 @@ def get_user_provided_function_app_for_static_site_build( return deserialized - get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore def _register_user_provided_function_app_with_static_site_build_initial( @@ -3428,6 +3598,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -3438,6 +3609,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -3446,7 +3618,11 @@ def _register_user_provided_function_app_with_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3464,7 +3640,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( return deserialized - _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace @@ -3480,7 +3656,7 @@ def begin_register_user_provided_function_app_with_static_site_build( ) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site build. - Description for Register a user provided function app with a static site build. + 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 @@ -3512,8 +3688,9 @@ def begin_register_user_provided_function_app_with_static_site_build( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3528,6 +3705,7 @@ def begin_register_user_provided_function_app_with_static_site_build( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3552,13 +3730,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace - def detach_user_provided_function_app_from_static_site_build( + def detach_user_provided_function_app_from_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3568,7 +3745,7 @@ def detach_user_provided_function_app_from_static_site_build( ) -> None: """Detach the user provided function app from the static site build. - Description for Detach the user provided function app from the static site build. + 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 @@ -3589,6 +3766,8 @@ def detach_user_provided_function_app_from_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_build_request( resource_group_name=resource_group_name, @@ -3596,12 +3775,17 @@ def detach_user_provided_function_app_from_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3612,10 +3796,10 @@ def detach_user_provided_function_app_from_static_site_build( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - def _create_zip_deployment_for_static_site_build_initial( + def _create_zip_deployment_for_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3629,6 +3813,7 @@ def _create_zip_deployment_for_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -3638,6 +3823,7 @@ def _create_zip_deployment_for_static_site_build_initial( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_build_initial.metadata['url'], @@ -3645,7 +3831,11 @@ def _create_zip_deployment_for_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3655,11 +3845,11 @@ def _create_zip_deployment_for_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace - def begin_create_zip_deployment_for_static_site_build( + def begin_create_zip_deployment_for_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3669,7 +3859,7 @@ def begin_create_zip_deployment_for_static_site_build( ) -> LROPoller[None]: """Deploys zipped content to a specific environment of a static site. - Description for Deploys zipped content to a specific environment of a static site. + 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 @@ -3693,8 +3883,9 @@ def begin_create_zip_deployment_for_static_site_build( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -3707,6 +3898,7 @@ def begin_create_zip_deployment_for_static_site_build( name=name, environment_name=environment_name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3728,10 +3920,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace def create_or_update_static_site_app_settings( @@ -3743,7 +3934,7 @@ def create_or_update_static_site_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site. - Description for Creates or updates the app settings of a static site. + 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 @@ -3762,6 +3953,7 @@ def create_or_update_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3770,6 +3962,7 @@ def create_or_update_static_site_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_app_settings.metadata['url'], @@ -3777,7 +3970,11 @@ def create_or_update_static_site_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3792,7 +3989,7 @@ def create_or_update_static_site_app_settings( return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + create_or_update_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -3805,7 +4002,7 @@ def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -3824,6 +4021,7 @@ def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3832,6 +4030,7 @@ def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -3839,7 +4038,11 @@ def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3854,7 +4057,7 @@ def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace @@ -3867,7 +4070,7 @@ def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -3887,6 +4090,7 @@ def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -3895,6 +4099,7 @@ def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -3902,7 +4107,11 @@ def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3917,7 +4126,7 @@ def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -3929,7 +4138,7 @@ def list_static_site_custom_domains( ) -> Iterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -3942,6 +4151,8 @@ def list_static_site_custom_domains( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3954,6 +4165,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -3965,6 +4177,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3982,7 +4195,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3996,7 +4213,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace def get_static_site_custom_domain( @@ -4008,7 +4225,7 @@ def get_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Gets an existing custom domain for a particular static site. - Description for Gets an existing custom domain for a particular static site. + 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 @@ -4027,18 +4244,25 @@ def get_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4053,7 +4277,7 @@ def get_static_site_custom_domain( return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + get_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore def _create_or_update_static_site_custom_domain_initial( @@ -4070,6 +4294,7 @@ def _create_or_update_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -4079,6 +4304,7 @@ def _create_or_update_static_site_custom_domain_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_custom_domain_initial.metadata['url'], @@ -4086,7 +4312,11 @@ def _create_or_update_static_site_custom_domain_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4104,7 +4334,7 @@ def _create_or_update_static_site_custom_domain_initial( return deserialized - _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _create_or_update_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace @@ -4118,8 +4348,7 @@ def begin_create_or_update_static_site_custom_domain( ) -> LROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -4145,8 +4374,9 @@ def begin_create_or_update_static_site_custom_domain( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteCustomDomainOverviewARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4159,6 +4389,7 @@ def begin_create_or_update_static_site_custom_domain( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4183,12 +4414,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - def _delete_static_site_custom_domain_initial( + def _delete_static_site_custom_domain_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4201,18 +4431,25 @@ def _delete_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_static_site_custom_domain_request_initial( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_custom_domain_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4222,11 +4459,11 @@ def _delete_static_site_custom_domain_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _delete_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def begin_delete_static_site_custom_domain( + def begin_delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4235,7 +4472,7 @@ def begin_delete_static_site_custom_domain( ) -> LROPoller[None]: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4255,7 +4492,8 @@ def begin_delete_static_site_custom_domain( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4267,6 +4505,7 @@ def begin_delete_static_site_custom_domain( resource_group_name=resource_group_name, name=name, domain_name=domain_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4287,12 +4526,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - def _validate_custom_domain_can_be_added_to_static_site_initial( + def _validate_custom_domain_can_be_added_to_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4306,6 +4544,7 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -4315,6 +4554,7 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'], @@ -4322,7 +4562,11 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4332,11 +4576,11 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace - def begin_validate_custom_domain_can_be_added_to_static_site( + def begin_validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4346,7 +4590,7 @@ def begin_validate_custom_domain_can_be_added_to_static_site( ) -> LROPoller[None]: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -4370,8 +4614,9 @@ def begin_validate_custom_domain_can_be_added_to_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4384,6 +4629,7 @@ def begin_validate_custom_domain_can_be_added_to_static_site( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4405,12 +4651,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore - def _detach_static_site_initial( + def _detach_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4422,17 +4667,24 @@ def _detach_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_detach_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._detach_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4442,11 +4694,11 @@ def _detach_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + _detach_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace - def begin_detach_static_site( + def begin_detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4454,7 +4706,7 @@ def begin_detach_static_site( ) -> LROPoller[None]: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4472,7 +4724,8 @@ def begin_detach_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4483,6 +4736,7 @@ def begin_detach_static_site( raw_result = self._detach_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4503,10 +4757,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + begin_detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace def list_static_site_functions( @@ -4517,7 +4770,7 @@ def list_static_site_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -4530,6 +4783,8 @@ def list_static_site_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4542,6 +4797,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -4553,6 +4809,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4570,7 +4827,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4584,7 +4845,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace def list_static_site_app_settings( @@ -4595,7 +4856,7 @@ def list_static_site_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -4612,17 +4873,24 @@ def list_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4637,7 +4905,7 @@ def list_static_site_app_settings( return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + list_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings"} # type: ignore @distributed_trace @@ -4649,7 +4917,7 @@ def list_static_site_configured_roles( ) -> "_models.StringList": """Lists the roles configured for the static site. - Description for Lists the roles configured for the static site. + 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 @@ -4666,17 +4934,24 @@ def list_static_site_configured_roles( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_configured_roles_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_configured_roles.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4691,7 +4966,7 @@ def list_static_site_configured_roles( return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + list_static_site_configured_roles.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles"} # type: ignore @distributed_trace @@ -4703,7 +4978,7 @@ def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -4720,17 +4995,24 @@ def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4745,7 +5027,7 @@ def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -4757,7 +5039,7 @@ def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -4774,17 +5056,24 @@ def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4799,7 +5088,7 @@ def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace @@ -4811,7 +5100,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a static site. - Description for Gets the list of private endpoint connections associated with a static site. + 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 @@ -4824,6 +5113,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4836,6 +5127,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -4847,6 +5139,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4864,7 +5157,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4878,7 +5175,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -4890,7 +5187,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4909,18 +5206,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4935,7 +5239,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -4952,6 +5256,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -4961,6 +5266,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -4968,7 +5274,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4986,7 +5296,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -5000,7 +5310,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -5025,8 +5335,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -5039,6 +5350,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5063,10 +5375,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -5081,18 +5392,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -5113,7 +5431,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -5126,7 +5444,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -5146,7 +5464,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -5158,6 +5477,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -5181,10 +5501,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -5195,7 +5514,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -5212,17 +5531,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5237,11 +5563,11 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources"} # type: ignore @distributed_trace - def reset_static_site_api_key( + def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5250,7 +5576,7 @@ def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -5270,6 +5596,7 @@ def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -5278,6 +5605,7 @@ def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -5285,7 +5613,11 @@ def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5296,7 +5628,7 @@ def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore @distributed_trace @@ -5308,8 +5640,7 @@ def get_user_provided_function_apps_for_static_site( ) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site. - Description for Gets the details of the user provided function apps registered with a static - site. + 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 @@ -5322,6 +5653,8 @@ def get_user_provided_function_apps_for_static_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5334,6 +5667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site.metadata['url'], ) request = _convert_request(request) @@ -5345,6 +5679,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5362,7 +5697,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5376,7 +5715,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps"} # type: ignore @distributed_trace def get_user_provided_function_app_for_static_site( @@ -5388,8 +5727,7 @@ def get_user_provided_function_app_for_static_site( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site. - Description for Gets the details of the user provided function app registered with a static - site. + 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 @@ -5408,18 +5746,25 @@ def get_user_provided_function_app_for_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_user_provided_function_app_for_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5434,7 +5779,7 @@ def get_user_provided_function_app_for_static_site( return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore def _register_user_provided_function_app_with_static_site_initial( @@ -5452,6 +5797,7 @@ def _register_user_provided_function_app_with_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -5461,6 +5807,7 @@ def _register_user_provided_function_app_with_static_site_initial( name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -5469,7 +5816,11 @@ def _register_user_provided_function_app_with_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5487,7 +5838,7 @@ def _register_user_provided_function_app_with_static_site_initial( return deserialized - _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace @@ -5502,7 +5853,7 @@ def begin_register_user_provided_function_app_with_static_site( ) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site. - Description for Register a user provided function app with a static site. + 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 @@ -5532,8 +5883,9 @@ def begin_register_user_provided_function_app_with_static_site( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -5547,6 +5899,7 @@ def begin_register_user_provided_function_app_with_static_site( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5571,13 +5924,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace - def detach_user_provided_function_app_from_static_site( + def detach_user_provided_function_app_from_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5586,7 +5938,7 @@ def detach_user_provided_function_app_from_static_site( ) -> None: """Detach the user provided function app from the static site. - Description for Detach the user provided function app from the static site. + 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 @@ -5605,18 +5957,25 @@ def detach_user_provided_function_app_from_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5627,10 +5986,10 @@ def detach_user_provided_function_app_from_static_site( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - def _create_zip_deployment_for_static_site_initial( + def _create_zip_deployment_for_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5643,6 +6002,7 @@ def _create_zip_deployment_for_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -5651,6 +6011,7 @@ def _create_zip_deployment_for_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_initial.metadata['url'], @@ -5658,7 +6019,11 @@ def _create_zip_deployment_for_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5668,11 +6033,11 @@ def _create_zip_deployment_for_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore @distributed_trace - def begin_create_zip_deployment_for_static_site( + def begin_create_zip_deployment_for_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5681,7 +6046,7 @@ def begin_create_zip_deployment_for_static_site( ) -> LROPoller[None]: """Deploys zipped content to a static site. - Description for Deploys zipped content to a static site. + 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 @@ -5703,8 +6068,9 @@ def begin_create_zip_deployment_for_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -5716,6 +6082,7 @@ def begin_create_zip_deployment_for_static_site( resource_group_name=resource_group_name, name=name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5737,7 +6104,6 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_top_level_domains_operations.py index 301723702cc2..846d91c3652c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -161,7 +163,7 @@ def list( ) -> Iterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -220,7 +230,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -230,7 +240,7 @@ def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -245,16 +255,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,7 +286,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -281,7 +298,7 @@ def list_agreements( ) -> Iterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -294,6 +311,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -308,6 +326,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -321,6 +340,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -340,7 +360,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,4 +378,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_apps_operations.py index 8251d4ce86d9..cd351a8b3c59 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,35 +188,36 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,35 +231,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -270,33 +274,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -310,35 +315,35 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -354,35 +359,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -395,31 +400,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -431,10 +437,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -442,21 +449,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -468,10 +475,11 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -479,21 +487,21 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -508,12 +516,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -521,23 +529,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -554,12 +562,12 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -567,23 +575,23 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -596,31 +604,32 @@ def build_get_basic_publishing_credentials_policies_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,31 +640,32 @@ def build_get_ftp_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -669,35 +679,35 @@ def build_update_ftp_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -710,31 +720,32 @@ def build_get_scm_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -748,35 +759,35 @@ def build_update_scm_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -789,31 +800,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -827,35 +839,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -868,31 +880,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -906,35 +919,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -947,31 +960,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -985,35 +999,35 @@ def build_update_auth_settings_v2_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1026,31 +1040,32 @@ def build_get_auth_settings_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1064,35 +1079,35 @@ def build_update_azure_storage_accounts_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1105,31 +1120,32 @@ def build_list_azure_storage_accounts_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1143,35 +1159,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1184,31 +1200,32 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1219,31 +1236,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1254,31 +1272,32 @@ def build_get_app_settings_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1290,10 +1309,11 @@ def build_get_app_setting_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1301,21 +1321,21 @@ def build_get_app_setting_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1326,31 +1346,32 @@ def build_get_site_connection_string_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1362,10 +1383,11 @@ def build_get_site_connection_string_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1373,21 +1395,21 @@ def build_get_site_connection_string_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1401,35 +1423,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1442,31 +1464,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1477,31 +1500,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1515,35 +1539,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1559,35 +1583,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1600,31 +1624,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1635,31 +1660,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1673,35 +1699,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1714,31 +1740,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1749,31 +1776,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1787,35 +1815,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1828,31 +1856,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1866,35 +1895,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1910,35 +1939,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1951,31 +1980,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1987,10 +2017,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1998,21 +2029,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2024,10 +2055,11 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2035,21 +2067,21 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2060,31 +2092,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2095,31 +2128,32 @@ def build_get_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2130,31 +2164,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2166,10 +2201,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2177,21 +2213,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2203,10 +2239,11 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2214,21 +2251,21 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2240,10 +2277,11 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2251,21 +2289,21 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2277,10 +2315,11 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2288,21 +2327,21 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2313,31 +2352,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2349,10 +2389,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2360,21 +2401,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2389,12 +2430,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2402,23 +2443,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2432,10 +2473,11 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2443,21 +2485,21 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2469,10 +2511,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2480,21 +2523,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2508,35 +2551,35 @@ def build_discover_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2549,31 +2592,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2585,10 +2629,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2596,21 +2641,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2625,12 +2670,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2638,23 +2683,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2668,10 +2713,11 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2679,21 +2725,21 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2708,12 +2754,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2721,23 +2767,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2750,31 +2796,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2788,35 +2835,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2829,31 +2876,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2864,31 +2912,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2899,31 +2948,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2935,10 +2985,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2946,21 +2997,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2975,12 +3026,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2988,23 +3039,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3018,10 +3069,11 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3029,21 +3081,21 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3059,12 +3111,12 @@ def build_create_or_update_function_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3073,23 +3125,23 @@ def build_create_or_update_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3104,10 +3156,11 @@ def build_delete_function_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3116,21 +3169,21 @@ def build_delete_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3142,10 +3195,11 @@ def build_list_function_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3153,21 +3207,21 @@ def build_list_function_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3179,10 +3233,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3190,21 +3245,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3215,31 +3270,32 @@ def build_list_host_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3250,31 +3306,32 @@ def build_list_sync_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3285,31 +3342,32 @@ def build_sync_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3325,12 +3383,12 @@ def build_create_or_update_host_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3339,23 +3397,23 @@ def build_create_or_update_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3370,10 +3428,11 @@ def build_delete_host_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3382,21 +3441,21 @@ def build_delete_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3407,31 +3466,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3443,10 +3503,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3454,21 +3515,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3483,12 +3544,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3496,23 +3557,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3526,10 +3587,11 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3537,21 +3599,21 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3564,10 +3626,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3576,21 +3639,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3606,12 +3669,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3620,23 +3683,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3651,10 +3714,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3663,21 +3727,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3693,12 +3757,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3707,23 +3771,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3736,31 +3800,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3771,31 +3836,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3807,10 +3873,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3818,21 +3885,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3847,12 +3914,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3860,23 +3927,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3890,10 +3957,11 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3901,21 +3969,21 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3930,12 +3998,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3943,23 +4011,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3972,31 +4040,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4008,10 +4077,11 @@ def build_get_instance_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4019,21 +4089,21 @@ def build_get_instance_info_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4045,10 +4115,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4056,21 +4127,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4085,12 +4156,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4098,23 +4169,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4128,10 +4199,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4139,21 +4211,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4165,10 +4237,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4176,21 +4249,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4203,10 +4276,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4215,21 +4289,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4242,10 +4316,11 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4254,21 +4329,21 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4281,10 +4356,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4293,21 +4369,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4320,10 +4396,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4332,21 +4409,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4360,10 +4437,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4373,21 +4451,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4400,10 +4478,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4412,21 +4491,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4437,31 +4516,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4472,31 +4552,32 @@ def build_list_site_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4507,31 +4588,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4546,36 +4628,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4591,35 +4673,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4632,31 +4714,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4667,31 +4750,32 @@ def build_get_swift_virtual_network_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4705,35 +4789,35 @@ def build_create_or_update_swift_virtual_network_connection_with_check_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4746,31 +4830,32 @@ def build_delete_swift_virtual_network_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4782,10 +4867,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4793,21 +4879,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4819,10 +4905,11 @@ def build_get_network_trace_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4830,21 +4917,21 @@ def build_get_network_trace_operation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4859,37 +4946,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4904,37 +4992,38 @@ def build_start_web_site_network_trace_operation_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4945,31 +5034,32 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4981,10 +5071,11 @@ def build_get_network_traces_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4992,21 +5083,21 @@ def build_get_network_traces_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5018,10 +5109,11 @@ def build_get_network_trace_operation_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5029,21 +5121,21 @@ def build_get_network_trace_operation_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5055,10 +5147,11 @@ def build_get_network_traces_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5066,21 +5159,21 @@ def build_get_network_traces_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5091,31 +5184,32 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5128,33 +5222,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5165,31 +5260,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5200,31 +5296,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5236,10 +5333,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5247,21 +5345,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5276,12 +5374,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5289,23 +5387,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5319,10 +5417,11 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5330,21 +5429,21 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5359,12 +5458,12 @@ def build_update_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5372,23 +5471,23 @@ def build_update_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5401,31 +5500,32 @@ def build_get_private_access_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5439,35 +5539,35 @@ def build_put_private_access_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5480,31 +5580,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5516,10 +5617,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5527,21 +5629,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5556,12 +5658,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5569,23 +5671,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5599,10 +5701,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5610,21 +5713,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5635,31 +5738,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5670,31 +5774,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5706,10 +5811,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5717,21 +5823,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5743,10 +5849,11 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5754,21 +5861,21 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5780,10 +5887,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5791,21 +5899,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5817,10 +5925,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5828,21 +5937,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5855,10 +5964,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5867,21 +5977,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5893,10 +6003,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5904,21 +6015,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5929,31 +6040,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5965,10 +6077,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5976,21 +6089,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6005,12 +6118,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6018,23 +6131,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6048,10 +6161,11 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6059,21 +6173,21 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6087,35 +6201,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6128,31 +6242,32 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6166,35 +6281,36 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6208,35 +6324,35 @@ def build_restore_from_backup_blob_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6252,35 +6368,35 @@ def build_restore_from_deleted_app_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6296,35 +6412,35 @@ def build_restore_snapshot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6337,31 +6453,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6373,10 +6490,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6384,21 +6502,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6410,10 +6528,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6421,21 +6540,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6447,10 +6566,11 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6458,21 +6578,21 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6483,31 +6603,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6519,10 +6640,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6530,21 +6652,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6559,12 +6681,12 @@ def build_create_or_update_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6572,23 +6694,23 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6605,10 +6727,11 @@ def build_delete_slot_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6616,25 +6739,25 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6649,12 +6772,12 @@ def build_update_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6662,23 +6785,23 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6694,10 +6817,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6705,23 +6829,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6736,12 +6860,12 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6749,23 +6873,23 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6782,12 +6906,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6795,23 +6919,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6825,10 +6949,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6836,21 +6961,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6863,10 +6988,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6875,21 +7001,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6902,10 +7028,11 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6914,21 +7041,21 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6944,12 +7071,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6958,23 +7085,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6992,12 +7119,12 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7006,23 +7133,23 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7036,10 +7163,11 @@ def build_get_basic_publishing_credentials_policies_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7047,21 +7175,21 @@ def build_get_basic_publishing_credentials_policies_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7073,10 +7201,11 @@ def build_get_ftp_allowed_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7084,21 +7213,21 @@ def build_get_ftp_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7113,12 +7242,12 @@ def build_update_ftp_allowed_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7126,23 +7255,23 @@ def build_update_ftp_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7156,10 +7285,11 @@ def build_get_scm_allowed_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7167,21 +7297,21 @@ def build_get_scm_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7196,12 +7326,12 @@ def build_update_scm_allowed_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7209,23 +7339,23 @@ def build_update_scm_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7239,10 +7369,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7250,21 +7381,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7279,12 +7410,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7292,23 +7423,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7322,10 +7453,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7333,21 +7465,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7362,12 +7494,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7375,23 +7507,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7405,10 +7537,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7416,21 +7549,21 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7445,12 +7578,12 @@ def build_update_auth_settings_v2_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7458,23 +7591,23 @@ def build_update_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7488,10 +7621,11 @@ def build_get_auth_settings_v2_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7499,21 +7633,21 @@ def build_get_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7528,12 +7662,12 @@ def build_update_azure_storage_accounts_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7541,23 +7675,23 @@ def build_update_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7571,10 +7705,11 @@ def build_list_azure_storage_accounts_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7582,21 +7717,21 @@ def build_list_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7611,12 +7746,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7624,23 +7759,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7654,10 +7789,11 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7665,21 +7801,21 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7691,10 +7827,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7702,21 +7839,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7728,10 +7865,11 @@ def build_get_app_settings_key_vault_references_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7739,21 +7877,21 @@ def build_get_app_settings_key_vault_references_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7766,10 +7904,11 @@ def build_get_app_setting_key_vault_reference_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7778,21 +7917,21 @@ def build_get_app_setting_key_vault_reference_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7804,10 +7943,11 @@ def build_get_site_connection_string_key_vault_references_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7815,21 +7955,21 @@ def build_get_site_connection_string_key_vault_references_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7842,10 +7982,11 @@ def build_get_site_connection_string_key_vault_reference_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7854,21 +7995,21 @@ def build_get_site_connection_string_key_vault_reference_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7883,12 +8024,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7896,23 +8037,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7926,10 +8067,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7937,21 +8079,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7963,10 +8105,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7974,21 +8117,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8003,12 +8146,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8016,23 +8159,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8049,12 +8192,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8062,23 +8205,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8092,10 +8235,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8103,21 +8247,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8129,10 +8273,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8140,21 +8285,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8169,12 +8314,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8182,23 +8327,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8212,10 +8357,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8223,21 +8369,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8249,10 +8395,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8260,21 +8407,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8289,12 +8436,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8302,23 +8449,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8335,12 +8482,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8348,23 +8495,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8378,10 +8525,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8389,21 +8537,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8416,10 +8564,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8428,21 +8577,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8455,10 +8604,11 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8467,21 +8617,21 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8493,10 +8643,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8504,21 +8655,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8530,10 +8681,11 @@ def build_get_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8541,21 +8693,21 @@ def build_get_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8567,10 +8719,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8578,21 +8731,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8605,10 +8758,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8617,21 +8771,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8644,10 +8798,11 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8656,21 +8811,21 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8683,10 +8838,11 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8695,21 +8851,21 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8722,10 +8878,11 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8734,21 +8891,21 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8760,10 +8917,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8771,21 +8929,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8798,10 +8956,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8810,21 +8969,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8840,12 +8999,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8854,23 +9013,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8885,10 +9044,11 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8897,21 +9057,21 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8924,10 +9084,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8936,21 +9097,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8965,12 +9126,12 @@ def build_discover_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8978,23 +9139,23 @@ def build_discover_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9008,10 +9169,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9019,21 +9181,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9046,10 +9208,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9058,21 +9221,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9088,12 +9251,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9102,23 +9265,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9133,10 +9296,11 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9145,21 +9309,21 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9175,12 +9339,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9189,23 +9353,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9219,10 +9383,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9230,21 +9395,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9259,12 +9424,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9272,23 +9437,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9302,10 +9467,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9313,21 +9479,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9339,10 +9505,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9350,21 +9517,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9376,10 +9543,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9387,21 +9555,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9414,10 +9582,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9426,21 +9595,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9456,12 +9625,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9470,23 +9639,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9501,10 +9670,11 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9513,21 +9683,21 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9544,12 +9714,12 @@ def build_create_or_update_function_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9559,23 +9729,23 @@ def build_create_or_update_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9591,10 +9761,11 @@ def build_delete_function_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9604,21 +9775,21 @@ def build_delete_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9631,10 +9802,11 @@ def build_list_function_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9643,21 +9815,21 @@ def build_list_function_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9670,10 +9842,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9682,21 +9855,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9708,10 +9881,11 @@ def build_list_host_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9719,21 +9893,21 @@ def build_list_host_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9745,10 +9919,11 @@ def build_list_sync_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9756,21 +9931,21 @@ def build_list_sync_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9782,10 +9957,11 @@ def build_sync_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9793,21 +9969,21 @@ def build_sync_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9824,12 +10000,12 @@ def build_create_or_update_host_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9839,23 +10015,23 @@ def build_create_or_update_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9871,10 +10047,11 @@ def build_delete_host_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9884,21 +10061,21 @@ def build_delete_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9910,10 +10087,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9921,21 +10099,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9948,10 +10126,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9960,21 +10139,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9990,12 +10169,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10004,23 +10183,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10035,10 +10214,11 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10047,21 +10227,21 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10075,10 +10255,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10088,21 +10269,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10119,12 +10300,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10134,23 +10315,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10166,10 +10347,11 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10179,21 +10361,21 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10210,12 +10392,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10225,23 +10407,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10255,10 +10437,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10266,21 +10449,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10292,10 +10475,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10303,21 +10487,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10330,10 +10514,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10342,21 +10527,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10372,12 +10557,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10386,23 +10571,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10417,10 +10602,11 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10429,21 +10615,21 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10459,12 +10645,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10473,23 +10659,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10503,10 +10689,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10514,21 +10701,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10541,10 +10728,11 @@ def build_get_instance_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10553,21 +10741,21 @@ def build_get_instance_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10580,10 +10768,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10592,21 +10781,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10622,12 +10811,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10636,23 +10825,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10667,10 +10856,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10679,21 +10869,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10706,10 +10896,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10718,21 +10909,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10746,10 +10937,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10759,21 +10951,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10787,10 +10979,11 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10800,21 +10993,21 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10828,10 +11021,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10841,21 +11035,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10869,10 +11063,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10882,21 +11077,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10911,10 +11106,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10925,21 +11121,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10953,10 +11149,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10966,21 +11163,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10992,10 +11189,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11003,21 +11201,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11029,10 +11227,11 @@ def build_list_site_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11040,21 +11239,21 @@ def build_list_site_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11066,10 +11265,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11077,21 +11277,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11103,10 +11303,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11114,21 +11315,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11140,10 +11341,11 @@ def build_get_swift_virtual_network_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11151,21 +11353,21 @@ def build_get_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11177,10 +11379,11 @@ def build_delete_swift_virtual_network_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11188,21 +11391,21 @@ def build_delete_swift_virtual_network_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11215,10 +11418,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11227,21 +11431,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11254,10 +11458,11 @@ def build_get_network_trace_operation_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11266,21 +11471,21 @@ def build_get_network_trace_operation_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11296,10 +11501,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11307,27 +11513,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11343,10 +11549,11 @@ def build_start_web_site_network_trace_operation_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11354,27 +11561,27 @@ def build_start_web_site_network_trace_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11386,10 +11593,11 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11397,21 +11605,21 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11424,10 +11632,11 @@ def build_get_network_traces_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11436,21 +11645,21 @@ def build_get_network_traces_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11463,10 +11672,11 @@ def build_get_network_trace_operation_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11475,21 +11685,21 @@ def build_get_network_trace_operation_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11502,10 +11712,11 @@ def build_get_network_traces_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11514,21 +11725,21 @@ def build_get_network_traces_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11540,10 +11751,11 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11551,21 +11763,21 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11579,10 +11791,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11590,23 +11803,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11618,10 +11831,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11629,21 +11843,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11655,10 +11869,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11666,21 +11881,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11693,10 +11908,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11705,21 +11921,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11735,12 +11951,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11749,23 +11965,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11780,10 +11996,11 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11792,21 +12009,21 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11822,12 +12039,12 @@ def build_update_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11836,23 +12053,23 @@ def build_update_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11866,10 +12083,11 @@ def build_get_private_access_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11877,21 +12095,21 @@ def build_get_private_access_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11906,12 +12124,12 @@ def build_put_private_access_vnet_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11919,23 +12137,23 @@ def build_put_private_access_vnet_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11949,10 +12167,11 @@ def build_get_private_endpoint_connection_list_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11960,21 +12179,21 @@ def build_get_private_endpoint_connection_list_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11987,10 +12206,11 @@ def build_get_private_endpoint_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11999,21 +12219,21 @@ def build_get_private_endpoint_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12029,12 +12249,12 @@ def build_approve_or_reject_private_endpoint_connection_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12043,23 +12263,23 @@ def build_approve_or_reject_private_endpoint_connection_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12074,10 +12294,11 @@ def build_delete_private_endpoint_connection_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12086,21 +12307,21 @@ def build_delete_private_endpoint_connection_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12112,10 +12333,11 @@ def build_get_private_link_resources_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12123,21 +12345,21 @@ def build_get_private_link_resources_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12149,10 +12371,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12160,21 +12383,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12187,10 +12410,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12199,21 +12423,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12226,10 +12450,11 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12238,21 +12463,21 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12265,10 +12490,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12277,21 +12503,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12304,10 +12530,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12316,21 +12543,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12344,10 +12571,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12357,21 +12585,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12384,10 +12612,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12396,21 +12625,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12422,10 +12651,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12433,21 +12663,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12460,10 +12690,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12472,21 +12703,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12502,12 +12733,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12516,23 +12747,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12547,10 +12778,11 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12559,21 +12791,21 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12588,12 +12820,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12601,23 +12833,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12631,10 +12863,11 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12642,21 +12875,21 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12671,10 +12904,11 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12682,25 +12916,25 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12715,12 +12949,12 @@ def build_restore_from_backup_blob_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12728,23 +12962,23 @@ def build_restore_from_backup_blob_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12761,12 +12995,12 @@ def build_restore_from_deleted_app_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12774,23 +13008,23 @@ def build_restore_from_deleted_app_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12807,12 +13041,12 @@ def build_restore_snapshot_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12820,23 +13054,23 @@ def build_restore_snapshot_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12850,10 +13084,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12861,21 +13096,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12888,10 +13123,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12900,21 +13136,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12927,10 +13163,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12939,21 +13176,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12966,10 +13203,11 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12978,21 +13216,21 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13007,12 +13245,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13020,23 +13258,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13053,12 +13291,12 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13066,23 +13304,23 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13096,10 +13334,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13107,21 +13346,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13133,10 +13372,11 @@ def build_list_snapshots_from_dr_secondary_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13144,21 +13384,21 @@ def build_list_snapshots_from_dr_secondary_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13170,10 +13410,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13181,21 +13422,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13210,12 +13451,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13223,23 +13464,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13255,10 +13496,11 @@ def build_delete_source_control_slot_request( additional_flags: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13266,23 +13508,23 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if additional_flags is not None: - query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13297,12 +13539,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13310,23 +13552,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13340,10 +13582,11 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13351,21 +13594,21 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13381,10 +13624,11 @@ def build_start_network_trace_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13392,27 +13636,27 @@ def build_start_network_trace_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13424,10 +13668,11 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13435,21 +13680,21 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13461,10 +13706,11 @@ def build_stop_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13472,21 +13718,21 @@ def build_stop_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13498,10 +13744,11 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13509,21 +13756,21 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13535,10 +13782,11 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13546,21 +13794,21 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13572,10 +13820,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13583,21 +13832,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13610,10 +13859,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13622,21 +13872,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13649,10 +13899,11 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13661,21 +13912,21 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13688,10 +13939,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13700,21 +13952,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13728,10 +13980,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13741,21 +13994,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13768,10 +14021,11 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13780,21 +14034,21 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13808,10 +14062,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13819,23 +14074,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13847,10 +14102,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13858,21 +14114,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13885,10 +14141,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13897,21 +14154,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13927,12 +14184,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13941,23 +14198,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13972,10 +14229,11 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13984,21 +14242,21 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14014,12 +14272,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14028,23 +14286,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14060,10 +14318,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14073,21 +14332,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14104,12 +14363,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14119,23 +14378,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14154,12 +14413,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14169,23 +14428,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14199,10 +14458,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14210,21 +14470,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14237,10 +14497,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14249,21 +14510,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14277,35 +14538,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14321,35 +14582,35 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14362,31 +14623,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14397,31 +14659,32 @@ def build_list_snapshots_from_dr_secondary_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14432,31 +14695,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14470,35 +14734,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14513,33 +14777,34 @@ def build_delete_source_control_request( additional_flags: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if additional_flags is not None: - query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14553,35 +14818,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14594,31 +14859,32 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14633,37 +14899,38 @@ def build_start_network_trace_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14674,31 +14941,32 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14709,31 +14977,32 @@ def build_stop_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14744,31 +15013,32 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14779,31 +15049,32 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14814,31 +15085,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14850,10 +15122,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14861,21 +15134,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14887,10 +15160,11 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14898,21 +15172,21 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14924,10 +15198,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14935,21 +15210,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14962,10 +15237,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14974,21 +15250,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15000,10 +15276,11 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15011,21 +15288,21 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15038,33 +15315,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15075,31 +15353,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15111,10 +15390,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15122,21 +15402,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15151,12 +15431,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15164,23 +15444,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15194,10 +15474,11 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15205,21 +15486,21 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15234,12 +15515,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15247,23 +15528,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15278,10 +15559,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15290,21 +15572,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15320,12 +15602,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15334,23 +15616,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15368,12 +15650,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15382,23 +15664,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15411,31 +15693,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15447,10 +15730,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15458,25 +15742,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -15505,13 +15789,15 @@ def list( ) -> Iterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15522,6 +15808,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -15531,6 +15818,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15548,7 +15836,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15562,7 +15854,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -15573,7 +15865,7 @@ def list_by_resource_group( ) -> Iterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -15585,6 +15877,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15596,6 +15890,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -15607,6 +15902,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -15625,7 +15921,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15639,7 +15939,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -15650,7 +15950,7 @@ def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -15667,17 +15967,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15694,7 +16001,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -15710,6 +16017,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -15718,6 +16026,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -15725,7 +16034,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15743,7 +16056,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15757,8 +16070,8 @@ def begin_create_or_update( """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. + 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 @@ -15779,8 +16092,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -15792,6 +16106,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15816,13 +16131,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15832,16 +16146,16 @@ def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -15854,11 +16168,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -15866,7 +16183,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -15877,7 +16198,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15891,8 +16212,8 @@ def update( """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. + 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 @@ -15912,6 +16233,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -15920,6 +16242,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -15927,7 +16250,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15946,7 +16273,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15959,13 +16286,13 @@ def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -15978,18 +16305,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16004,11 +16338,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16017,7 +16351,7 @@ def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -16036,6 +16370,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -16044,6 +16379,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -16051,7 +16387,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16062,7 +16402,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -16075,7 +16415,7 @@ def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -16095,6 +16435,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16103,6 +16444,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -16110,7 +16452,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16125,7 +16471,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -16137,7 +16483,7 @@ def list_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -16149,6 +16495,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16161,6 +16509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -16172,6 +16521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16189,7 +16539,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16203,7 +16557,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def get_backup_status( @@ -16215,7 +16569,7 @@ def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -16234,18 +16588,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16260,11 +16621,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16273,7 +16634,7 @@ def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -16292,18 +16653,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16314,7 +16682,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -16330,9 +16698,9 @@ def list_backup_status_secrets( 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. + 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 @@ -16353,6 +16721,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16362,6 +16731,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -16369,7 +16739,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16384,10 +16758,10 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - def _restore_initial( + def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16401,6 +16775,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -16410,6 +16785,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -16417,7 +16793,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -16427,11 +16807,11 @@ def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore( + def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16441,7 +16821,7 @@ def begin_restore( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -16463,8 +16843,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -16477,6 +16858,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16498,10 +16880,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def get_basic_publishing_credentials_policies( @@ -16512,8 +16893,7 @@ def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -16530,17 +16910,24 @@ def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16555,7 +16942,7 @@ def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace @@ -16567,7 +16954,7 @@ def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -16584,17 +16971,24 @@ def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16609,7 +17003,7 @@ def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16622,7 +17016,7 @@ def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -16642,6 +17036,7 @@ def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16650,6 +17045,7 @@ def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -16657,7 +17053,11 @@ def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16672,7 +17072,7 @@ def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16684,7 +17084,7 @@ def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -16701,17 +17101,24 @@ def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16726,7 +17133,7 @@ def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16739,7 +17146,7 @@ def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -16759,6 +17166,7 @@ def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16767,6 +17175,7 @@ def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -16774,7 +17183,11 @@ def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16789,7 +17202,7 @@ def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16801,7 +17214,7 @@ def list_configurations( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -16814,6 +17227,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16826,6 +17241,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -16837,6 +17253,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16854,7 +17271,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16868,7 +17289,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -16880,7 +17301,7 @@ def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -16899,6 +17320,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -16907,6 +17329,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -16914,7 +17337,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16929,7 +17356,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -16941,7 +17368,7 @@ def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -16958,17 +17385,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16983,7 +17417,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -16996,7 +17430,7 @@ def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -17015,6 +17449,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -17023,6 +17458,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -17030,7 +17466,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17045,7 +17485,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -17057,7 +17497,7 @@ def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -17074,17 +17514,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17099,7 +17546,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -17112,8 +17559,7 @@ def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -17132,6 +17578,7 @@ def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -17140,6 +17587,7 @@ def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -17147,7 +17595,11 @@ def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17162,7 +17614,7 @@ def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -17174,7 +17626,7 @@ def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -17191,17 +17643,24 @@ def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17216,7 +17675,7 @@ def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -17229,7 +17688,7 @@ def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -17249,6 +17708,7 @@ def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -17257,6 +17717,7 @@ def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -17264,7 +17725,11 @@ def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17279,7 +17744,7 @@ def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -17291,7 +17756,7 @@ def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -17308,17 +17773,24 @@ def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17333,7 +17805,7 @@ def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -17346,7 +17818,7 @@ def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -17365,6 +17837,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -17373,6 +17846,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -17380,7 +17854,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17395,11 +17873,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17407,7 +17885,7 @@ def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -17424,17 +17902,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17445,7 +17930,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -17457,7 +17942,7 @@ def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -17474,17 +17959,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17499,7 +17991,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -17511,7 +18003,7 @@ def get_app_settings_key_vault_references( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -17524,6 +18016,8 @@ def get_app_settings_key_vault_references( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17536,6 +18030,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -17547,6 +18042,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17564,7 +18060,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17578,7 +18078,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace def get_app_setting_key_vault_reference( @@ -17590,7 +18090,7 @@ def get_app_setting_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -17609,18 +18109,25 @@ def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17635,7 +18142,7 @@ def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -17647,7 +18154,7 @@ def get_site_connection_string_key_vault_references( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -17660,6 +18167,8 @@ def get_site_connection_string_key_vault_references( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17672,6 +18181,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -17683,6 +18193,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17700,7 +18211,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17714,7 +18229,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace def get_site_connection_string_key_vault_reference( @@ -17726,7 +18241,7 @@ def get_site_connection_string_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -17745,18 +18260,25 @@ def get_site_connection_string_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_connection_string_key_vault_reference_request( resource_group_name=resource_group_name, name=name, connection_string_key=connection_string_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17771,7 +18293,7 @@ def get_site_connection_string_key_vault_reference( return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace @@ -17784,7 +18306,7 @@ def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -17803,6 +18325,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -17811,6 +18334,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -17818,7 +18342,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17833,7 +18361,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -17845,7 +18373,7 @@ def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -17862,17 +18390,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17887,7 +18422,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -17899,7 +18434,7 @@ def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -17916,17 +18451,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17941,7 +18483,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -17954,7 +18496,7 @@ def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -17974,6 +18516,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -17982,6 +18525,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -17989,7 +18533,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18004,7 +18552,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -18017,7 +18565,7 @@ def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -18036,6 +18584,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -18044,6 +18593,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -18051,7 +18601,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18066,7 +18620,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -18078,7 +18632,7 @@ def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -18095,17 +18649,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18120,7 +18681,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -18135,17 +18696,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18159,7 +18727,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -18171,7 +18739,7 @@ def begin_list_publishing_credentials( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -18189,7 +18757,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -18200,6 +18769,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -18223,10 +18793,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -18238,7 +18807,7 @@ def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -18257,6 +18826,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -18265,6 +18835,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -18272,7 +18843,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18287,7 +18862,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -18299,7 +18874,7 @@ def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -18316,17 +18891,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18341,7 +18923,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -18353,8 +18935,7 @@ def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -18371,17 +18952,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18396,7 +18984,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -18410,8 +18998,8 @@ def update_slot_configuration_names( """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. + 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 @@ -18430,6 +19018,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -18438,6 +19027,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -18445,7 +19035,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18460,7 +19054,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -18473,8 +19067,8 @@ def get_configuration( """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. + 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 @@ -18491,17 +19085,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18516,7 +19117,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18529,7 +19130,7 @@ def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -18548,6 +19149,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -18556,6 +19158,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -18563,7 +19166,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18578,7 +19185,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18591,7 +19198,7 @@ def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -18610,6 +19217,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -18618,6 +19226,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -18625,7 +19234,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18640,7 +19253,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18653,8 +19266,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -18667,6 +19280,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18679,6 +19294,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -18690,6 +19306,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18707,7 +19324,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18721,7 +19342,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -18733,7 +19354,7 @@ def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -18752,18 +19373,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18778,11 +19406,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18791,7 +19419,7 @@ def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -18810,18 +19438,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18832,7 +19467,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -18844,7 +19479,7 @@ def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -18861,17 +19496,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18887,7 +19529,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -18899,7 +19541,7 @@ def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -18916,17 +19558,24 @@ def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18942,7 +19591,7 @@ def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -18954,7 +19603,7 @@ def list_continuous_web_jobs( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -18967,6 +19616,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18979,6 +19630,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -18990,6 +19642,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19007,7 +19660,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19021,7 +19678,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -19033,7 +19690,7 @@ def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -19052,18 +19709,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19080,11 +19744,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19093,7 +19757,7 @@ def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -19112,18 +19776,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19134,11 +19805,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19147,7 +19818,7 @@ def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -19166,18 +19837,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19188,11 +19866,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19201,7 +19879,7 @@ def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -19220,18 +19898,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19242,7 +19927,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -19254,7 +19939,7 @@ def list_deployments( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -19266,6 +19951,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19278,6 +19965,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -19289,6 +19977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19306,7 +19995,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19320,7 +20013,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -19332,7 +20025,7 @@ def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -19351,18 +20044,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19377,7 +20077,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -19391,7 +20091,7 @@ def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -19412,6 +20112,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -19421,6 +20122,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -19428,7 +20130,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19443,11 +20149,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19456,7 +20162,7 @@ def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -19475,18 +20181,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19497,7 +20210,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -19510,7 +20223,7 @@ def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -19530,18 +20243,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19556,7 +20276,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -19570,8 +20290,8 @@ def discover_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. - 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. + 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 @@ -19591,6 +20311,7 @@ def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -19599,6 +20320,7 @@ def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -19606,7 +20328,11 @@ def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19621,7 +20347,7 @@ def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -19633,7 +20359,7 @@ def list_domain_ownership_identifiers( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -19645,6 +20371,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19657,6 +20385,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -19668,6 +20397,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19685,7 +20415,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19699,7 +20433,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -19711,7 +20445,7 @@ def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -19730,18 +20464,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19756,7 +20497,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19770,8 +20511,7 @@ def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19792,6 +20532,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19801,6 +20542,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -19808,7 +20550,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19823,11 +20569,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19836,7 +20582,7 @@ def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -19855,18 +20601,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19877,7 +20630,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19891,8 +20644,7 @@ def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19913,6 +20665,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19922,6 +20675,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -19929,7 +20683,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19944,7 +20702,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19956,7 +20714,7 @@ def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -19973,17 +20731,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19998,7 +20763,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -20014,6 +20779,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -20022,6 +20788,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -20029,7 +20796,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -20045,7 +20816,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -20058,7 +20829,7 @@ def begin_create_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -20079,8 +20850,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -20092,6 +20864,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20116,10 +20889,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -20130,7 +20902,7 @@ def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -20147,17 +20919,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20174,7 +20953,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -20186,7 +20965,7 @@ def list_functions( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -20199,6 +20978,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20211,6 +20992,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -20222,6 +21004,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20239,7 +21022,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20253,7 +21040,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -20264,7 +21051,7 @@ def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -20281,17 +21068,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20306,7 +21100,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -20319,7 +21113,7 @@ def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -20338,18 +21132,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20366,7 +21167,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -20383,6 +21184,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -20392,6 +21194,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -20399,7 +21202,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -20413,7 +21220,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -20427,7 +21234,7 @@ def begin_create_function( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -20450,8 +21257,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -20464,6 +21272,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20488,13 +21297,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20503,7 +21311,7 @@ def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -20522,18 +21330,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20544,7 +21359,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -20559,7 +21374,7 @@ def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -20582,6 +21397,7 @@ def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -20592,6 +21408,7 @@ def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -20599,7 +21416,11 @@ def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -20618,11 +21439,11 @@ def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret( + def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20632,7 +21453,7 @@ def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -20653,6 +21474,8 @@ def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -20660,12 +21483,17 @@ def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20676,7 +21504,7 @@ def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -20689,7 +21517,7 @@ def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -20708,18 +21536,25 @@ def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20734,7 +21569,7 @@ def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -20747,7 +21582,7 @@ def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -20766,18 +21601,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20792,7 +21634,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -20804,7 +21646,7 @@ def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -20821,17 +21663,24 @@ def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20846,11 +21695,11 @@ def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status( + def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20858,7 +21707,7 @@ def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -20875,17 +21724,24 @@ def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20896,11 +21752,11 @@ def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions( + def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20908,7 +21764,7 @@ def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -20925,17 +21781,24 @@ def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20946,7 +21809,7 @@ def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace @@ -20961,7 +21824,7 @@ def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -20984,6 +21847,7 @@ def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -20994,6 +21858,7 @@ def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -21001,7 +21866,11 @@ def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -21020,11 +21889,11 @@ def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret( + def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21034,7 +21903,7 @@ def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -21055,6 +21924,8 @@ def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -21062,12 +21933,17 @@ def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21078,7 +21954,7 @@ def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -21090,7 +21966,7 @@ def list_host_name_bindings( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -21103,6 +21979,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21115,6 +21993,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -21126,6 +22005,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21143,7 +22023,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21157,7 +22041,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -21169,7 +22053,7 @@ def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -21188,18 +22072,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21214,7 +22105,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -21228,7 +22119,7 @@ def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -21250,6 +22141,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -21259,6 +22151,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -21266,7 +22159,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21281,11 +22178,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21294,7 +22191,7 @@ def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -21313,18 +22210,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -21335,7 +22239,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -21349,7 +22253,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -21370,6 +22274,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -21377,12 +22283,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21397,7 +22308,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21412,7 +22323,7 @@ def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -21435,6 +22346,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -21445,6 +22357,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -21452,7 +22365,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21467,11 +22384,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21481,7 +22398,7 @@ def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -21502,6 +22419,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -21509,12 +22428,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21525,7 +22449,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21540,7 +22464,7 @@ def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -21563,6 +22487,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -21573,6 +22498,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -21580,7 +22506,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21595,7 +22525,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21607,7 +22537,7 @@ def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -21624,17 +22554,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21649,7 +22586,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -21661,8 +22598,7 @@ def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -21679,17 +22615,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21704,7 +22647,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -21717,7 +22660,7 @@ def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -21736,18 +22679,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21762,7 +22712,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21776,8 +22726,7 @@ def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21798,6 +22747,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21807,6 +22757,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -21814,7 +22765,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21829,11 +22784,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21842,7 +22797,7 @@ def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -21861,18 +22816,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21883,7 +22845,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21897,8 +22859,7 @@ def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21919,6 +22880,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21928,6 +22890,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -21935,7 +22898,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21950,7 +22917,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21962,7 +22929,7 @@ def list_instance_identifiers( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -21975,6 +22942,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21987,6 +22956,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -21998,6 +22968,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22015,7 +22986,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22029,7 +23004,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_info( @@ -22041,7 +23016,7 @@ def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -22060,18 +23035,25 @@ def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22086,7 +23068,7 @@ def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -22099,7 +23081,7 @@ def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -22118,18 +23100,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22144,7 +23133,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -22161,6 +23150,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -22170,6 +23160,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -22177,7 +23168,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -22193,7 +23188,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -22207,7 +23202,7 @@ def begin_create_instance_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -22230,8 +23225,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -22244,6 +23240,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22268,10 +23265,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -22283,7 +23279,7 @@ def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -22302,18 +23298,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22330,7 +23333,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -22344,8 +23347,8 @@ def list_instance_processes( """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. + 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 @@ -22360,6 +23363,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22373,6 +23378,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -22385,6 +23391,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22402,7 +23409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22416,7 +23427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -22429,8 +23440,7 @@ def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -22452,6 +23462,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -22459,12 +23471,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22481,11 +23498,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22496,8 +23513,8 @@ def delete_instance_process( """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. + 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 @@ -22519,6 +23536,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -22526,12 +23545,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -22542,7 +23566,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -22556,8 +23580,7 @@ def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -22579,6 +23602,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -22586,12 +23611,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22608,7 +23638,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -22623,8 +23653,8 @@ def list_instance_process_modules( """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. + 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 @@ -22642,6 +23672,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22656,6 +23688,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -22669,6 +23702,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22686,7 +23720,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22700,7 +23738,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -22714,8 +23752,7 @@ def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -22739,6 +23776,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -22747,12 +23786,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22769,7 +23813,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -22783,8 +23827,7 @@ def list_instance_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -22802,6 +23845,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22816,6 +23861,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -22829,6 +23875,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22846,7 +23893,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22860,7 +23911,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable( @@ -22871,7 +23922,7 @@ def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -22888,17 +23939,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22913,7 +23971,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -22925,7 +23983,7 @@ def list_site_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -22937,6 +23995,8 @@ def list_site_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22949,6 +24009,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -22960,6 +24021,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22977,7 +24039,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22991,7 +24057,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers( @@ -23002,7 +24068,7 @@ def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -23019,17 +24085,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23044,7 +24117,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore def _migrate_storage_initial( @@ -23061,6 +24134,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -23069,6 +24143,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -23077,7 +24152,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23091,7 +24170,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -23105,7 +24184,7 @@ def begin_migrate_storage( ) -> LROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -23129,8 +24208,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -23143,6 +24223,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23167,10 +24248,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -23185,6 +24265,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -23193,6 +24274,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -23200,7 +24282,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23214,7 +24300,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -23227,7 +24313,7 @@ def begin_migrate_my_sql( ) -> LROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -23247,8 +24333,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -23260,6 +24347,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23284,10 +24372,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -23299,8 +24386,8 @@ def get_migrate_my_sql_status( """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. + 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 @@ -23317,17 +24404,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23342,7 +24436,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -23354,7 +24448,7 @@ def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -23371,17 +24465,24 @@ def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23396,7 +24497,7 @@ def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23412,9 +24513,9 @@ def create_or_update_swift_virtual_network_connection_with_check( 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 + 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. @@ -23434,6 +24535,7 @@ def create_or_update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -23442,6 +24544,7 @@ def create_or_update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check.metadata['url'], @@ -23449,7 +24552,11 @@ def create_or_update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23464,11 +24571,11 @@ def create_or_update_swift_virtual_network_connection_with_check( return deserialized - create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network( + def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23476,7 +24583,7 @@ def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -23493,17 +24600,24 @@ def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23514,7 +24628,7 @@ def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23527,7 +24641,7 @@ def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -23546,18 +24660,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23574,7 +24695,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -23587,8 +24708,7 @@ def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23607,18 +24727,25 @@ def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23637,7 +24764,7 @@ def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -23652,17 +24779,17 @@ def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -23675,11 +24802,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23688,7 +24818,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23703,7 +24837,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_initial( @@ -23721,11 +24855,14 @@ def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23734,7 +24871,11 @@ def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23752,7 +24893,7 @@ def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -23767,17 +24908,17 @@ def begin_start_web_site_network_trace_operation( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23792,7 +24933,8 @@ def begin_start_web_site_network_trace_operation( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -23806,6 +24948,7 @@ def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23829,13 +24972,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace( + def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23843,7 +24985,7 @@ def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -23860,17 +25002,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23881,7 +25030,7 @@ def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace @@ -23894,8 +25043,7 @@ def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23914,18 +25062,25 @@ def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23940,7 +25095,7 @@ def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -23953,8 +25108,7 @@ def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23973,18 +25127,25 @@ def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24003,7 +25164,7 @@ def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -24016,8 +25177,7 @@ def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24036,18 +25196,25 @@ def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24062,11 +25229,11 @@ def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24074,8 +25241,7 @@ def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -24092,17 +25258,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24113,7 +25286,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -24126,7 +25299,7 @@ def list_perf_mon_counters( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -24134,7 +25307,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -24143,6 +25316,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24155,6 +25330,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -24167,6 +25343,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24185,7 +25362,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24199,7 +25380,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -24210,7 +25391,7 @@ def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -24227,17 +25408,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24252,7 +25440,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -24264,7 +25452,7 @@ def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -24281,17 +25469,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24306,7 +25501,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -24319,7 +25514,7 @@ def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -24338,18 +25533,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24364,7 +25566,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24378,7 +25580,7 @@ def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -24399,6 +25601,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -24408,6 +25611,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -24415,7 +25619,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24430,11 +25638,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24443,7 +25651,7 @@ def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -24462,18 +25670,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24484,7 +25699,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24498,7 +25713,7 @@ def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -24519,6 +25734,7 @@ def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -24528,6 +25744,7 @@ def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -24535,7 +25752,11 @@ def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24550,7 +25771,7 @@ def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24563,8 +25784,8 @@ def get_private_access( """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. + 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 @@ -24581,17 +25802,24 @@ def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24606,7 +25834,7 @@ def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -24620,8 +25848,8 @@ def put_private_access_vnet( """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. + 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 @@ -24640,6 +25868,7 @@ def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -24648,6 +25877,7 @@ def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -24655,7 +25885,11 @@ def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24670,7 +25904,7 @@ def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -24682,7 +25916,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -24695,6 +25929,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24707,6 +25943,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -24718,6 +25955,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24735,7 +25973,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24749,7 +25991,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -24761,7 +26003,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -24780,18 +26022,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24806,7 +26055,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -24823,6 +26072,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -24832,6 +26082,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -24839,7 +26090,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24857,7 +26112,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -24871,7 +26126,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -24896,8 +26151,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -24910,6 +26166,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24934,10 +26191,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -24952,18 +26208,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -24984,7 +26247,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -24997,7 +26260,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25017,7 +26280,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -25029,6 +26293,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25052,10 +26317,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -25066,7 +26330,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25083,17 +26347,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25108,7 +26379,7 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -25121,8 +26392,8 @@ def list_processes( """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. + 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 @@ -25134,6 +26405,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25146,6 +26419,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -25157,6 +26431,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25174,7 +26449,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25188,7 +26467,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -25200,8 +26479,7 @@ def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -25220,18 +26498,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25248,11 +26533,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25262,8 +26547,8 @@ def delete_process( """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. + 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 @@ -25282,18 +26567,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -25304,7 +26596,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -25317,8 +26609,7 @@ def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -25337,18 +26628,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25365,7 +26663,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -25379,8 +26677,8 @@ def list_process_modules( """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. + 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 @@ -25395,6 +26693,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25408,6 +26708,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -25420,6 +26721,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25437,7 +26739,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25451,7 +26757,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -25464,8 +26770,7 @@ def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -25486,6 +26791,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -25493,12 +26800,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25515,7 +26827,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -25528,8 +26840,7 @@ def list_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -25544,6 +26855,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25557,6 +26870,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -25569,6 +26883,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25586,7 +26901,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25600,7 +26919,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -25611,7 +26930,7 @@ def list_public_certificates( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -25624,6 +26943,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25636,6 +26957,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -25647,6 +26969,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25664,7 +26987,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25678,7 +27005,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -25690,7 +27017,7 @@ def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -25709,18 +27036,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25735,7 +27069,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -25749,7 +27083,7 @@ def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -25771,6 +27105,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -25780,6 +27115,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -25787,7 +27123,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25802,11 +27142,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25815,7 +27155,7 @@ def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -25834,18 +27174,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -25856,7 +27203,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -25869,7 +27216,7 @@ def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -25890,6 +27237,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -25898,6 +27246,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -25905,7 +27254,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25920,11 +27273,11 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25933,8 +27286,8 @@ def reset_production_slot_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. + 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 @@ -25951,17 +27304,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25972,11 +27332,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25986,17 +27346,18 @@ def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -26009,11 +27370,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -26021,7 +27385,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26032,10 +27400,10 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - def _restore_from_backup_blob_initial( + def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26048,6 +27416,7 @@ def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -26056,6 +27425,7 @@ def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -26063,7 +27433,11 @@ def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26073,11 +27447,11 @@ def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob( + def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26086,7 +27460,7 @@ def begin_restore_from_backup_blob( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -26106,8 +27480,9 @@ def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26119,6 +27494,7 @@ def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26140,12 +27516,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_initial( + def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26158,6 +27533,7 @@ def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -26166,6 +27542,7 @@ def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -26173,7 +27550,11 @@ def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26183,11 +27564,11 @@ def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app( + def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26196,7 +27577,7 @@ def begin_restore_from_deleted_app( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -26216,8 +27597,9 @@ def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26229,6 +27611,7 @@ def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26250,12 +27633,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_initial( + def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26268,6 +27650,7 @@ def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -26276,6 +27659,7 @@ def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -26283,7 +27667,11 @@ def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26293,11 +27681,11 @@ def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot( + def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26306,7 +27694,7 @@ def begin_restore_snapshot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -26327,8 +27715,9 @@ def begin_restore_snapshot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26340,6 +27729,7 @@ def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26361,10 +27751,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -26375,7 +27764,7 @@ def list_site_extensions( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -26388,6 +27777,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26400,6 +27791,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -26411,6 +27803,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26428,7 +27821,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26442,7 +27839,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -26454,7 +27851,7 @@ def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -26473,18 +27870,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26501,7 +27905,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -26517,18 +27921,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -26547,7 +27958,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -26560,7 +27971,7 @@ def begin_install_site_extension( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -26581,7 +27992,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -26593,6 +28005,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -26616,13 +28029,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26631,7 +28043,7 @@ def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -26650,18 +28062,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -26672,7 +28091,7 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -26684,7 +28103,7 @@ def list_slots( ) -> Iterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -26695,6 +28114,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26707,6 +28128,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -26718,6 +28140,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26735,7 +28158,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26749,7 +28176,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -26761,7 +28188,7 @@ def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -26780,18 +28207,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26808,7 +28242,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -26825,6 +28259,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -26834,6 +28269,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -26841,7 +28277,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26859,7 +28299,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -26874,8 +28314,8 @@ def begin_create_or_update_slot( """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. + 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 @@ -26899,8 +28339,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -26913,6 +28354,7 @@ def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26937,13 +28379,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26954,7 +28395,7 @@ def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -26963,10 +28404,10 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -26979,12 +28420,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -26992,7 +28436,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -27003,7 +28451,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27018,8 +28466,8 @@ def update_slot( """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. + 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 @@ -27042,6 +28490,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -27051,6 +28500,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -27058,7 +28508,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27077,7 +28531,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27091,7 +28545,7 @@ def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -27099,7 +28553,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -27112,19 +28566,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27139,11 +28600,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27153,7 +28614,7 @@ def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -27175,6 +28636,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -27184,6 +28646,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -27191,7 +28654,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27202,7 +28669,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -27216,7 +28683,7 @@ def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -27239,6 +28706,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27248,6 +28716,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -27255,7 +28724,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27270,7 +28743,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -27283,7 +28756,7 @@ def list_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -27298,6 +28771,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27311,6 +28786,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -27323,6 +28799,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27340,7 +28817,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27354,7 +28835,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def get_backup_status_slot( @@ -27367,7 +28848,7 @@ def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -27389,6 +28870,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -27396,12 +28879,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27416,11 +28904,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27430,7 +28918,7 @@ def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -27452,6 +28940,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -27459,12 +28949,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -27475,7 +28970,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -27492,9 +28987,9 @@ def list_backup_status_secrets_slot( 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. + 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 @@ -27517,6 +29012,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27527,6 +29023,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -27534,7 +29031,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27549,10 +29050,10 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - def _restore_slot_initial( + def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27567,6 +29068,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -27577,6 +29079,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -27584,7 +29087,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27594,11 +29101,11 @@ def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore_slot( + def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27609,7 +29116,7 @@ def begin_restore_slot( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -27634,8 +29141,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -27649,6 +29157,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -27670,10 +29179,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def get_basic_publishing_credentials_policies_slot( @@ -27685,8 +29193,7 @@ def get_basic_publishing_credentials_policies_slot( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -27705,18 +29212,25 @@ def get_basic_publishing_credentials_policies_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_basic_publishing_credentials_policies_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27731,7 +29245,7 @@ def get_basic_publishing_credentials_policies_slot( return deserialized - get_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace @@ -27744,7 +29258,7 @@ def get_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -27763,18 +29277,25 @@ def get_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ftp_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27789,7 +29310,7 @@ def get_ftp_allowed_slot( return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -27803,7 +29324,7 @@ def update_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -27825,6 +29346,7 @@ def update_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -27834,6 +29356,7 @@ def update_ftp_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed_slot.metadata['url'], @@ -27841,7 +29364,11 @@ def update_ftp_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27856,7 +29383,7 @@ def update_ftp_allowed_slot( return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -27869,7 +29396,7 @@ def get_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -27888,18 +29415,25 @@ def get_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_scm_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27914,7 +29448,7 @@ def get_scm_allowed_slot( return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -27928,7 +29462,7 @@ def update_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -27950,6 +29484,7 @@ def update_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -27959,6 +29494,7 @@ def update_scm_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed_slot.metadata['url'], @@ -27966,7 +29502,11 @@ def update_scm_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27981,7 +29521,7 @@ def update_scm_allowed_slot( return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -27994,7 +29534,7 @@ def list_configurations_slot( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -28010,6 +29550,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28023,6 +29565,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -28035,6 +29578,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28052,7 +29596,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28066,7 +29614,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -28079,7 +29627,7 @@ def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -28101,6 +29649,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -28110,6 +29659,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -28117,7 +29667,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28132,7 +29686,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -28145,7 +29699,7 @@ def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -28165,18 +29719,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28191,7 +29752,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -28205,7 +29766,7 @@ def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -28226,6 +29787,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -28235,6 +29797,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -28242,7 +29805,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28257,7 +29824,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -28270,7 +29837,7 @@ def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -28290,18 +29857,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28316,7 +29890,7 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace @@ -28330,8 +29904,7 @@ def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -28352,6 +29925,7 @@ def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -28361,6 +29935,7 @@ def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -28368,7 +29943,11 @@ def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28383,7 +29962,7 @@ def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -28396,7 +29975,7 @@ def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -28416,18 +29995,25 @@ def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28442,7 +30028,7 @@ def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -28456,7 +30042,7 @@ def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -28479,6 +30065,7 @@ def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -28488,6 +30075,7 @@ def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -28495,7 +30083,11 @@ def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28510,7 +30102,7 @@ def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -28523,7 +30115,7 @@ def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -28543,18 +30135,25 @@ def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28569,7 +30168,7 @@ def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -28583,7 +30182,7 @@ def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -28605,6 +30204,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -28614,6 +30214,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -28621,7 +30222,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28636,11 +30241,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28649,7 +30254,7 @@ def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -28669,18 +30274,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28691,7 +30303,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -28704,7 +30316,7 @@ def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -28724,18 +30336,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28750,7 +30369,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -28763,7 +30382,7 @@ def get_app_settings_key_vault_references_slot( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -28778,6 +30397,8 @@ def get_app_settings_key_vault_references_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28791,6 +30412,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -28803,6 +30425,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28820,7 +30443,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28834,7 +30461,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings"} # type: ignore @distributed_trace def get_app_setting_key_vault_reference_slot( @@ -28847,7 +30474,7 @@ def get_app_setting_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -28868,6 +30495,8 @@ def get_app_setting_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_app_setting_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -28875,12 +30504,17 @@ def get_app_setting_key_vault_reference_slot( app_setting_key=app_setting_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28895,7 +30529,7 @@ def get_app_setting_key_vault_reference_slot( return deserialized - get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -28908,7 +30542,7 @@ def get_site_connection_string_key_vault_references_slot( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -28923,6 +30557,8 @@ def get_site_connection_string_key_vault_references_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28936,6 +30572,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -28948,6 +30585,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28965,7 +30603,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28979,7 +30621,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace def get_site_connection_string_key_vault_reference_slot( @@ -28992,7 +30634,7 @@ def get_site_connection_string_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -29013,6 +30655,8 @@ def get_site_connection_string_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_connection_string_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -29020,12 +30664,17 @@ def get_site_connection_string_key_vault_reference_slot( connection_string_key=connection_string_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29040,7 +30689,7 @@ def get_site_connection_string_key_vault_reference_slot( return deserialized - get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace @@ -29054,7 +30703,7 @@ def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -29076,6 +30725,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -29085,6 +30735,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -29092,7 +30743,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29107,7 +30762,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -29120,7 +30775,7 @@ def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -29140,18 +30795,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29166,7 +30828,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -29179,7 +30841,7 @@ def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -29199,18 +30861,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29225,7 +30894,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -29239,7 +30908,7 @@ def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -29262,6 +30931,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -29271,6 +30941,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -29278,7 +30949,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29293,7 +30968,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -29307,7 +30982,7 @@ def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -29329,6 +31004,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -29338,6 +31014,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -29345,7 +31022,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29360,7 +31041,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -29373,7 +31054,7 @@ def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -29393,18 +31074,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29419,7 +31107,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -29435,18 +31123,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29460,7 +31155,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -29473,7 +31168,7 @@ def begin_list_publishing_credentials_slot( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -29494,7 +31189,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -29506,6 +31202,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -29529,10 +31226,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -29545,7 +31241,7 @@ def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -29566,6 +31262,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -29575,6 +31272,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -29582,7 +31280,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29597,7 +31299,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -29610,7 +31312,7 @@ def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -29629,18 +31331,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29655,7 +31364,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -29669,8 +31378,8 @@ def get_configuration_slot( """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. + 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 @@ -29690,18 +31399,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29716,7 +31432,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -29730,7 +31446,7 @@ def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -29752,6 +31468,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -29761,6 +31478,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -29768,7 +31486,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29783,7 +31505,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -29797,7 +31519,7 @@ def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -29819,6 +31541,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -29828,6 +31551,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -29835,7 +31559,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29850,7 +31578,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -29864,8 +31592,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -29881,6 +31609,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29894,6 +31624,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -29906,6 +31637,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29923,7 +31655,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29937,7 +31673,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -29950,7 +31686,7 @@ def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -29972,6 +31708,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -29979,12 +31717,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29999,11 +31742,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30013,7 +31756,7 @@ def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -30035,6 +31778,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -30042,12 +31787,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30058,7 +31808,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -30071,7 +31821,7 @@ def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -30090,18 +31840,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30117,7 +31874,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -30130,7 +31887,7 @@ def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -30149,18 +31906,25 @@ def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30176,7 +31940,7 @@ def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -30189,7 +31953,7 @@ def list_continuous_web_jobs_slot( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -30205,6 +31969,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30218,6 +31984,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -30230,6 +31997,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30247,7 +32015,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30261,7 +32033,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -30274,7 +32046,7 @@ def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -30296,6 +32068,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30303,12 +32077,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30325,11 +32104,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30339,7 +32118,7 @@ def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -30361,6 +32140,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30368,12 +32149,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30384,11 +32170,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30398,7 +32184,7 @@ def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -30420,6 +32206,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30427,12 +32215,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30443,11 +32236,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30457,7 +32250,7 @@ def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -30479,6 +32272,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30486,12 +32281,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30502,7 +32302,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -30515,7 +32315,7 @@ def list_deployments_slot( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -30530,6 +32330,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30543,6 +32345,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -30555,6 +32358,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30572,7 +32376,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30586,7 +32394,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -30599,7 +32407,7 @@ def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -30621,6 +32429,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -30628,12 +32438,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30648,7 +32463,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -30663,7 +32478,7 @@ def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -30687,6 +32502,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -30697,6 +32513,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -30704,7 +32521,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30719,11 +32540,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30733,7 +32554,7 @@ def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -30755,6 +32576,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -30762,12 +32585,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30778,7 +32606,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -30792,7 +32620,7 @@ def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -30815,6 +32643,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -30822,12 +32652,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30842,7 +32677,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -30857,8 +32692,8 @@ def discover_backup_slot( """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. + 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 @@ -30881,6 +32716,7 @@ def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -30890,6 +32726,7 @@ def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -30897,7 +32734,11 @@ def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30912,7 +32753,7 @@ def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -30925,7 +32766,7 @@ def list_domain_ownership_identifiers_slot( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -30940,6 +32781,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30953,6 +32796,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -30965,6 +32809,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30982,7 +32827,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30996,7 +32845,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -31009,7 +32858,7 @@ def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -31031,6 +32880,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -31038,12 +32889,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31058,7 +32914,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31073,8 +32929,7 @@ def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -31098,6 +32953,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -31108,6 +32964,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -31115,7 +32972,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31130,11 +32991,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31144,7 +33005,7 @@ def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -31166,6 +33027,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -31173,12 +33036,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -31189,7 +33057,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31204,8 +33072,7 @@ def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -31229,6 +33096,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -31239,6 +33107,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -31246,7 +33115,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31261,7 +33134,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31274,7 +33147,7 @@ def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -31293,18 +33166,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31319,7 +33199,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -31336,6 +33216,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -31345,6 +33226,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -31352,7 +33234,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -31368,7 +33254,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -31382,7 +33268,7 @@ def begin_create_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -31405,8 +33291,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -31419,6 +33306,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -31443,10 +33331,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -31458,7 +33345,7 @@ def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -31477,18 +33364,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31505,7 +33399,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -31518,7 +33412,7 @@ def list_instance_functions_slot( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -31533,6 +33427,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31546,6 +33442,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -31558,6 +33455,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31575,7 +33473,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31589,7 +33491,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -31601,7 +33503,7 @@ def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -31620,18 +33522,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31646,7 +33555,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -31660,7 +33569,7 @@ def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -31681,6 +33590,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -31688,12 +33599,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31710,7 +33626,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -31728,6 +33644,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -31738,6 +33655,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -31745,7 +33663,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -31759,7 +33681,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -31774,7 +33696,7 @@ def begin_create_instance_function_slot( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -31799,8 +33721,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -31814,6 +33737,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -31838,13 +33762,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31854,7 +33777,7 @@ def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -31875,6 +33798,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -31882,12 +33807,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -31898,7 +33828,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -31914,7 +33844,7 @@ def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -31939,6 +33869,7 @@ def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -31950,6 +33881,7 @@ def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -31957,7 +33889,11 @@ def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -31976,11 +33912,11 @@ def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret_slot( + def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31991,7 +33927,7 @@ def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -32014,6 +33950,8 @@ def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -32022,12 +33960,17 @@ def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -32038,7 +33981,7 @@ def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -32052,7 +33995,7 @@ def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -32073,6 +34016,8 @@ def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -32080,12 +34025,17 @@ def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32100,7 +34050,7 @@ def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -32114,7 +34064,7 @@ def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -32135,6 +34085,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -32142,12 +34094,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32162,7 +34119,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -32175,7 +34132,7 @@ def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -32194,18 +34151,25 @@ def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32220,11 +34184,11 @@ def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status_slot( + def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32233,7 +34197,7 @@ def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -32252,18 +34216,25 @@ def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32274,11 +34245,11 @@ def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions_slot( + def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32287,7 +34258,7 @@ def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -32306,18 +34277,25 @@ def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32328,7 +34306,7 @@ def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace @@ -32344,7 +34322,7 @@ def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -32369,6 +34347,7 @@ def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -32380,6 +34359,7 @@ def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -32387,7 +34367,11 @@ def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -32406,11 +34390,11 @@ def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret_slot( + def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32421,7 +34405,7 @@ def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -32444,6 +34428,8 @@ def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -32452,12 +34438,17 @@ def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -32468,7 +34459,7 @@ def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -32481,7 +34472,7 @@ def list_host_name_bindings_slot( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -32497,6 +34488,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32510,6 +34503,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -32522,6 +34516,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32539,7 +34534,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32553,7 +34552,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -32566,7 +34565,7 @@ def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -32588,6 +34587,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -32595,12 +34596,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32615,7 +34621,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -32630,7 +34636,7 @@ def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -32655,6 +34661,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -32665,6 +34672,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -32672,7 +34680,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32687,11 +34699,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32701,7 +34713,7 @@ def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -32723,6 +34735,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -32730,12 +34744,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -32746,7 +34765,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -32761,7 +34780,7 @@ def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -32784,6 +34803,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -32792,12 +34813,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32812,7 +34838,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -32828,7 +34854,7 @@ def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -32853,6 +34879,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -32864,6 +34891,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -32871,7 +34899,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32886,11 +34918,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32901,7 +34933,7 @@ def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -32924,6 +34956,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -32932,12 +34966,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32948,7 +34987,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -32964,7 +35003,7 @@ def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -32989,6 +35028,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -33000,6 +35040,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -33007,7 +35048,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33022,7 +35067,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -33035,7 +35080,7 @@ def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -33054,18 +35099,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33080,7 +35132,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -33093,8 +35145,7 @@ def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -33114,18 +35165,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33140,7 +35198,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -33154,7 +35212,7 @@ def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -33176,6 +35234,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -33183,12 +35243,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33203,7 +35268,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33218,8 +35283,7 @@ def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -33243,6 +35307,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -33253,6 +35318,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -33260,7 +35326,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33275,11 +35345,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33289,7 +35359,7 @@ def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -33311,6 +35381,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -33318,12 +35390,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33334,7 +35411,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33349,8 +35426,7 @@ def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -33374,6 +35450,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -33384,6 +35461,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -33391,7 +35469,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33406,7 +35488,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33419,7 +35501,7 @@ def list_instance_identifiers_slot( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -33435,6 +35517,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33448,6 +35532,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -33460,6 +35545,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33477,7 +35563,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33491,7 +35581,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_info_slot( @@ -33504,7 +35594,7 @@ def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -33526,6 +35616,8 @@ def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -33533,12 +35625,17 @@ def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33553,7 +35650,7 @@ def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -33567,7 +35664,7 @@ def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -33588,6 +35685,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -33595,12 +35694,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33615,7 +35719,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -33633,6 +35737,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -33643,6 +35748,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -33650,7 +35756,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -33666,7 +35776,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -33681,7 +35791,7 @@ def begin_create_instance_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -33706,8 +35816,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -33721,6 +35832,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -33745,10 +35857,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -33761,7 +35872,7 @@ def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -33782,6 +35893,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -33789,12 +35902,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33811,7 +35929,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -33826,8 +35944,8 @@ def list_instance_processes_slot( """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. + 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 @@ -33845,6 +35963,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33859,6 +35979,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -33872,6 +35993,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33889,7 +36011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33903,7 +36029,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -33917,8 +36043,7 @@ def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -33943,6 +36068,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -33951,12 +36078,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33973,11 +36105,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33989,8 +36121,8 @@ def delete_instance_process_slot( """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. + 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 @@ -34015,6 +36147,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -34023,12 +36157,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -34039,7 +36178,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -34054,8 +36193,7 @@ def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -34080,6 +36218,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -34088,12 +36228,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34110,7 +36255,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -34126,8 +36271,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -34148,6 +36293,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34163,6 +36310,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -34177,6 +36325,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34194,7 +36343,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34208,7 +36361,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -34223,8 +36376,7 @@ def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34251,6 +36403,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -34260,12 +36414,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34282,7 +36441,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -34297,8 +36456,7 @@ def list_instance_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -34319,6 +36477,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34334,6 +36494,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -34348,6 +36509,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34365,7 +36527,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34379,7 +36545,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable_slot( @@ -34391,7 +36557,7 @@ def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -34411,18 +36577,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34437,7 +36610,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -34450,7 +36623,7 @@ def list_site_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -34465,6 +36638,8 @@ def list_site_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34478,6 +36653,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -34490,6 +36666,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34507,7 +36684,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34521,7 +36702,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers_slot( @@ -34533,7 +36714,7 @@ def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -34552,18 +36733,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34578,7 +36766,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -34592,8 +36780,8 @@ def get_migrate_my_sql_status_slot( """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. + 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 @@ -34612,18 +36800,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34638,7 +36833,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -34651,7 +36846,7 @@ def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -34671,18 +36866,25 @@ def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34697,11 +36899,11 @@ def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network_slot( + def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34710,7 +36912,7 @@ def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -34730,18 +36932,25 @@ def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34752,7 +36961,7 @@ def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -34766,7 +36975,7 @@ def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -34788,6 +36997,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -34795,12 +37006,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34817,7 +37033,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -34831,8 +37047,7 @@ def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -34854,6 +37069,8 @@ def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -34861,12 +37078,17 @@ def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -34885,7 +37107,7 @@ def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -34901,7 +37123,7 @@ def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -34909,11 +37131,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -34926,12 +37148,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -34940,7 +37165,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34955,7 +37184,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_slot_initial( @@ -34974,12 +37203,15 @@ def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -34988,7 +37220,11 @@ def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35006,7 +37242,7 @@ def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -35022,7 +37258,7 @@ def begin_start_web_site_network_trace_operation_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -35030,11 +37266,11 @@ def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -35049,7 +37285,8 @@ def begin_start_web_site_network_trace_operation_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -35064,6 +37301,7 @@ def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -35087,13 +37325,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace_slot( + def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35102,7 +37339,7 @@ def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -35121,18 +37358,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35143,7 +37387,7 @@ def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace @@ -35157,8 +37401,7 @@ def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35180,6 +37423,8 @@ def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -35187,12 +37432,17 @@ def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35207,7 +37457,7 @@ def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -35221,8 +37471,7 @@ def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35244,6 +37493,8 @@ def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -35251,12 +37502,17 @@ def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35275,7 +37531,7 @@ def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -35289,8 +37545,7 @@ def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35312,6 +37567,8 @@ def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -35319,12 +37576,17 @@ def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35339,11 +37601,11 @@ def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35352,8 +37614,7 @@ def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -35373,18 +37634,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35395,7 +37663,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -35409,7 +37677,7 @@ def list_perf_mon_counters_slot( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -35419,7 +37687,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -35428,6 +37696,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35441,6 +37711,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -35454,6 +37725,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -35472,7 +37744,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35486,7 +37762,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -35498,7 +37774,7 @@ def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -35517,18 +37793,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35543,7 +37826,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -35556,7 +37839,7 @@ def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -35576,18 +37859,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35602,7 +37892,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -35616,7 +37906,7 @@ def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -35638,6 +37928,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -35645,12 +37937,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35665,7 +37962,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -35680,7 +37977,7 @@ def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -35704,6 +38001,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -35714,6 +38012,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -35721,7 +38020,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35736,11 +38039,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35750,7 +38053,7 @@ def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -35772,6 +38075,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -35779,12 +38084,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35795,7 +38105,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -35810,7 +38120,7 @@ def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -35834,6 +38144,7 @@ def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -35844,6 +38155,7 @@ def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -35851,7 +38163,11 @@ def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35866,7 +38182,7 @@ def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -35880,8 +38196,8 @@ def get_private_access_slot( """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. + 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 @@ -35900,18 +38216,25 @@ def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35926,7 +38249,7 @@ def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -35941,8 +38264,8 @@ def put_private_access_vnet_slot( """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. + 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 @@ -35963,6 +38286,7 @@ def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -35972,6 +38296,7 @@ def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -35979,7 +38304,11 @@ def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35994,7 +38323,7 @@ def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -36007,7 +38336,7 @@ def get_private_endpoint_connection_list_slot( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -36022,6 +38351,8 @@ def get_private_endpoint_connection_list_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36035,6 +38366,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list_slot.metadata['url'], ) request = _convert_request(request) @@ -36047,6 +38379,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36064,7 +38397,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36078,7 +38415,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection_slot( @@ -36091,7 +38428,7 @@ def get_private_endpoint_connection_slot( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36112,6 +38449,8 @@ def get_private_endpoint_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_endpoint_connection_slot_request( resource_group_name=resource_group_name, @@ -36119,12 +38458,17 @@ def get_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36139,7 +38483,7 @@ def get_private_endpoint_connection_slot( return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_slot_initial( @@ -36157,6 +38501,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -36167,6 +38512,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'], @@ -36174,7 +38520,11 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36192,7 +38542,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( return deserialized - _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -36207,7 +38557,7 @@ def begin_approve_or_reject_private_endpoint_connection_slot( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -36234,8 +38584,9 @@ def begin_approve_or_reject_private_endpoint_connection_slot( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -36249,6 +38600,7 @@ def begin_approve_or_reject_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36273,10 +38625,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_slot_initial( self, @@ -36292,6 +38643,8 @@ def _delete_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_private_endpoint_connection_slot_request_initial( resource_group_name=resource_group_name, @@ -36299,12 +38652,17 @@ def _delete_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -36325,7 +38683,7 @@ def _delete_private_endpoint_connection_slot_initial( return deserialized - _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -36339,7 +38697,7 @@ def begin_delete_private_endpoint_connection_slot( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36361,7 +38719,8 @@ def begin_delete_private_endpoint_connection_slot( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -36374,6 +38733,7 @@ def begin_delete_private_endpoint_connection_slot( name=name, private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -36397,10 +38757,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources_slot( @@ -36412,7 +38771,7 @@ def get_private_link_resources_slot( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36431,18 +38790,25 @@ def get_private_link_resources_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_private_link_resources_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36457,7 +38823,7 @@ def get_private_link_resources_slot( return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + get_private_link_resources_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources"} # type: ignore @distributed_trace @@ -36471,8 +38837,8 @@ def list_processes_slot( """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. + 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 @@ -36487,6 +38853,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36500,6 +38868,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -36512,6 +38881,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36529,7 +38899,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36543,7 +38917,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -36556,8 +38930,7 @@ def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -36579,6 +38952,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -36586,12 +38961,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36608,11 +38988,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36623,8 +39003,8 @@ def delete_process_slot( """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. + 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 @@ -36646,6 +39026,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -36653,12 +39035,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -36669,7 +39056,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -36683,8 +39070,7 @@ def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -36706,6 +39092,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -36713,12 +39101,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36735,7 +39128,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -36750,8 +39143,8 @@ def list_process_modules_slot( """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. + 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 @@ -36769,6 +39162,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36783,6 +39178,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -36796,6 +39192,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36813,7 +39210,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36827,7 +39228,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -36841,8 +39242,7 @@ def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -36866,6 +39266,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -36874,12 +39276,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36896,7 +39303,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -36910,8 +39317,7 @@ def list_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -36929,6 +39335,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36943,6 +39351,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -36956,6 +39365,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36973,7 +39383,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36987,7 +39401,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -36999,7 +39413,7 @@ def list_public_certificates_slot( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -37015,6 +39429,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37028,6 +39444,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -37040,6 +39457,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37057,7 +39475,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37071,7 +39493,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -37084,7 +39506,7 @@ def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -37106,6 +39528,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -37113,12 +39537,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37133,7 +39562,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -37148,7 +39577,7 @@ def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -37173,6 +39602,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -37183,6 +39613,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -37190,7 +39621,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37205,11 +39640,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37219,7 +39654,7 @@ def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -37241,6 +39676,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -37248,12 +39685,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37264,7 +39706,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -37278,7 +39720,7 @@ def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -37302,6 +39744,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -37311,6 +39754,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -37318,7 +39762,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37333,11 +39781,11 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37347,8 +39795,8 @@ def reset_slot_configuration_slot( """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. + 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 @@ -37368,18 +39816,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37390,11 +39845,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37405,7 +39860,7 @@ def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -37415,10 +39870,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -37431,12 +39887,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -37444,7 +39903,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37455,10 +39918,10 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - def _restore_from_backup_blob_slot_initial( + def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37472,6 +39935,7 @@ def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -37481,6 +39945,7 @@ def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -37488,7 +39953,11 @@ def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37498,11 +39967,11 @@ def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob_slot( + def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37512,7 +39981,7 @@ def begin_restore_from_backup_blob_slot( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -37535,8 +40004,9 @@ def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -37549,6 +40019,7 @@ def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37570,12 +40041,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_slot_initial( + def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37589,6 +40059,7 @@ def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -37598,6 +40069,7 @@ def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -37605,7 +40077,11 @@ def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37615,11 +40091,11 @@ def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app_slot( + def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37629,7 +40105,7 @@ def begin_restore_from_deleted_app_slot( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -37651,8 +40127,9 @@ def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -37665,6 +40142,7 @@ def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37686,12 +40164,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_slot_initial( + def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37705,6 +40182,7 @@ def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -37714,6 +40192,7 @@ def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -37721,7 +40200,11 @@ def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37731,11 +40214,11 @@ def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot_slot( + def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37745,7 +40228,7 @@ def begin_restore_snapshot_slot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -37768,8 +40251,9 @@ def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -37782,6 +40266,7 @@ def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37803,10 +40288,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -37818,7 +40302,7 @@ def list_site_extensions_slot( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -37834,6 +40318,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37847,6 +40333,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -37859,6 +40346,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37876,7 +40364,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37890,7 +40382,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -37903,7 +40395,7 @@ def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -37925,6 +40417,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -37932,12 +40426,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37954,7 +40453,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -37971,6 +40470,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -37978,12 +40479,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -38002,7 +40508,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -38016,7 +40522,7 @@ def begin_install_site_extension_slot( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -38040,7 +40546,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -38053,6 +40560,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -38076,13 +40584,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38092,7 +40599,7 @@ def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -38114,6 +40621,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -38121,12 +40630,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -38137,7 +40651,7 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -38151,7 +40665,7 @@ def list_slot_differences_slot( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -38169,6 +40683,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -38185,6 +40700,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -38200,6 +40716,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -38219,7 +40736,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38233,9 +40754,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38249,6 +40770,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -38258,6 +40780,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -38265,7 +40788,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38275,11 +40802,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38289,7 +40816,7 @@ def begin_swap_slot( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -38312,8 +40839,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38326,6 +40854,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38347,10 +40876,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -38362,7 +40890,7 @@ def list_snapshots_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -38375,6 +40903,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38388,6 +40918,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -38400,6 +40931,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38417,7 +40949,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38431,7 +40967,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -38443,7 +40979,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -38456,6 +40992,8 @@ def list_snapshots_from_dr_secondary_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38469,6 +41007,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -38481,6 +41020,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38498,7 +41038,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38512,7 +41056,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control_slot( @@ -38524,7 +41068,7 @@ def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -38544,18 +41088,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38577,7 +41128,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -38594,6 +41145,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -38603,6 +41155,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -38610,7 +41163,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38631,7 +41188,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -38645,7 +41202,7 @@ def begin_create_or_update_source_control_slot( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -38669,8 +41226,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -38683,6 +41241,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38707,13 +41266,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38723,7 +41281,7 @@ def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -38732,7 +41290,7 @@ def delete_source_control_slot( :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: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -38745,19 +41303,26 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -38768,7 +41333,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -38782,7 +41347,7 @@ def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -38804,6 +41369,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -38813,6 +41379,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -38820,7 +41387,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38842,11 +41413,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38855,7 +41426,7 @@ def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -38875,18 +41446,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38897,7 +41475,7 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore def _start_network_trace_slot_initial( @@ -38916,12 +41494,15 @@ def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -38930,7 +41511,11 @@ def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38948,7 +41533,7 @@ def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace @@ -38964,7 +41549,7 @@ def begin_start_network_trace_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -38972,11 +41557,11 @@ def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -38991,7 +41576,8 @@ def begin_start_network_trace_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -39006,6 +41592,7 @@ def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -39029,13 +41616,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39044,7 +41630,7 @@ def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -39064,18 +41650,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39086,11 +41679,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def stop_network_trace_slot( + def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39099,7 +41692,7 @@ def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -39118,18 +41711,25 @@ def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39140,11 +41740,11 @@ def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39153,7 +41753,7 @@ def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -39172,18 +41772,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39194,11 +41801,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39207,7 +41814,7 @@ def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -39226,18 +41833,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -39248,7 +41862,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -39261,7 +41875,7 @@ def list_triggered_web_jobs_slot( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -39277,6 +41891,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39290,6 +41906,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -39302,6 +41919,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39319,7 +41937,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39333,7 +41955,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -39346,7 +41968,7 @@ def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39368,6 +41990,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39375,12 +41999,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39397,11 +42026,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39411,7 +42040,7 @@ def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39433,6 +42062,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39440,12 +42071,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39456,7 +42092,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -39470,7 +42106,7 @@ def list_triggered_web_job_history_slot( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -39488,6 +42124,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39502,6 +42140,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -39515,6 +42154,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39532,7 +42172,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39546,7 +42190,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -39560,8 +42204,7 @@ def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -39585,6 +42228,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -39593,12 +42238,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39615,11 +42265,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39629,7 +42279,7 @@ def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -39651,6 +42301,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39658,12 +42310,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39674,7 +42331,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -39688,7 +42345,7 @@ def list_usages_slot( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -39700,7 +42357,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -39709,6 +42366,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39722,6 +42381,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -39735,6 +42395,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -39753,7 +42414,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39767,7 +42432,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -39779,7 +42444,7 @@ def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -39799,18 +42464,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39825,7 +42497,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -39839,7 +42511,7 @@ def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -39861,6 +42533,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -39868,12 +42542,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39888,7 +42567,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -39904,8 +42583,8 @@ def create_or_update_vnet_connection_slot( """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). + 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 @@ -39929,6 +42608,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -39939,6 +42619,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -39946,7 +42627,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39961,11 +42646,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39975,8 +42660,7 @@ def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -39998,6 +42682,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -40005,12 +42691,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40021,7 +42712,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40037,8 +42728,8 @@ def update_vnet_connection_slot( """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). + 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 @@ -40062,6 +42753,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40072,6 +42764,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -40079,7 +42772,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40094,7 +42791,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40109,7 +42806,7 @@ def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -40133,6 +42830,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -40141,12 +42840,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40163,7 +42867,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40179,7 +42883,7 @@ def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40205,6 +42909,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40216,6 +42921,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -40223,7 +42929,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40238,7 +42948,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40254,7 +42964,7 @@ def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40280,6 +42990,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40291,6 +43002,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -40298,7 +43010,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40313,7 +43029,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40326,7 +43042,7 @@ def list_web_jobs_slot( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -40340,6 +43056,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40353,6 +43071,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -40365,6 +43084,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40382,7 +43102,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40396,7 +43120,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -40409,7 +43133,7 @@ def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -40431,6 +43155,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -40438,12 +43164,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40458,7 +43189,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -40471,7 +43202,7 @@ def list_slot_differences_from_production( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -40486,6 +43217,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -40501,6 +43233,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -40515,6 +43248,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -40534,7 +43268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40548,9 +43286,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40563,6 +43301,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -40571,6 +43310,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -40578,7 +43318,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -40588,11 +43332,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40601,7 +43345,7 @@ def begin_swap_slot_with_production( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -40621,8 +43365,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -40634,6 +43379,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -40655,10 +43401,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -40669,7 +43414,7 @@ def list_snapshots( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -40680,6 +43425,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40692,6 +43439,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -40703,6 +43451,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40720,7 +43469,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40734,7 +43487,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -40745,7 +43498,7 @@ def list_snapshots_from_dr_secondary( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -40756,6 +43509,8 @@ def list_snapshots_from_dr_secondary( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40768,6 +43523,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -40779,6 +43535,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40796,7 +43553,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40810,7 +43571,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control( @@ -40821,7 +43582,7 @@ def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -40838,17 +43599,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -40870,7 +43638,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -40886,6 +43654,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -40894,6 +43663,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -40901,7 +43671,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -40922,7 +43696,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -40935,7 +43709,7 @@ def begin_create_or_update_source_control( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -40956,8 +43730,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2020_12_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -40969,6 +43744,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -40993,13 +43769,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41008,13 +43783,13 @@ def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 additional_flags: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -41027,18 +43802,25 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -41049,7 +43831,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -41062,7 +43844,7 @@ def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -41081,6 +43863,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -41089,6 +43872,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -41096,7 +43880,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -41118,11 +43906,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41130,7 +43918,7 @@ def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -41147,17 +43935,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41168,7 +43963,7 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore def _start_network_trace_initial( @@ -41186,11 +43981,14 @@ def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -41199,7 +43997,11 @@ def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -41217,7 +44019,7 @@ def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace @@ -41232,17 +44034,17 @@ def begin_start_network_trace( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -41257,7 +44059,8 @@ def begin_start_network_trace( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2020_12_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -41271,6 +44074,7 @@ def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -41294,13 +44098,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41308,7 +44111,7 @@ def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -41325,17 +44128,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41346,11 +44156,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def stop_network_trace( + def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41358,7 +44168,7 @@ def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -41375,17 +44185,24 @@ def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -41396,11 +44213,11 @@ def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41408,7 +44225,7 @@ def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -41425,17 +44242,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41446,11 +44270,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41458,7 +44282,7 @@ def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -41475,17 +44299,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -41496,7 +44327,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -41508,7 +44339,7 @@ def list_triggered_web_jobs( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -41521,6 +44352,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41533,6 +44366,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -41544,6 +44378,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41561,7 +44396,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41575,7 +44414,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -41587,7 +44426,7 @@ def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -41606,18 +44445,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -41634,11 +44480,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41647,7 +44493,7 @@ def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -41666,18 +44512,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -41688,7 +44541,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -41701,7 +44554,7 @@ def list_triggered_web_job_history( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -41716,6 +44569,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41729,6 +44584,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -41741,6 +44597,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41758,7 +44615,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -41772,7 +44633,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -41785,8 +44646,7 @@ def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -41807,6 +44667,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -41814,12 +44676,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -41836,11 +44703,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41849,7 +44716,7 @@ def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -41868,18 +44735,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -41890,7 +44764,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -41903,7 +44777,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -41912,7 +44786,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -41921,6 +44795,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41933,6 +44809,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -41945,6 +44822,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -41963,7 +44841,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41977,7 +44859,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -41988,7 +44870,7 @@ def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -42005,17 +44887,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42030,7 +44919,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -42043,7 +44932,7 @@ def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -42062,18 +44951,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42088,7 +44984,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42103,8 +44999,8 @@ def create_or_update_vnet_connection( """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). + 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 @@ -42125,6 +45021,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -42134,6 +45031,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -42141,7 +45039,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42156,11 +45058,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42169,8 +45071,7 @@ def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -42189,18 +45090,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -42211,7 +45119,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42226,8 +45134,8 @@ def update_vnet_connection( """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). + 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 @@ -42248,6 +45156,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -42257,6 +45166,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -42264,7 +45174,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42279,7 +45193,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42293,7 +45207,7 @@ def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -42314,6 +45228,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -42321,12 +45237,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -42343,7 +45264,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42358,7 +45279,7 @@ def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -42381,6 +45302,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -42391,6 +45313,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -42398,7 +45321,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42413,7 +45340,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42428,7 +45355,7 @@ def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -42451,6 +45378,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -42461,6 +45389,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -42468,7 +45397,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42483,7 +45416,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42495,7 +45428,7 @@ def list_web_jobs( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -42506,6 +45439,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -42518,6 +45453,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -42529,6 +45465,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -42546,7 +45483,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42560,7 +45501,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -42572,7 +45513,7 @@ def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -42591,18 +45532,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42617,5 +45565,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_site_management_client_operations.py index 4e89c937d7c5..f747d8fc995d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,34 @@ def build_list_billing_meters_request( os_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') if os_type is not None: - query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,33 +231,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,29 +268,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -300,37 +305,38 @@ def build_list_geo_regions_request( linux_dynamic_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: - query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + _query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') if linux_dynamic_workers_enabled is not None: - query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -342,33 +348,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -379,29 +385,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -410,29 +417,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2020-12-01" + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -444,33 +452,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,34 +493,34 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -527,34 +535,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -569,34 +577,34 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-12-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -611,7 +619,7 @@ def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -624,14 +632,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -646,7 +661,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -657,7 +672,7 @@ def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2020_12_01.models.User @@ -672,11 +687,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -684,7 +701,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -699,7 +720,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -709,7 +730,7 @@ def list_source_controls( ) -> Iterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -718,6 +739,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -727,6 +750,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -735,6 +759,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -752,7 +777,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -766,7 +795,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -776,7 +805,7 @@ def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -791,15 +820,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -814,7 +850,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -826,7 +862,7 @@ def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -843,12 +879,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -856,7 +894,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -871,7 +913,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -883,11 +925,11 @@ def list_billing_meters( ) -> Iterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -895,6 +937,8 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -905,6 +949,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -916,6 +961,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -935,7 +981,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -949,7 +999,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace def check_name_availability( @@ -961,13 +1011,13 @@ def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2020_12_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -980,6 +1030,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -987,6 +1038,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -994,7 +1046,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1009,7 +1065,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -1019,7 +1075,7 @@ def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -1032,15 +1088,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1055,7 +1118,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -1069,24 +1132,26 @@ def list_geo_regions( ) -> Iterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2020_12_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1097,6 +1162,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1110,6 +1176,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1131,7 +1198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1145,7 +1216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1155,7 +1226,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> Iterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2020_12_01.models.NameIdentifier @@ -1165,6 +1236,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1178,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1190,6 +1263,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1209,7 +1283,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1223,7 +1301,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1232,7 +1310,7 @@ def list_premier_add_on_offers( ) -> Iterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -1241,6 +1319,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2020_12_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1251,6 +1331,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1260,6 +1341,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1277,7 +1359,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1291,7 +1377,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1300,7 +1386,7 @@ def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -1313,15 +1399,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1336,7 +1429,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1348,8 +1441,8 @@ def verify_hosting_environment_vnet( """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. + 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 @@ -1364,12 +1457,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1377,7 +1472,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,11 +1491,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1404,7 +1503,7 @@ def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -1421,6 +1520,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1428,6 +1528,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1435,7 +1536,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1446,7 +1551,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1458,7 +1563,7 @@ def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -1475,6 +1580,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1482,6 +1588,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1489,7 +1596,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1504,11 +1615,11 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1516,7 +1627,7 @@ def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -1533,6 +1644,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2020-12-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1540,6 +1652,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1547,7 +1660,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1558,5 +1675,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_configuration.py index 2ff1d2d02348..2e332694908a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2021-01-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-01-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_metadata.json index 5c992f73902c..2e08964fae83 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -123,192 +123,192 @@ "get_publishing_user" : { "sync": { "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_publishing_user(\n self,\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "update_publishing_user" : { "sync": { "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_01_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_01_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_01_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_01_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "user_details" }, "list_source_controls" : { "sync": { "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.SourceControlCollection\"]\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_source_controls(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_source_control" : { "sync": { "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type" }, "update_source_control" : { "sync": { "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type, request_message" }, "list_billing_meters" : { "sync": { "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.BillingMeterCollection\"]\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "billing_location, os_type" }, "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_01_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_01_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_01_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_01_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, "get_subscription_deployment_locations" : { "sync": { "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.DeploymentLocations\"\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs: Any\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2021_01_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2021_01_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2021_01_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2021_01_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" }, "list_site_identifiers_assigned_to_host_name" : { "sync": { "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.IdentifierCollection\"]\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_01_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_01_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_01_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_01_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name_identifier" }, "list_premier_add_on_offers" : { "sync": { "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.PremierAddOnOfferCollection\"]\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_premier_add_on_offers(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_skus" : { "sync": { "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SkuInfos\"\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def list_skus(\n self,\n **kwargs: Any\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "verify_hosting_environment_vnet" : { "sync": { "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.VnetValidationFailureDetails\"\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_01_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_01_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs: Any\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_01_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_01_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "parameters" }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" }, "validate" : { "sync": { "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ValidateResponse\"\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_01_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_01_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs: Any\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_01_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_01_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, validate_request" }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" } diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_web_site_management_client.py index 89347507108f..38a8dca4df8b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -71,8 +72,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2021-01-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -113,7 +117,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/_configuration.py index a8bc58d07302..52e54885bb61 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2021-01-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-01-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/_web_site_management_client.py index 05b43ea6e9be..261bacf577a3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -72,8 +73,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2021-01-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_certificate_orders_operations.py index 2c4a9de08c20..72a9d604770c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,17 +121,17 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -140,12 +147,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -153,7 +162,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -164,7 +177,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -175,7 +188,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -186,6 +199,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -197,6 +212,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -207,6 +223,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -224,7 +241,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +259,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -249,7 +270,7 @@ async def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -266,17 +287,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -291,7 +319,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -307,6 +335,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -315,6 +344,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -322,7 +352,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -340,7 +374,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -353,7 +387,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -376,8 +410,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -389,6 +424,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -413,13 +449,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -427,7 +462,7 @@ async def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -444,17 +479,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -465,7 +507,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -478,7 +520,7 @@ async def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -498,6 +540,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -506,6 +549,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -513,7 +557,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -532,7 +580,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -544,7 +592,7 @@ def list_certificates( ) -> AsyncIterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -557,6 +605,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +619,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -580,6 +631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -597,7 +649,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -611,7 +667,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -623,7 +679,7 @@ async def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -642,18 +698,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -668,7 +731,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -685,6 +748,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -694,6 +758,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -701,7 +766,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -719,7 +788,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -733,7 +802,7 @@ async def begin_create_or_update_certificate( ) -> AsyncLROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -757,8 +826,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -771,6 +841,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -795,13 +866,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -810,7 +880,7 @@ async def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -829,18 +899,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -851,7 +928,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -865,7 +942,7 @@ async def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -887,6 +964,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -896,6 +974,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -903,7 +982,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -922,11 +1005,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -935,7 +1018,7 @@ async def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -955,6 +1038,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -963,6 +1047,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -970,7 +1055,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -981,11 +1070,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -994,7 +1083,7 @@ async def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1014,6 +1103,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1022,6 +1112,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1029,7 +1120,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1040,11 +1135,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1052,7 +1147,7 @@ async def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1069,17 +1164,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1090,11 +1192,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1103,7 +1205,7 @@ async def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1122,6 +1224,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1130,6 +1233,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1137,7 +1241,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1148,7 +1256,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1161,7 +1269,7 @@ async def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1180,6 +1288,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1188,6 +1297,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1195,7 +1305,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,11 +1324,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1222,7 +1336,7 @@ async def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1239,17 +1353,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1260,7 +1381,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1272,7 +1393,7 @@ async def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -1289,17 +1410,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1442,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1326,7 +1454,7 @@ async def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -1343,17 +1471,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,5 +1503,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_environments_operations.py index 3e8710a4b934..5520f8a0c76b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -292,7 +320,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -305,7 +333,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -328,8 +356,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -341,6 +370,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -365,12 +395,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,18 +412,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -404,11 +440,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -417,7 +453,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -438,7 +474,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -450,6 +487,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -470,10 +508,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -485,7 +522,7 @@ async def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -505,6 +542,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -513,6 +551,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -520,7 +559,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -542,7 +585,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -554,7 +597,7 @@ def list_capacities( ) -> AsyncIterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -567,6 +610,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -579,6 +624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -590,6 +636,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -607,7 +654,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +672,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def get_vip_info( @@ -632,7 +683,7 @@ async def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -649,17 +700,24 @@ async def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +732,7 @@ async def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore async def _change_vnet_initial( @@ -690,6 +748,7 @@ async def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -698,6 +757,7 @@ async def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -705,7 +765,11 @@ async def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -723,7 +787,7 @@ async def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -736,7 +800,7 @@ async def begin_change_vnet( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -759,6 +823,7 @@ async def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -774,6 +839,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -788,6 +854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -807,7 +874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -818,7 +889,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -830,6 +901,7 @@ async def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -840,8 +912,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -857,10 +928,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -872,7 +942,7 @@ async def get_ase_v3_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Get networking configuration of an App Service Environment. - Description for Get networking configuration of an App Service Environment. + 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 @@ -889,17 +959,24 @@ async def get_ase_v3_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ase_v3_networking_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ase_v3_networking_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +991,7 @@ async def get_ase_v3_networking_configuration( return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + get_ase_v3_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace_async @@ -927,7 +1004,7 @@ async def update_ase_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Update networking configuration of an App Service Environment. - Description for Update networking configuration of an App Service Environment. + 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 @@ -947,6 +1024,7 @@ async def update_ase_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') @@ -955,6 +1033,7 @@ async def update_ase_networking_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ase_networking_configuration.metadata['url'], @@ -962,7 +1041,11 @@ async def update_ase_networking_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,7 +1060,7 @@ async def update_ase_networking_configuration( return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + update_ase_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace_async @@ -989,7 +1072,7 @@ async def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -1006,17 +1089,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,7 +1121,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -1044,7 +1134,7 @@ async def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -1063,18 +1153,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1089,7 +1186,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -1101,8 +1198,7 @@ def get_inbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -1115,6 +1211,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1127,6 +1225,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1138,6 +1237,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1155,7 +1255,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1169,7 +1273,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -1180,7 +1284,7 @@ def list_multi_role_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -1193,6 +1297,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1205,6 +1311,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -1216,6 +1323,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1233,7 +1341,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1247,7 +1359,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1258,7 +1370,7 @@ async def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -1275,17 +1387,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1300,7 +1419,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1316,6 +1435,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1324,6 +1444,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1331,7 +1452,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1349,7 +1474,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1362,7 +1487,7 @@ async def begin_create_or_update_multi_role_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -1384,8 +1509,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1397,6 +1523,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1421,10 +1548,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1436,7 +1562,7 @@ async def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -1455,6 +1581,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1463,6 +1590,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1470,7 +1598,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1489,7 +1621,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1503,8 +1635,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -1519,6 +1651,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1532,6 +1666,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1544,6 +1679,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1561,7 +1697,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1575,7 +1715,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1586,7 +1726,7 @@ def list_multi_role_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -1599,6 +1739,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1611,6 +1753,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1622,6 +1765,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1639,7 +1783,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1653,7 +1801,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1664,7 +1812,7 @@ def list_multi_role_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -1676,6 +1824,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1688,6 +1838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1699,6 +1850,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1716,7 +1868,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1730,7 +1886,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1741,7 +1897,7 @@ def list_multi_role_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -1753,6 +1909,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1765,6 +1923,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1776,6 +1935,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1793,7 +1953,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1807,7 +1971,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -1818,7 +1982,7 @@ async def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -1835,17 +1999,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1860,7 +2031,7 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -1872,8 +2043,7 @@ def get_outbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -1886,6 +2056,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1898,6 +2070,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1909,6 +2082,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1926,7 +2100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1940,7 +2118,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def get_private_endpoint_connection_list( @@ -1951,7 +2129,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoints associated with a hosting environment. - Description for Gets the list of private endpoints associated with a hosting environment. + 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 @@ -1964,6 +2142,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1976,6 +2156,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -1987,6 +2168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2004,7 +2186,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2018,7 +2204,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -2030,7 +2216,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2049,18 +2235,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2075,7 +2268,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -2092,6 +2285,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -2101,6 +2295,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -2108,7 +2303,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2126,7 +2325,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -2140,7 +2339,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -2165,8 +2364,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2179,6 +2379,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2203,10 +2404,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -2221,18 +2421,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2253,7 +2460,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -2266,7 +2473,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2286,7 +2493,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -2298,6 +2506,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2321,10 +2530,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -2335,7 +2543,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2352,17 +2560,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2377,11 +2592,11 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2389,7 +2604,7 @@ async def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -2406,17 +2621,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -2427,7 +2649,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -2442,17 +2664,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2470,7 +2699,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -2482,7 +2711,7 @@ async def begin_resume( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -2503,6 +2732,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2515,6 +2746,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -2526,6 +2758,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2543,7 +2776,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2554,7 +2791,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2565,6 +2802,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2574,8 +2812,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2591,10 +2828,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2606,7 +2842,7 @@ def list_app_service_plans( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -2619,6 +2855,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2631,6 +2869,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2642,6 +2881,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2659,7 +2899,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2673,7 +2917,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2685,13 +2929,14 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2699,6 +2944,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2711,6 +2958,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2723,6 +2971,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2741,7 +2990,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2755,7 +3008,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2769,17 +3022,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2797,7 +3057,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2809,7 +3069,7 @@ async def begin_suspend( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -2830,6 +3090,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2842,6 +3104,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2853,6 +3116,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2870,7 +3134,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2881,7 +3149,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2892,6 +3160,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2901,8 +3170,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2918,10 +3186,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2934,7 +3201,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -2943,7 +3210,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2952,6 +3219,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2964,6 +3233,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2976,6 +3246,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2994,7 +3265,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3008,7 +3283,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -3019,7 +3294,7 @@ def list_worker_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -3032,6 +3307,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3044,6 +3321,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -3055,6 +3333,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3072,7 +3351,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3086,7 +3369,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -3098,7 +3381,7 @@ async def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -3117,18 +3400,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3143,7 +3433,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -3160,6 +3450,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3169,6 +3460,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -3176,7 +3468,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3194,7 +3490,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -3208,7 +3504,7 @@ async def begin_create_or_update_worker_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -3232,8 +3528,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3246,6 +3543,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3270,10 +3568,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -3286,7 +3583,7 @@ async def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -3307,6 +3604,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3316,6 +3614,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -3323,7 +3622,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3342,7 +3645,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -3356,8 +3659,7 @@ def list_worker_pool_instance_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -3374,6 +3676,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3388,6 +3692,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3401,6 +3706,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3418,7 +3724,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3432,7 +3742,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -3444,7 +3754,7 @@ def list_web_worker_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -3459,6 +3769,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3472,6 +3784,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3484,6 +3797,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3501,7 +3815,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3515,7 +3833,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -3527,7 +3845,7 @@ def list_worker_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -3541,6 +3859,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3554,6 +3874,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3566,6 +3887,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3583,7 +3905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3597,7 +3923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3609,7 +3935,7 @@ def list_web_worker_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -3623,6 +3949,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3636,6 +3964,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3648,6 +3977,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3665,7 +3995,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3679,4 +4013,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_plans_operations.py index 946d2db67ab5..db05c9ee8ecb 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -131,7 +138,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -142,6 +149,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -153,6 +162,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -163,6 +173,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -180,7 +191,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +209,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -205,7 +220,7 @@ async def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -222,17 +237,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -249,7 +271,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -265,6 +287,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -273,6 +296,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -280,7 +304,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -298,7 +326,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -311,7 +339,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -332,8 +360,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -345,6 +374,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -369,13 +399,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,7 +412,7 @@ async def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -400,17 +429,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -421,7 +457,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -434,7 +470,7 @@ async def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -453,6 +489,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -461,6 +498,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -468,7 +506,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -487,7 +529,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -499,7 +541,7 @@ async def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -516,17 +558,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -541,7 +590,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -555,7 +604,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -576,6 +625,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -583,12 +634,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -603,11 +659,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -617,7 +673,7 @@ async def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -638,6 +694,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -645,12 +703,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -661,7 +724,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -675,7 +738,7 @@ async def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -696,6 +759,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -703,12 +768,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -723,7 +793,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -737,7 +807,7 @@ def list_web_apps_by_hybrid_connection( ) -> AsyncIterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -753,6 +823,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -767,6 +839,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -780,6 +853,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -797,7 +871,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -811,7 +889,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -822,7 +900,7 @@ async def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -839,17 +917,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,7 +949,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -876,7 +961,7 @@ def list_hybrid_connections( ) -> AsyncIterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -889,6 +974,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -901,6 +988,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -912,6 +1000,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -929,7 +1018,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -943,10 +1036,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -955,7 +1048,7 @@ async def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -976,18 +1069,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -998,7 +1098,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1013,7 +1113,7 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -1021,12 +1121,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1034,6 +1135,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1046,6 +1149,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1060,6 +1164,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1080,7 +1185,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1094,7 +1203,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1105,7 +1214,7 @@ async def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -1122,17 +1231,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1147,7 +1263,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1160,14 +1276,15 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1176,6 +1293,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1188,6 +1307,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1200,6 +1320,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1218,7 +1339,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1232,7 +1357,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1243,7 +1368,7 @@ async def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -1260,17 +1385,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1285,7 +1417,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1298,7 +1430,7 @@ async def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -1317,18 +1449,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1345,7 +1484,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1359,7 +1498,7 @@ async def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -1380,6 +1519,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1387,12 +1528,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1407,7 +1553,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1422,7 +1568,7 @@ async def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -1445,6 +1591,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1455,6 +1602,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1462,7 +1610,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1477,7 +1629,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1490,8 +1642,7 @@ async def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -1510,18 +1661,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1694,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1550,7 +1708,7 @@ async def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -1571,6 +1729,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1578,12 +1738,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1600,7 +1765,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1615,7 +1780,7 @@ async def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1638,6 +1803,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1648,6 +1814,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1655,7 +1822,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1672,11 +1843,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1686,7 +1857,7 @@ async def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -1707,6 +1878,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1714,12 +1887,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1730,7 +1908,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1745,7 +1923,7 @@ async def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1768,6 +1946,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1778,6 +1957,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1785,7 +1965,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -1802,11 +1986,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1815,7 +1999,7 @@ async def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -1834,18 +2018,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1856,5 +2047,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificate_orders_diagnostics_operations.py index b55e28cc4340..ec88fa2009aa 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificate_orders_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificate_orders_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ def list_app_service_certificate_order_detector_response( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """Microsoft.CertificateRegistration to get the list of detectors for this RP. - Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + 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 @@ -69,6 +68,8 @@ def list_app_service_certificate_order_detector_response( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_certificate_order_detector_response.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + list_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors"} # type: ignore @distributed_trace_async async def get_app_service_certificate_order_detector_response( @@ -138,8 +145,7 @@ async def get_app_service_certificate_order_detector_response( ) -> "_models.DetectorResponse": """Microsoft.CertificateRegistration call to get a detector response from App Lens. - Description for Microsoft.CertificateRegistration call to get a detector response from App - Lens. + 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 @@ -147,11 +153,11 @@ async def get_app_service_certificate_order_detector_response( :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. + :param start_time: The start time for detector response. Default value is None. :type start_time: ~datetime.datetime - :param end_time: The end time for the detector response. + :param end_time: The end time for the detector response. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: The time grain for the detector response. + :param time_grain: The time grain for the detector response. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -164,12 +170,15 @@ async def get_app_service_certificate_order_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_app_service_certificate_order_detector_response_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -178,7 +187,11 @@ async def get_app_service_certificate_order_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -193,5 +206,5 @@ async def get_app_service_certificate_order_detector_response( return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore + get_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificate_registration_provider_operations.py index b44a3c04d3e1..745efb35da89 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificates_operations.py index 73a2ee10d7ab..3699b082c54e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -54,10 +53,10 @@ def list( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :param filter: Return only information specified in the filter (using OData syntax). For - example: $filter=KeyVaultId eq 'KeyVaultId'. + example: $filter=KeyVaultId eq 'KeyVaultId'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -66,6 +65,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -76,6 +77,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list.metadata['url'], ) @@ -86,6 +88,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -104,7 +107,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -118,7 +125,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -128,7 +135,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -139,6 +146,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -150,6 +159,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -160,6 +170,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,7 +266,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -257,7 +279,7 @@ async def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -276,6 +298,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -284,6 +307,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -291,7 +315,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -306,11 +334,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -318,7 +346,7 @@ async def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -335,17 +363,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -356,7 +391,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -369,7 +404,7 @@ async def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -388,6 +423,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -396,6 +432,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -403,7 +440,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -418,5 +459,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_deleted_web_apps_operations.py index 4816797d5650..e317a562766c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -122,7 +129,7 @@ def list_by_location( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -133,6 +140,8 @@ def list_by_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace_async async def get_deleted_web_app_by_location( @@ -196,7 +211,7 @@ async def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -213,17 +228,24 @@ async def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,5 +260,5 @@ async def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_diagnostics_operations.py index 9ea62e06ff82..60945984cb26 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list_hosting_environment_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -138,7 +145,7 @@ async def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -146,11 +153,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -163,12 +170,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -177,7 +187,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +206,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -204,7 +218,7 @@ def list_site_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -217,6 +231,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -229,6 +245,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -240,6 +257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,7 +293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -286,7 +308,7 @@ async def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -294,11 +316,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -311,12 +333,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -325,7 +350,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,7 +369,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -352,7 +381,7 @@ def list_site_diagnostic_categories( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -365,6 +394,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -377,6 +408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -388,6 +420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -405,7 +438,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -419,7 +456,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -431,7 +468,7 @@ async def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -450,18 +487,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -476,7 +520,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -489,7 +533,7 @@ def list_site_analyses( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -504,6 +548,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -517,6 +563,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -529,6 +576,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -546,7 +594,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -560,7 +612,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -573,7 +625,7 @@ async def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -594,6 +646,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -601,12 +655,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +680,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -638,7 +697,7 @@ async def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -648,11 +707,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -665,6 +724,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -672,6 +733,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -680,7 +742,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -695,7 +761,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -708,7 +774,7 @@ def list_site_detectors( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -723,6 +789,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +804,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -748,6 +817,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -765,7 +835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -779,7 +853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector( @@ -792,7 +866,7 @@ async def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -813,6 +887,8 @@ async def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -820,12 +896,17 @@ async def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -840,7 +921,7 @@ async def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -857,7 +938,7 @@ async def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -867,11 +948,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -884,6 +965,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -891,6 +974,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -899,7 +983,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +1002,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -927,7 +1015,7 @@ def list_site_detector_responses_slot( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -942,6 +1030,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -955,6 +1045,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -967,6 +1058,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -984,7 +1076,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -998,7 +1094,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1014,7 +1110,7 @@ async def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1024,11 +1120,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1041,6 +1137,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1048,6 +1146,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1056,7 +1155,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1071,7 +1174,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1084,7 +1187,7 @@ def list_site_diagnostic_categories_slot( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1099,6 +1202,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1112,6 +1217,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1124,6 +1230,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1141,7 +1248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1155,7 +1266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1168,7 +1279,7 @@ async def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1189,6 +1300,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1196,12 +1309,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1216,7 +1334,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1230,7 +1348,7 @@ def list_site_analyses_slot( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1247,6 +1365,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1261,6 +1381,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1274,6 +1395,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1291,7 +1413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1305,7 +1431,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1319,7 +1445,7 @@ async def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1342,6 +1468,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1350,12 +1478,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1370,7 +1503,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1388,7 +1521,7 @@ async def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1400,11 +1533,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1417,6 +1550,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1425,6 +1560,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1433,7 +1569,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1448,7 +1588,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1462,7 +1602,7 @@ def list_site_detectors_slot( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1479,6 +1619,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1493,6 +1635,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1506,6 +1649,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1523,7 +1667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1537,7 +1685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_slot( @@ -1551,7 +1699,7 @@ async def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1574,6 +1722,8 @@ async def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1582,12 +1732,17 @@ async def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1602,7 +1757,7 @@ async def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -1620,7 +1775,7 @@ async def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1632,11 +1787,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1649,6 +1804,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1657,6 +1814,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1665,7 +1823,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1680,5 +1842,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_domain_registration_provider_operations.py index 4a496694310d..51a9dd0a6a99 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_domains_operations.py index a86b6a51ff07..d881f36949c2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ async def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2021_01_01.models.NameIdentifier @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -99,7 +104,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -109,7 +114,7 @@ def list( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) @@ -117,6 +122,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -127,6 +134,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -136,6 +144,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -153,7 +162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -167,7 +180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -176,7 +189,7 @@ async def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -189,15 +202,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +232,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -223,7 +243,7 @@ def list_recommendations( ) -> AsyncIterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2021_01_01.models.DomainRecommendationSearchParameters @@ -234,6 +254,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -247,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -259,6 +281,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -278,7 +301,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -292,7 +319,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -302,7 +329,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -312,6 +339,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -323,6 +352,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -333,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -350,7 +381,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -364,7 +399,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -375,7 +410,7 @@ async def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -392,17 +427,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +459,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -433,6 +475,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -441,6 +484,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -448,7 +492,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -466,7 +514,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -479,7 +527,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -500,8 +548,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -513,6 +562,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -537,13 +587,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -552,7 +601,7 @@ async def delete( ) -> None: """Delete a domain. - Description for 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 @@ -572,18 +621,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -594,7 +650,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -607,7 +663,7 @@ async def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -626,6 +682,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -634,6 +691,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -641,7 +699,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -660,7 +722,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -672,7 +734,7 @@ def list_ownership_identifiers( ) -> AsyncIterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -685,6 +747,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -697,6 +761,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -708,6 +773,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -725,7 +791,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -739,7 +809,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -751,7 +821,7 @@ async def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -770,18 +840,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -796,7 +873,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -811,8 +888,8 @@ async def create_or_update_ownership_identifier( """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. + 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 @@ -833,6 +910,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -842,6 +920,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -849,7 +928,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,11 +947,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -877,7 +960,7 @@ async def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -896,18 +979,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -918,7 +1008,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -933,8 +1023,8 @@ async def update_ownership_identifier( """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. + 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 @@ -955,6 +1045,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -964,6 +1055,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -971,7 +1063,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -986,11 +1082,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -998,7 +1094,7 @@ async def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1015,17 +1111,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1036,5 +1139,5 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_global_operations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_global_operations_operations.py index 66528c8a082a..4e7650a44270 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_global_operations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_global_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse @@ -52,7 +51,7 @@ async def get_deleted_web_app( ) -> "_models.DeletedSite": """Get deleted app for a subscription. - Description for Get deleted app for a subscription. + 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 @@ -67,16 +66,23 @@ async def get_deleted_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deleted_web_app_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -91,7 +97,7 @@ async def get_deleted_web_app( return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}"} # type: ignore @distributed_trace_async @@ -102,7 +108,7 @@ async def get_deleted_web_app_snapshots( ) -> List["_models.Snapshot"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + 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 @@ -117,16 +123,23 @@ async def get_deleted_web_app_snapshots( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deleted_web_app_snapshots_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_snapshots.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -141,11 +154,11 @@ async def get_deleted_web_app_snapshots( return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + get_deleted_web_app_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots"} # type: ignore @distributed_trace_async - async def get_subscription_operation_with_async_response( + async def get_subscription_operation_with_async_response( # pylint: disable=inconsistent-return-statements self, location: str, operation_id: str, @@ -153,7 +166,7 @@ async def get_subscription_operation_with_async_response( ) -> None: """Gets an operation in a subscription and given region. - Description for Gets an operation in a subscription and given region. + Gets an operation in a subscription and given region. :param location: Location name. :type location: str @@ -170,17 +183,24 @@ async def get_subscription_operation_with_async_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_subscription_operation_with_async_response_request( location=location, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_operation_with_async_response.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -191,5 +211,5 @@ async def get_subscription_operation_with_async_response( if cls: return cls(pipeline_response, None, {}) - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore + get_subscription_operation_with_async_response.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_kube_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_kube_environments_operations.py index 1c101f276c33..c694f36d53b6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_kube_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_kube_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,7 +54,7 @@ def list_by_subscription( ) -> AsyncIterable["_models.KubeEnvironmentCollection"]: """Get all Kubernetes Environments for a subscription. - Description for Get all Kubernetes Environments for a subscription. + Get all Kubernetes Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KubeEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_subscription.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.KubeEnvironmentCollection"]: """Get all the Kubernetes Environments in a resource group. - Description for Get all the Kubernetes Environments in a resource group. + 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.KubeEnvironment": """Get the properties of a Kubernetes Environment. - Description for Get the properties of a Kubernetes Environment. + 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -289,7 +317,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -302,7 +330,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.KubeEnvironment"]: """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -323,8 +351,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.KubeEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -336,6 +365,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -360,12 +390,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -377,17 +406,24 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -397,11 +433,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -409,7 +445,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete a Kubernetes Environment. - Description for Delete a Kubernetes Environment. + Delete a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -427,7 +463,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -438,6 +475,7 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -458,10 +496,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -473,7 +510,7 @@ async def update( ) -> "_models.KubeEnvironment": """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -493,6 +530,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentPatchResource') @@ -501,6 +539,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -508,7 +547,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -527,5 +570,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_provider_operations.py index 8e9af1d9c5c3..4f1ce18501e6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,9 +52,9 @@ def get_available_stacks( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_01_01.models.Enum10 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -115,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def get_function_app_stacks( @@ -125,9 +131,9 @@ def get_function_app_stacks( ) -> AsyncIterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions. - Description for Get available Function app frameworks and their versions. + Get available Function app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_01.models.Enum11 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -136,6 +142,8 @@ def get_function_app_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks.metadata['url'], ) @@ -154,6 +163,7 @@ def prepare_request(next_link=None): else: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + get_function_app_stacks.metadata = {'url': "/providers/Microsoft.Web/functionAppStacks"} # type: ignore @distributed_trace def get_function_app_stacks_for_location( @@ -197,11 +211,11 @@ def get_function_app_stacks_for_location( ) -> AsyncIterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions for location. - Description for Get available Function app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_01.models.Enum12 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -210,6 +224,8 @@ def get_function_app_stacks_for_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -220,6 +236,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks_for_location.metadata['url'], ) @@ -230,6 +247,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -248,7 +266,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -262,7 +284,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + get_function_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/functionAppStacks"} # type: ignore @distributed_trace def get_web_app_stacks_for_location( @@ -273,11 +295,11 @@ def get_web_app_stacks_for_location( ) -> AsyncIterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions for location. - Description for Get available Web app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_01.models.Enum13 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -286,6 +308,8 @@ def get_web_app_stacks_for_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -296,6 +320,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks_for_location.metadata['url'], ) @@ -306,6 +331,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -324,7 +350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,7 +368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + get_web_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/webAppStacks"} # type: ignore @distributed_trace def list_operations( @@ -348,8 +378,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -358,6 +388,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -367,6 +399,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -375,6 +408,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -392,7 +426,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -406,7 +444,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_web_app_stacks( @@ -416,9 +454,9 @@ def get_web_app_stacks( ) -> AsyncIterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions. - Description for Get available Web app frameworks and their versions. + Get available Web app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_01.models.Enum14 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -427,6 +465,8 @@ def get_web_app_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -436,6 +476,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks.metadata['url'], ) @@ -445,6 +486,7 @@ def prepare_request(next_link=None): else: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -463,7 +505,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -477,7 +523,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + get_web_app_stacks.metadata = {'url': "/providers/Microsoft.Web/webAppStacks"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -487,9 +533,9 @@ def get_available_stacks_on_prem( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_01_01.models.Enum15 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -498,6 +544,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -508,6 +556,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -518,6 +567,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -536,7 +586,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -550,4 +604,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_recommendations_operations.py index 91f4c6ff13ba..c5ffa3f4792d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,14 +54,14 @@ def list( ) -> AsyncIterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -125,16 +132,16 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -147,15 +154,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -166,19 +180,18 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -193,16 +206,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -213,7 +233,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -227,7 +247,7 @@ def list_history_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -238,7 +258,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -247,6 +267,8 @@ def list_history_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -259,6 +281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -272,6 +295,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -291,7 +315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -305,7 +333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -318,7 +346,7 @@ def list_recommended_rules_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -328,7 +356,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -337,6 +365,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -349,6 +379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -362,6 +393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -381,7 +413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,10 +431,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_hosting_environment( + async def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -407,7 +443,7 @@ async def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -426,18 +462,25 @@ async def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -448,11 +491,11 @@ async def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_hosting_environment( + async def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -461,7 +504,7 @@ async def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -480,18 +523,25 @@ async def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -502,7 +552,7 @@ async def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -517,7 +567,7 @@ async def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -526,10 +576,10 @@ async def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -542,12 +592,15 @@ async def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -555,7 +608,11 @@ async def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -570,11 +627,11 @@ async def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_hosting_environment( + async def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -584,7 +641,7 @@ async def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -605,19 +662,26 @@ async def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -628,7 +692,7 @@ async def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -642,7 +706,7 @@ def list_history_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -653,7 +717,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -662,6 +726,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -674,6 +740,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -687,6 +754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -706,7 +774,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -720,7 +792,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -733,7 +805,7 @@ def list_recommended_rules_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -743,7 +815,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -752,6 +824,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -764,6 +838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -777,6 +852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -796,7 +872,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -810,10 +890,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -821,7 +901,7 @@ async def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -838,17 +918,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -859,11 +946,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -871,7 +958,7 @@ async def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -888,17 +975,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -909,7 +1003,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -924,7 +1018,7 @@ async def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -933,10 +1027,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -949,12 +1043,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -962,7 +1059,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,11 +1078,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -990,7 +1091,7 @@ async def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1009,18 +1110,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,5 +1139,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_resource_health_metadata_operations.py index 87d3204c004d..c93492fe5617 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,8 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -134,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -155,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -197,8 +211,7 @@ def list_by_site( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -211,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -223,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -234,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -251,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -265,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -276,7 +297,7 @@ async def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -293,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -318,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -331,8 +359,7 @@ def list_by_site_slot( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -347,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -372,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -389,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -403,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -415,7 +450,7 @@ async def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -434,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_static_sites_operations.py index c539dfc0e5f4..8722a650ff15 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class StaticSitesOperations: +class StaticSitesOperations: # pylint: disable=too-many-public-methods """StaticSitesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -57,7 +56,7 @@ async def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -76,6 +75,7 @@ async def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -83,6 +83,7 @@ async def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -90,7 +91,11 @@ async def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -105,7 +110,7 @@ async def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -115,7 +120,7 @@ def list( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -124,6 +129,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -134,6 +141,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -143,6 +151,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -160,7 +169,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -174,7 +187,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -184,7 +197,7 @@ def get_static_sites_by_resource_group( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -195,6 +208,8 @@ def get_static_sites_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -206,6 +221,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -216,6 +232,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -233,7 +250,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -247,7 +268,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace_async async def get_static_site( @@ -258,7 +279,7 @@ async def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -275,17 +296,24 @@ async def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,7 +328,7 @@ async def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore async def _create_or_update_static_site_initial( @@ -316,6 +344,7 @@ async def _create_or_update_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -324,6 +353,7 @@ async def _create_or_update_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_initial.metadata['url'], @@ -331,7 +361,11 @@ async def _create_or_update_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -349,7 +383,7 @@ async def _create_or_update_static_site_initial( return deserialized - _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _create_or_update_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -362,8 +396,7 @@ async def begin_create_or_update_static_site( ) -> AsyncLROPoller["_models.StaticSiteARMResource"]: """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -385,8 +418,9 @@ async def begin_create_or_update_static_site( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.StaticSiteARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -398,6 +432,7 @@ async def begin_create_or_update_static_site( resource_group_name=resource_group_name, name=name, static_site_envelope=static_site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -422,12 +457,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore - async def _delete_static_site_initial( + async def _delete_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -439,17 +473,24 @@ async def _delete_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -459,11 +500,11 @@ async def _delete_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _delete_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site( + async def begin_delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -471,7 +512,7 @@ async def begin_delete_static_site( ) -> AsyncLROPoller[None]: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -489,7 +530,8 @@ async def begin_delete_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -500,6 +542,7 @@ async def begin_delete_static_site( raw_result = await self._delete_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -520,10 +563,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async async def update_static_site( @@ -535,8 +577,7 @@ async def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -555,6 +596,7 @@ async def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -563,6 +605,7 @@ async def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -570,7 +613,11 @@ async def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -589,7 +636,7 @@ async def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -602,7 +649,7 @@ def list_static_site_users( ) -> AsyncIterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -617,6 +664,8 @@ def list_static_site_users( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -630,6 +679,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -642,6 +692,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -659,7 +710,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -673,10 +728,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace_async - async def delete_static_site_user( + async def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -686,7 +741,7 @@ async def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -707,6 +762,8 @@ async def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -714,12 +771,17 @@ async def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -730,7 +792,7 @@ async def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace_async @@ -745,7 +807,7 @@ async def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -769,6 +831,7 @@ async def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -779,6 +842,7 @@ async def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -786,7 +850,11 @@ async def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -801,7 +869,7 @@ async def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -813,7 +881,7 @@ def get_static_site_builds( ) -> AsyncIterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -826,6 +894,8 @@ def get_static_site_builds( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -838,6 +908,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -849,6 +920,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -866,7 +938,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -880,7 +956,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace_async async def get_static_site_build( @@ -892,7 +968,7 @@ async def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -911,18 +987,25 @@ async def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1020,10 @@ async def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore - async def _delete_static_site_build_initial( + async def _delete_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -953,18 +1036,25 @@ async def _delete_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_static_site_build_request_initial( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_build_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -974,11 +1064,11 @@ async def _delete_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + _delete_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site_build( + async def begin_delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -987,7 +1077,7 @@ async def begin_delete_static_site_build( ) -> AsyncLROPoller[None]: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1007,7 +1097,8 @@ async def begin_delete_static_site_build( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1019,6 +1110,7 @@ async def begin_delete_static_site_build( resource_group_name=resource_group_name, name=name, environment_name=environment_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1039,10 +1131,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + begin_delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace_async async def create_or_update_static_site_build_app_settings( @@ -1055,7 +1146,7 @@ async def create_or_update_static_site_build_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site build. - Description for Creates or updates the app settings of a static site build. + 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 @@ -1076,6 +1167,7 @@ async def create_or_update_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1085,6 +1177,7 @@ async def create_or_update_static_site_build_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_app_settings.metadata['url'], @@ -1092,7 +1185,11 @@ async def create_or_update_static_site_build_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1107,7 +1204,7 @@ async def create_or_update_static_site_build_app_settings( return deserialized - create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + create_or_update_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1121,7 +1218,7 @@ async def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -1142,6 +1239,7 @@ async def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1151,6 +1249,7 @@ async def create_or_update_static_site_build_function_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -1158,7 +1257,11 @@ async def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1173,7 +1276,7 @@ async def create_or_update_static_site_build_function_app_settings( return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings"} # type: ignore @distributed_trace @@ -1186,7 +1289,7 @@ def list_static_site_build_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -1201,6 +1304,8 @@ def list_static_site_build_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1214,6 +1319,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -1226,6 +1332,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1243,7 +1350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1257,7 +1368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions"} # type: ignore @distributed_trace_async async def list_static_site_build_app_settings( @@ -1269,7 +1380,7 @@ async def list_static_site_build_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -1288,18 +1399,25 @@ async def list_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_build_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1432,7 @@ async def list_static_site_build_app_settings( return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + list_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings"} # type: ignore @distributed_trace_async @@ -1327,7 +1445,7 @@ async def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -1346,18 +1464,25 @@ async def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1372,7 +1497,7 @@ async def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -1385,8 +1510,7 @@ def get_user_provided_function_apps_for_static_site_build( ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site build. - Description for Gets the details of the user provided function apps registered with a static - site build. + 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 @@ -1401,6 +1525,8 @@ def get_user_provided_function_apps_for_static_site_build( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1414,6 +1540,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site_build.metadata['url'], ) request = _convert_request(request) @@ -1426,6 +1553,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1443,7 +1571,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1457,7 +1589,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps"} # type: ignore @distributed_trace_async async def get_user_provided_function_app_for_static_site_build( @@ -1470,8 +1602,7 @@ async def get_user_provided_function_app_for_static_site_build( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site build. - Description for Gets the details of the user provided function app registered with a static - site build. + 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 @@ -1492,6 +1623,8 @@ async def get_user_provided_function_app_for_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_user_provided_function_app_for_static_site_build_request( resource_group_name=resource_group_name, @@ -1499,12 +1632,17 @@ async def get_user_provided_function_app_for_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1519,7 +1657,7 @@ async def get_user_provided_function_app_for_static_site_build( return deserialized - get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore async def _register_user_provided_function_app_with_static_site_build_initial( @@ -1538,6 +1676,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -1548,6 +1687,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -1556,7 +1696,11 @@ async def _register_user_provided_function_app_with_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1574,7 +1718,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( return deserialized - _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async @@ -1590,7 +1734,7 @@ async def begin_register_user_provided_function_app_with_static_site_build( ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site build. - Description for Register a user provided function app with a static site build. + 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 @@ -1622,8 +1766,9 @@ async def begin_register_user_provided_function_app_with_static_site_build( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1638,6 +1783,7 @@ async def begin_register_user_provided_function_app_with_static_site_build( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1662,13 +1808,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async - async def detach_user_provided_function_app_from_static_site_build( + async def detach_user_provided_function_app_from_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1678,7 +1823,7 @@ async def detach_user_provided_function_app_from_static_site_build( ) -> None: """Detach the user provided function app from the static site build. - Description for Detach the user provided function app from the static site build. + 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 @@ -1699,6 +1844,8 @@ async def detach_user_provided_function_app_from_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_build_request( resource_group_name=resource_group_name, @@ -1706,12 +1853,17 @@ async def detach_user_provided_function_app_from_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1722,10 +1874,10 @@ async def detach_user_provided_function_app_from_static_site_build( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - async def _create_zip_deployment_for_static_site_build_initial( + async def _create_zip_deployment_for_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1739,6 +1891,7 @@ async def _create_zip_deployment_for_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -1748,6 +1901,7 @@ async def _create_zip_deployment_for_static_site_build_initial( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_build_initial.metadata['url'], @@ -1755,7 +1909,11 @@ async def _create_zip_deployment_for_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1765,11 +1923,11 @@ async def _create_zip_deployment_for_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace_async - async def begin_create_zip_deployment_for_static_site_build( + async def begin_create_zip_deployment_for_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1779,7 +1937,7 @@ async def begin_create_zip_deployment_for_static_site_build( ) -> AsyncLROPoller[None]: """Deploys zipped content to a specific environment of a static site. - Description for Deploys zipped content to a specific environment of a static site. + 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 @@ -1803,8 +1961,9 @@ async def begin_create_zip_deployment_for_static_site_build( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1817,6 +1976,7 @@ async def begin_create_zip_deployment_for_static_site_build( name=name, environment_name=environment_name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1838,10 +1998,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace_async async def create_or_update_static_site_app_settings( @@ -1853,7 +2012,7 @@ async def create_or_update_static_site_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site. - Description for Creates or updates the app settings of a static site. + 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 @@ -1872,6 +2031,7 @@ async def create_or_update_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1880,6 +2040,7 @@ async def create_or_update_static_site_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_app_settings.metadata['url'], @@ -1887,7 +2048,11 @@ async def create_or_update_static_site_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1902,7 +2067,7 @@ async def create_or_update_static_site_app_settings( return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + create_or_update_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1915,7 +2080,7 @@ async def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -1934,6 +2099,7 @@ async def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1942,6 +2108,7 @@ async def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -1949,7 +2116,11 @@ async def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1964,7 +2135,7 @@ async def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace_async @@ -1977,7 +2148,7 @@ async def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -1997,6 +2168,7 @@ async def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -2005,6 +2177,7 @@ async def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -2012,7 +2185,11 @@ async def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2027,7 +2204,7 @@ async def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -2039,7 +2216,7 @@ def list_static_site_custom_domains( ) -> AsyncIterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -2052,6 +2229,8 @@ def list_static_site_custom_domains( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2064,6 +2243,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -2075,6 +2255,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2092,7 +2273,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2106,7 +2291,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace_async async def get_static_site_custom_domain( @@ -2118,7 +2303,7 @@ async def get_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Gets an existing custom domain for a particular static site. - Description for Gets an existing custom domain for a particular static site. + 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 @@ -2137,18 +2322,25 @@ async def get_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2163,7 +2355,7 @@ async def get_static_site_custom_domain( return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + get_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore async def _create_or_update_static_site_custom_domain_initial( @@ -2180,6 +2372,7 @@ async def _create_or_update_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -2189,6 +2382,7 @@ async def _create_or_update_static_site_custom_domain_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_custom_domain_initial.metadata['url'], @@ -2196,7 +2390,11 @@ async def _create_or_update_static_site_custom_domain_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2214,7 +2412,7 @@ async def _create_or_update_static_site_custom_domain_initial( return deserialized - _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _create_or_update_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async @@ -2228,8 +2426,7 @@ async def begin_create_or_update_static_site_custom_domain( ) -> AsyncLROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -2255,8 +2452,9 @@ async def begin_create_or_update_static_site_custom_domain( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.StaticSiteCustomDomainOverviewARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2269,6 +2467,7 @@ async def begin_create_or_update_static_site_custom_domain( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2293,12 +2492,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - async def _delete_static_site_custom_domain_initial( + async def _delete_static_site_custom_domain_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2311,18 +2509,25 @@ async def _delete_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_static_site_custom_domain_request_initial( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_custom_domain_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2332,11 +2537,11 @@ async def _delete_static_site_custom_domain_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _delete_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site_custom_domain( + async def begin_delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2345,7 +2550,7 @@ async def begin_delete_static_site_custom_domain( ) -> AsyncLROPoller[None]: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2365,7 +2570,8 @@ async def begin_delete_static_site_custom_domain( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2377,6 +2583,7 @@ async def begin_delete_static_site_custom_domain( resource_group_name=resource_group_name, name=name, domain_name=domain_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2397,12 +2604,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - async def _validate_custom_domain_can_be_added_to_static_site_initial( + async def _validate_custom_domain_can_be_added_to_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2416,6 +2622,7 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -2425,6 +2632,7 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'], @@ -2432,7 +2640,11 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2442,11 +2654,11 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace_async - async def begin_validate_custom_domain_can_be_added_to_static_site( + async def begin_validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2456,7 +2668,7 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( ) -> AsyncLROPoller[None]: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -2480,8 +2692,9 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2494,6 +2707,7 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2515,12 +2729,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore - async def _detach_static_site_initial( + async def _detach_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2532,17 +2745,24 @@ async def _detach_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_detach_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._detach_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2552,11 +2772,11 @@ async def _detach_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + _detach_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace_async - async def begin_detach_static_site( + async def begin_detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2564,7 +2784,7 @@ async def begin_detach_static_site( ) -> AsyncLROPoller[None]: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2582,7 +2802,8 @@ async def begin_detach_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2593,6 +2814,7 @@ async def begin_detach_static_site( raw_result = await self._detach_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2613,10 +2835,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + begin_detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace def list_static_site_functions( @@ -2627,7 +2848,7 @@ def list_static_site_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -2640,6 +2861,8 @@ def list_static_site_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2652,6 +2875,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -2663,6 +2887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2680,7 +2905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2694,7 +2923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace_async async def list_static_site_app_settings( @@ -2705,7 +2934,7 @@ async def list_static_site_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2722,17 +2951,24 @@ async def list_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2747,7 +2983,7 @@ async def list_static_site_app_settings( return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + list_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings"} # type: ignore @distributed_trace_async @@ -2759,7 +2995,7 @@ async def list_static_site_configured_roles( ) -> "_models.StringList": """Lists the roles configured for the static site. - Description for Lists the roles configured for the static site. + 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 @@ -2776,17 +3012,24 @@ async def list_static_site_configured_roles( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_configured_roles_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_configured_roles.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2801,7 +3044,7 @@ async def list_static_site_configured_roles( return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + list_static_site_configured_roles.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles"} # type: ignore @distributed_trace_async @@ -2813,7 +3056,7 @@ async def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2830,17 +3073,24 @@ async def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2855,7 +3105,7 @@ async def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -2867,7 +3117,7 @@ async def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -2884,17 +3134,24 @@ async def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2909,7 +3166,7 @@ async def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace @@ -2921,7 +3178,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a static site. - Description for Gets the list of private endpoint connections associated with a static site. + 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 @@ -2934,6 +3191,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2946,6 +3205,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -2957,6 +3217,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2974,7 +3235,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2988,7 +3253,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -3000,7 +3265,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3019,18 +3284,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3045,7 +3317,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -3062,6 +3334,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -3071,6 +3344,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -3078,7 +3352,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3096,7 +3374,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -3110,7 +3388,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -3135,8 +3413,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3149,6 +3428,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3173,10 +3453,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -3191,18 +3470,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3223,7 +3509,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -3236,7 +3522,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3256,7 +3542,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -3268,6 +3555,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3291,10 +3579,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -3305,7 +3592,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3322,17 +3609,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,11 +3641,11 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources"} # type: ignore @distributed_trace_async - async def reset_static_site_api_key( + async def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3360,7 +3654,7 @@ async def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -3380,6 +3674,7 @@ async def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -3388,6 +3683,7 @@ async def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -3395,7 +3691,11 @@ async def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3406,7 +3706,7 @@ async def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore @distributed_trace @@ -3418,8 +3718,7 @@ def get_user_provided_function_apps_for_static_site( ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site. - Description for Gets the details of the user provided function apps registered with a static - site. + 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 @@ -3432,6 +3731,8 @@ def get_user_provided_function_apps_for_static_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3444,6 +3745,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site.metadata['url'], ) request = _convert_request(request) @@ -3455,6 +3757,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3472,7 +3775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3486,7 +3793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps"} # type: ignore @distributed_trace_async async def get_user_provided_function_app_for_static_site( @@ -3498,8 +3805,7 @@ async def get_user_provided_function_app_for_static_site( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site. - Description for Gets the details of the user provided function app registered with a static - site. + 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 @@ -3518,18 +3824,25 @@ async def get_user_provided_function_app_for_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_user_provided_function_app_for_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3544,7 +3857,7 @@ async def get_user_provided_function_app_for_static_site( return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore async def _register_user_provided_function_app_with_static_site_initial( @@ -3562,6 +3875,7 @@ async def _register_user_provided_function_app_with_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -3571,6 +3885,7 @@ async def _register_user_provided_function_app_with_static_site_initial( name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -3579,7 +3894,11 @@ async def _register_user_provided_function_app_with_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3597,7 +3916,7 @@ async def _register_user_provided_function_app_with_static_site_initial( return deserialized - _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async @@ -3612,7 +3931,7 @@ async def begin_register_user_provided_function_app_with_static_site( ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site. - Description for Register a user provided function app with a static site. + 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 @@ -3642,8 +3961,9 @@ async def begin_register_user_provided_function_app_with_static_site( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3657,6 +3977,7 @@ async def begin_register_user_provided_function_app_with_static_site( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3681,13 +4002,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async - async def detach_user_provided_function_app_from_static_site( + async def detach_user_provided_function_app_from_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3696,7 +4016,7 @@ async def detach_user_provided_function_app_from_static_site( ) -> None: """Detach the user provided function app from the static site. - Description for Detach the user provided function app from the static site. + 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 @@ -3715,18 +4035,25 @@ async def detach_user_provided_function_app_from_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3737,10 +4064,10 @@ async def detach_user_provided_function_app_from_static_site( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - async def _create_zip_deployment_for_static_site_initial( + async def _create_zip_deployment_for_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3753,6 +4080,7 @@ async def _create_zip_deployment_for_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -3761,6 +4089,7 @@ async def _create_zip_deployment_for_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_initial.metadata['url'], @@ -3768,7 +4097,11 @@ async def _create_zip_deployment_for_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3778,11 +4111,11 @@ async def _create_zip_deployment_for_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore @distributed_trace_async - async def begin_create_zip_deployment_for_static_site( + async def begin_create_zip_deployment_for_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3791,7 +4124,7 @@ async def begin_create_zip_deployment_for_static_site( ) -> AsyncLROPoller[None]: """Deploys zipped content to a static site. - Description for Deploys zipped content to a static site. + 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 @@ -3813,8 +4146,9 @@ async def begin_create_zip_deployment_for_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -3826,6 +4160,7 @@ async def begin_create_zip_deployment_for_static_site( resource_group_name=resource_group_name, name=name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3847,7 +4182,6 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_top_level_domains_operations.py index 3680ee54d8ba..428e5a879c54 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -122,7 +129,7 @@ async def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -137,16 +144,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -161,7 +175,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -173,7 +187,7 @@ def list_agreements( ) -> AsyncIterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -186,6 +200,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -200,6 +215,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -213,6 +229,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -232,7 +249,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -246,4 +267,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_web_apps_operations.py index d6edc5469eee..208b8bf56ce4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -137,6 +144,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -148,6 +157,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -159,6 +169,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -246,7 +268,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -262,6 +284,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -270,6 +293,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -277,7 +301,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -295,7 +323,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -309,8 +337,8 @@ async def begin_create_or_update( """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. + 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 @@ -331,8 +359,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -344,6 +373,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -368,13 +398,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -384,16 +413,16 @@ async def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -406,11 +435,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -418,7 +450,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -429,7 +465,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -443,8 +479,8 @@ async def update( """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. + 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 @@ -464,6 +500,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -472,6 +509,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -479,7 +517,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -498,7 +540,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -511,13 +553,13 @@ async def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -530,18 +572,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -556,11 +605,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -569,7 +618,7 @@ async def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -588,6 +637,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -596,6 +646,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -603,7 +654,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -614,7 +669,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -627,7 +682,7 @@ async def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -647,6 +702,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -655,6 +711,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -662,7 +719,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -677,7 +738,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -689,7 +750,7 @@ def list_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -702,6 +763,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -714,6 +777,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -725,6 +789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -742,7 +807,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -756,7 +825,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def get_backup_status( @@ -768,7 +837,7 @@ async def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -787,18 +856,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -813,11 +889,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -826,7 +902,7 @@ async def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -845,18 +921,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -867,7 +950,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -883,9 +966,9 @@ async def list_backup_status_secrets( 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. + 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 @@ -906,6 +989,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -915,6 +999,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -922,7 +1007,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1026,10 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - async def _restore_initial( + async def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -954,6 +1043,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -963,6 +1053,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -970,7 +1061,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -980,11 +1075,11 @@ async def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore( + async def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -994,7 +1089,7 @@ async def begin_restore( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -1016,8 +1111,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1030,6 +1126,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1051,10 +1148,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async async def get_basic_publishing_credentials_policies( @@ -1065,8 +1161,7 @@ async def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -1083,17 +1178,24 @@ async def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1108,7 +1210,7 @@ async def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async @@ -1120,7 +1222,7 @@ async def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -1137,17 +1239,24 @@ async def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1162,7 +1271,7 @@ async def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1175,7 +1284,7 @@ async def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -1195,6 +1304,7 @@ async def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1203,6 +1313,7 @@ async def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -1210,7 +1321,11 @@ async def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1225,7 +1340,7 @@ async def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1237,7 +1352,7 @@ async def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -1254,17 +1369,24 @@ async def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1279,7 +1401,7 @@ async def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -1292,7 +1414,7 @@ async def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -1312,6 +1434,7 @@ async def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1320,6 +1443,7 @@ async def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -1327,7 +1451,11 @@ async def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1342,7 +1470,7 @@ async def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -1354,7 +1482,7 @@ def list_configurations( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -1367,6 +1495,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1379,6 +1509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1390,6 +1521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1407,7 +1539,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1421,7 +1557,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1433,7 +1569,7 @@ async def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -1452,6 +1588,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1460,6 +1597,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1467,7 +1605,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1482,7 +1624,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1494,7 +1636,7 @@ async def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -1511,17 +1653,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1536,7 +1685,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1549,7 +1698,7 @@ async def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -1568,6 +1717,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1576,6 +1726,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1583,7 +1734,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1598,7 +1753,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1610,7 +1765,7 @@ async def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -1627,17 +1782,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1652,7 +1814,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1665,8 +1827,7 @@ async def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -1685,6 +1846,7 @@ async def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -1693,6 +1855,7 @@ async def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -1700,7 +1863,11 @@ async def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1715,7 +1882,7 @@ async def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -1727,7 +1894,7 @@ async def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -1744,17 +1911,24 @@ async def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1769,7 +1943,7 @@ async def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -1782,7 +1956,7 @@ async def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -1802,6 +1976,7 @@ async def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -1810,6 +1985,7 @@ async def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -1817,7 +1993,11 @@ async def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1832,7 +2012,7 @@ async def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -1844,7 +2024,7 @@ async def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -1861,17 +2041,24 @@ async def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1886,7 +2073,7 @@ async def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -1899,7 +2086,7 @@ async def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -1918,6 +2105,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -1926,6 +2114,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -1933,7 +2122,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1948,11 +2141,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1960,7 +2153,7 @@ async def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -1977,17 +2170,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1998,7 +2198,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -2010,7 +2210,7 @@ async def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -2027,17 +2227,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2052,7 +2259,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -2064,7 +2271,7 @@ def get_app_settings_key_vault_references( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -2077,6 +2284,8 @@ def get_app_settings_key_vault_references( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2089,6 +2298,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -2100,6 +2310,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2117,7 +2328,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2131,7 +2346,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async async def get_app_setting_key_vault_reference( @@ -2143,7 +2358,7 @@ async def get_app_setting_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2162,18 +2377,25 @@ async def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2188,7 +2410,7 @@ async def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -2200,7 +2422,7 @@ def get_site_connection_string_key_vault_references( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -2213,6 +2435,8 @@ def get_site_connection_string_key_vault_references( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2225,6 +2449,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -2236,6 +2461,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2253,7 +2479,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2267,7 +2497,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace_async async def get_site_connection_string_key_vault_reference( @@ -2279,7 +2509,7 @@ async def get_site_connection_string_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2298,18 +2528,25 @@ async def get_site_connection_string_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_connection_string_key_vault_reference_request( resource_group_name=resource_group_name, name=name, connection_string_key=connection_string_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2324,7 +2561,7 @@ async def get_site_connection_string_key_vault_reference( return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace_async @@ -2337,7 +2574,7 @@ async def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -2356,6 +2593,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -2364,6 +2602,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -2371,7 +2610,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2386,7 +2629,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -2398,7 +2641,7 @@ async def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -2415,17 +2658,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2440,7 +2690,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -2452,7 +2702,7 @@ async def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -2469,17 +2719,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2494,7 +2751,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2507,7 +2764,7 @@ async def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -2527,6 +2784,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -2535,6 +2793,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -2542,7 +2801,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2557,7 +2820,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2570,7 +2833,7 @@ async def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -2589,6 +2852,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -2597,6 +2861,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -2604,7 +2869,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2619,7 +2888,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -2631,7 +2900,7 @@ async def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -2648,17 +2917,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2673,7 +2949,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -2688,17 +2964,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2712,7 +2995,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -2724,7 +3007,7 @@ async def begin_list_publishing_credentials( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -2742,7 +3025,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2753,6 +3037,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2776,10 +3061,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2791,7 +3075,7 @@ async def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -2810,6 +3094,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2818,6 +3103,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2825,7 +3111,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2840,7 +3130,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2852,7 +3142,7 @@ async def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -2869,17 +3159,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2894,7 +3191,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2906,8 +3203,7 @@ async def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -2924,17 +3220,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2949,7 +3252,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2963,8 +3266,8 @@ async def update_slot_configuration_names( """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. + 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 @@ -2983,6 +3286,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -2991,6 +3295,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -2998,7 +3303,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3013,7 +3322,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -3026,8 +3335,8 @@ async def get_configuration( """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. + 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 @@ -3044,17 +3353,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3069,7 +3385,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -3082,7 +3398,7 @@ async def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -3101,6 +3417,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -3109,6 +3426,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -3116,7 +3434,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3131,7 +3453,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -3144,7 +3466,7 @@ async def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -3163,6 +3485,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -3171,6 +3494,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -3178,7 +3502,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3193,7 +3521,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -3206,8 +3534,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -3220,6 +3548,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3232,6 +3562,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -3243,6 +3574,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3260,7 +3592,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3274,7 +3610,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -3286,7 +3622,7 @@ async def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -3305,18 +3641,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3331,11 +3674,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3344,7 +3687,7 @@ async def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -3363,18 +3706,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3385,7 +3735,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -3397,7 +3747,7 @@ async def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -3414,17 +3764,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3440,7 +3797,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -3452,7 +3809,7 @@ async def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -3469,17 +3826,24 @@ async def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3495,7 +3859,7 @@ async def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -3507,7 +3871,7 @@ def list_continuous_web_jobs( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -3520,6 +3884,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3532,6 +3898,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -3543,6 +3910,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3560,7 +3928,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3574,7 +3946,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -3586,7 +3958,7 @@ async def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3605,18 +3977,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3633,11 +4012,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3646,7 +4025,7 @@ async def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3665,18 +4044,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3687,11 +4073,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3700,7 +4086,7 @@ async def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -3719,18 +4105,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3741,11 +4134,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3754,7 +4147,7 @@ async def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -3773,18 +4166,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -3795,7 +4195,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3807,7 +4207,7 @@ def list_deployments( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -3820,6 +4220,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3832,6 +4234,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3843,6 +4246,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3860,7 +4264,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3874,7 +4282,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3886,7 +4294,7 @@ async def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -3905,18 +4313,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3931,7 +4346,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3945,7 +4360,7 @@ async def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -3966,6 +4381,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -3975,6 +4391,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -3982,7 +4399,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3997,11 +4418,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4010,7 +4431,7 @@ async def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -4029,18 +4450,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4051,7 +4479,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -4064,7 +4492,7 @@ async def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -4084,18 +4512,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4110,7 +4545,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -4124,8 +4559,8 @@ async def discover_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. - 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. + 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 @@ -4145,6 +4580,7 @@ async def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -4153,6 +4589,7 @@ async def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -4160,7 +4597,11 @@ async def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4175,7 +4616,7 @@ async def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -4187,7 +4628,7 @@ def list_domain_ownership_identifiers( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -4200,6 +4641,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4212,6 +4655,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -4223,6 +4667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4240,7 +4685,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4254,7 +4703,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -4266,7 +4715,7 @@ async def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -4285,18 +4734,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4311,7 +4767,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4325,8 +4781,7 @@ async def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4347,6 +4802,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4356,6 +4812,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -4363,7 +4820,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4378,11 +4839,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4391,7 +4852,7 @@ async def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -4410,18 +4871,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4432,7 +4900,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4446,8 +4914,7 @@ async def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4468,6 +4935,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4477,6 +4945,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -4484,7 +4953,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4499,7 +4972,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4511,7 +4984,7 @@ async def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -4528,17 +5001,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4553,7 +5033,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -4569,6 +5049,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -4577,6 +5058,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -4584,7 +5066,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -4600,7 +5086,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -4613,7 +5099,7 @@ async def begin_create_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -4634,8 +5120,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -4647,6 +5134,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4671,10 +5159,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -4685,7 +5172,7 @@ async def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -4702,17 +5189,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4729,7 +5223,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -4741,7 +5235,7 @@ def list_functions( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -4754,6 +5248,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4766,6 +5262,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -4777,6 +5274,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4794,7 +5292,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4808,7 +5310,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -4819,7 +5321,7 @@ async def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -4836,17 +5338,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4861,7 +5370,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -4874,7 +5383,7 @@ async def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -4893,18 +5402,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -4921,7 +5437,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -4938,6 +5454,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -4947,6 +5464,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -4954,7 +5472,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4968,7 +5490,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4982,7 +5504,7 @@ async def begin_create_function( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -5005,8 +5527,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -5019,6 +5542,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5043,13 +5567,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5058,7 +5581,7 @@ async def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -5077,18 +5600,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5099,7 +5629,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -5114,7 +5644,7 @@ async def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -5137,6 +5667,7 @@ async def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5147,6 +5678,7 @@ async def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -5154,7 +5686,11 @@ async def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5173,11 +5709,11 @@ async def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret( + async def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5187,7 +5723,7 @@ async def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -5208,6 +5744,8 @@ async def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -5215,12 +5753,17 @@ async def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5231,7 +5774,7 @@ async def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -5244,7 +5787,7 @@ async def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -5263,18 +5806,25 @@ async def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5289,7 +5839,7 @@ async def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -5302,7 +5852,7 @@ async def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -5321,18 +5871,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5347,7 +5904,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -5359,7 +5916,7 @@ async def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -5376,17 +5933,24 @@ async def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5401,11 +5965,11 @@ async def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status( + async def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5413,7 +5977,7 @@ async def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -5430,17 +5994,24 @@ async def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5451,11 +6022,11 @@ async def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions( + async def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5463,7 +6034,7 @@ async def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -5480,17 +6051,24 @@ async def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5501,7 +6079,7 @@ async def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace_async @@ -5516,7 +6094,7 @@ async def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -5539,6 +6117,7 @@ async def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5549,6 +6128,7 @@ async def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -5556,7 +6136,11 @@ async def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5575,11 +6159,11 @@ async def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret( + async def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5589,7 +6173,7 @@ async def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -5610,6 +6194,8 @@ async def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -5617,12 +6203,17 @@ async def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -5633,7 +6224,7 @@ async def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -5645,7 +6236,7 @@ def list_host_name_bindings( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -5658,6 +6249,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5670,6 +6263,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -5681,6 +6275,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5698,7 +6293,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5712,7 +6311,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -5724,7 +6323,7 @@ async def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -5743,18 +6342,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5769,7 +6375,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5783,7 +6389,7 @@ async def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -5805,6 +6411,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -5814,6 +6421,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -5821,7 +6429,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5836,11 +6448,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5849,7 +6461,7 @@ async def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -5868,18 +6480,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5890,7 +6509,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5904,7 +6523,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -5925,6 +6544,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5932,12 +6553,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5952,7 +6578,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5967,7 +6593,7 @@ async def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -5990,6 +6616,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -6000,6 +6627,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -6007,7 +6635,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6022,11 +6654,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6036,7 +6668,7 @@ async def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -6057,6 +6689,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -6064,12 +6698,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6080,7 +6719,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6095,7 +6734,7 @@ async def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -6118,6 +6757,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -6128,6 +6768,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -6135,7 +6776,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6150,7 +6795,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6162,7 +6807,7 @@ async def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -6179,17 +6824,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6204,7 +6856,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -6216,8 +6868,7 @@ async def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -6234,17 +6885,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6259,7 +6917,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -6272,7 +6930,7 @@ async def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -6291,18 +6949,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6317,7 +6982,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6331,8 +6996,7 @@ async def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6353,6 +7017,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6362,6 +7027,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -6369,7 +7035,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6384,11 +7054,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6397,7 +7067,7 @@ async def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -6416,18 +7086,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6438,7 +7115,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6452,8 +7129,7 @@ async def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6474,6 +7150,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6483,6 +7160,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -6490,7 +7168,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6505,7 +7187,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -6517,7 +7199,7 @@ def list_instance_identifiers( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -6530,6 +7212,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6542,6 +7226,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -6553,6 +7238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6570,7 +7256,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6584,7 +7274,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_info( @@ -6596,7 +7286,7 @@ async def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -6615,18 +7305,25 @@ async def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6641,7 +7338,7 @@ async def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -6654,7 +7351,7 @@ async def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -6673,18 +7370,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6699,7 +7403,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -6716,6 +7420,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -6725,6 +7430,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -6732,7 +7438,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -6748,7 +7458,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -6762,7 +7472,7 @@ async def begin_create_instance_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -6785,8 +7495,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -6799,6 +7510,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6823,10 +7535,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -6838,7 +7549,7 @@ async def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -6857,18 +7568,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6885,7 +7603,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -6899,8 +7617,8 @@ def list_instance_processes( """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. + 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 @@ -6916,6 +7634,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6929,6 +7649,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -6941,6 +7662,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6958,7 +7680,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -6972,7 +7698,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -6985,8 +7711,7 @@ async def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7008,6 +7733,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -7015,12 +7742,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7037,11 +7769,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7052,8 +7784,8 @@ async def delete_instance_process( """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. + 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 @@ -7075,6 +7807,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -7082,12 +7816,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -7098,7 +7837,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -7112,8 +7851,7 @@ async def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -7135,6 +7873,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -7142,12 +7882,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7164,7 +7909,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -7179,8 +7924,8 @@ def list_instance_process_modules( """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. + 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 @@ -7198,6 +7943,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7212,6 +7959,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -7225,6 +7973,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7242,7 +7991,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7256,7 +8009,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -7270,8 +8023,7 @@ async def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7295,6 +8047,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -7303,12 +8057,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7325,7 +8084,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -7339,8 +8098,7 @@ def list_instance_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -7358,6 +8116,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7372,6 +8132,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -7385,6 +8146,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7402,7 +8164,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -7416,7 +8182,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable( @@ -7427,7 +8193,7 @@ async def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -7444,17 +8210,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7469,7 +8242,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -7481,7 +8254,7 @@ def list_site_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -7494,6 +8267,8 @@ def list_site_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7506,6 +8281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -7517,6 +8293,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7534,7 +8311,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7548,7 +8329,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers( @@ -7559,7 +8340,7 @@ async def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -7576,17 +8357,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7601,7 +8389,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore async def _migrate_storage_initial( @@ -7618,6 +8406,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -7626,6 +8415,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -7634,7 +8424,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7648,7 +8442,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -7662,7 +8456,7 @@ async def begin_migrate_storage( ) -> AsyncLROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -7686,8 +8480,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -7700,6 +8495,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7724,10 +8520,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -7742,6 +8537,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -7750,6 +8546,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -7757,7 +8554,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7771,7 +8572,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -7784,7 +8585,7 @@ async def begin_migrate_my_sql( ) -> AsyncLROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -7805,8 +8606,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -7818,6 +8620,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7842,10 +8645,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -7857,8 +8659,8 @@ async def get_migrate_my_sql_status( """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. + 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 @@ -7875,17 +8677,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7900,7 +8709,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -7912,7 +8721,7 @@ async def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -7929,17 +8738,24 @@ async def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7954,7 +8770,7 @@ async def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7970,9 +8786,9 @@ async def create_or_update_swift_virtual_network_connection_with_check( 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 + 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. @@ -7992,6 +8808,7 @@ async def create_or_update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -8000,6 +8817,7 @@ async def create_or_update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check.metadata['url'], @@ -8007,7 +8825,11 @@ async def create_or_update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8022,11 +8844,11 @@ async def create_or_update_swift_virtual_network_connection_with_check( return deserialized - create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network( + async def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8034,7 +8856,7 @@ async def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -8051,17 +8873,24 @@ async def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8072,7 +8901,7 @@ async def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -8085,7 +8914,7 @@ async def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -8104,18 +8933,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -8132,7 +8968,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -8145,8 +8981,7 @@ async def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8165,18 +9000,25 @@ async def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8195,7 +9037,7 @@ async def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8210,17 +9052,17 @@ async def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -8233,11 +9075,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8246,7 +9091,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8261,7 +9110,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_initial( @@ -8279,11 +9128,14 @@ async def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8292,7 +9144,11 @@ async def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8310,7 +9166,7 @@ async def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -8325,17 +9181,17 @@ async def begin_start_web_site_network_trace_operation( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -8351,7 +9207,8 @@ async def begin_start_web_site_network_trace_operation( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_01_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -8365,6 +9222,7 @@ async def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -8388,13 +9246,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace( + async def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8402,7 +9259,7 @@ async def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -8419,17 +9276,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8440,7 +9304,7 @@ async def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -8453,8 +9317,7 @@ async def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8473,18 +9336,25 @@ async def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8499,7 +9369,7 @@ async def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -8512,8 +9382,7 @@ async def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8532,18 +9401,25 @@ async def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8562,7 +9438,7 @@ async def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8575,8 +9451,7 @@ async def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8595,18 +9470,25 @@ async def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8621,11 +9503,11 @@ async def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8633,8 +9515,7 @@ async def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -8651,17 +9532,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8672,7 +9560,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -8685,7 +9573,7 @@ def list_perf_mon_counters( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -8693,7 +9581,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -8702,6 +9590,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8714,6 +9604,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -8726,6 +9617,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -8744,7 +9636,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8758,7 +9654,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -8769,7 +9665,7 @@ async def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -8786,17 +9682,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8811,7 +9714,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -8823,7 +9726,7 @@ async def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -8840,17 +9743,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8865,7 +9775,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -8878,7 +9788,7 @@ async def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -8897,18 +9807,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8923,7 +9840,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -8937,7 +9854,7 @@ async def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -8958,6 +9875,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -8967,6 +9885,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -8974,7 +9893,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8989,11 +9912,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9002,7 +9925,7 @@ async def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -9021,18 +9944,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9043,7 +9973,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9057,7 +9987,7 @@ async def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -9078,6 +10008,7 @@ async def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -9087,6 +10018,7 @@ async def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -9094,7 +10026,11 @@ async def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9109,7 +10045,7 @@ async def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9122,8 +10058,8 @@ async def get_private_access( """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. + 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 @@ -9140,17 +10076,24 @@ async def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9165,7 +10108,7 @@ async def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -9179,8 +10122,8 @@ async def put_private_access_vnet( """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. + 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 @@ -9199,6 +10142,7 @@ async def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -9207,6 +10151,7 @@ async def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -9214,7 +10159,11 @@ async def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9229,7 +10178,7 @@ async def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -9241,7 +10190,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -9254,6 +10203,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9266,6 +10217,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -9277,6 +10229,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9294,7 +10247,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9308,7 +10265,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -9320,7 +10277,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9339,18 +10296,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9365,7 +10329,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -9382,6 +10346,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -9391,6 +10356,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -9398,7 +10364,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9416,7 +10386,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -9430,7 +10400,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -9455,8 +10425,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -9469,6 +10440,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -9493,10 +10465,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -9511,18 +10482,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -9543,7 +10521,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -9556,7 +10534,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9576,7 +10554,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -9588,6 +10567,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -9611,10 +10591,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -9625,7 +10604,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9642,17 +10621,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9667,7 +10653,7 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -9680,8 +10666,8 @@ def list_processes( """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. + 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 @@ -9694,6 +10680,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9706,6 +10694,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -9717,6 +10706,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9734,7 +10724,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9748,7 +10742,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -9760,8 +10754,7 @@ async def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9780,18 +10773,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9808,11 +10808,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9822,8 +10822,8 @@ async def delete_process( """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. + 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 @@ -9842,18 +10842,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -9864,7 +10871,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -9877,8 +10884,7 @@ async def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -9897,18 +10903,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -9925,7 +10938,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -9939,8 +10952,8 @@ def list_process_modules( """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. + 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 @@ -9955,6 +10968,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9968,6 +10983,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -9980,6 +10996,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9997,7 +11014,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10011,7 +11032,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -10024,8 +11045,7 @@ async def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -10046,6 +11066,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -10053,12 +11075,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10075,7 +11102,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -10088,8 +11115,7 @@ def list_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -10104,6 +11130,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10117,6 +11145,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -10129,6 +11158,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10146,7 +11176,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -10160,7 +11194,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -10171,7 +11205,7 @@ def list_public_certificates( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -10184,6 +11218,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10196,6 +11232,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -10207,6 +11244,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10224,7 +11262,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10238,7 +11280,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -10250,7 +11292,7 @@ async def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -10269,18 +11311,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10295,7 +11344,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -10309,7 +11358,7 @@ async def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -10331,6 +11380,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -10340,6 +11390,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -10347,7 +11398,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10362,11 +11417,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10375,7 +11430,7 @@ async def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -10394,18 +11449,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -10416,7 +11478,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -10429,7 +11491,7 @@ async def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -10450,6 +11512,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -10458,6 +11521,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -10465,7 +11529,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10480,11 +11548,11 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10493,8 +11561,8 @@ async def reset_production_slot_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. + 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 @@ -10511,17 +11579,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10532,11 +11607,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10546,17 +11621,18 @@ async def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -10569,11 +11645,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -10581,7 +11660,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10592,10 +11675,10 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - async def _restore_from_backup_blob_initial( + async def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10608,6 +11691,7 @@ async def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -10616,6 +11700,7 @@ async def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -10623,7 +11708,11 @@ async def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10633,11 +11722,11 @@ async def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob( + async def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10646,7 +11735,7 @@ async def begin_restore_from_backup_blob( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -10666,8 +11755,9 @@ async def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10679,6 +11769,7 @@ async def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10700,12 +11791,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_initial( + async def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10718,6 +11808,7 @@ async def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -10726,6 +11817,7 @@ async def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -10733,7 +11825,11 @@ async def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10743,11 +11839,11 @@ async def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app( + async def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10756,7 +11852,7 @@ async def begin_restore_from_deleted_app( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -10776,8 +11872,9 @@ async def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10789,6 +11886,7 @@ async def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10810,12 +11908,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_initial( + async def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10828,6 +11925,7 @@ async def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -10836,6 +11934,7 @@ async def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -10843,7 +11942,11 @@ async def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10853,11 +11956,11 @@ async def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot( + async def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10866,7 +11969,7 @@ async def begin_restore_snapshot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -10887,8 +11990,9 @@ async def begin_restore_snapshot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10900,6 +12004,7 @@ async def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10921,10 +12026,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -10935,7 +12039,7 @@ def list_site_extensions( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -10948,6 +12052,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10960,6 +12066,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -10971,6 +12078,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10988,7 +12096,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11002,7 +12114,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -11014,7 +12126,7 @@ async def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -11033,18 +12145,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11061,7 +12180,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -11077,18 +12196,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -11107,7 +12233,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -11120,7 +12246,7 @@ async def begin_install_site_extension( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -11142,7 +12268,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -11154,6 +12281,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -11177,13 +12305,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11192,7 +12319,7 @@ async def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -11211,18 +12338,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -11233,7 +12367,7 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -11245,7 +12379,7 @@ def list_slots( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -11257,6 +12391,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11269,6 +12405,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -11280,6 +12417,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11297,7 +12435,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11311,7 +12453,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -11323,7 +12465,7 @@ async def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -11342,18 +12484,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -11370,7 +12519,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -11387,6 +12536,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -11396,6 +12546,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -11403,7 +12554,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11421,7 +12576,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11436,8 +12591,8 @@ async def begin_create_or_update_slot( """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. + 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 @@ -11461,8 +12616,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -11475,6 +12631,7 @@ async def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11499,13 +12656,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11516,7 +12672,7 @@ async def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -11525,10 +12681,10 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -11541,12 +12697,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -11554,7 +12713,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -11565,7 +12728,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11580,8 +12743,8 @@ async def update_slot( """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. + 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 @@ -11604,6 +12767,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -11613,6 +12777,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -11620,7 +12785,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11639,7 +12808,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11653,7 +12822,7 @@ async def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -11661,7 +12830,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -11674,19 +12843,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11701,11 +12877,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11715,7 +12891,7 @@ async def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -11737,6 +12913,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -11746,6 +12923,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -11753,7 +12931,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11764,7 +12946,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -11778,7 +12960,7 @@ async def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -11801,6 +12983,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11810,6 +12993,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -11817,7 +13001,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11832,7 +13020,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -11845,7 +13033,7 @@ def list_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -11861,6 +13049,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11874,6 +13064,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -11886,6 +13077,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11903,7 +13095,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11917,7 +13113,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def get_backup_status_slot( @@ -11930,7 +13126,7 @@ async def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -11952,6 +13148,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -11959,12 +13157,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11979,11 +13182,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11993,7 +13196,7 @@ async def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -12015,6 +13218,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -12022,12 +13227,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -12038,7 +13248,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -12055,9 +13265,9 @@ async def list_backup_status_secrets_slot( 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. + 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 @@ -12080,6 +13290,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12090,6 +13301,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -12097,7 +13309,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12112,10 +13328,10 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - async def _restore_slot_initial( + async def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12130,6 +13346,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -12140,6 +13357,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -12147,7 +13365,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -12157,11 +13379,11 @@ async def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore_slot( + async def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12172,7 +13394,7 @@ async def begin_restore_slot( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -12197,8 +13419,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -12212,6 +13435,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -12233,10 +13457,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async async def get_basic_publishing_credentials_policies_slot( @@ -12248,8 +13471,7 @@ async def get_basic_publishing_credentials_policies_slot( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -12268,18 +13490,25 @@ async def get_basic_publishing_credentials_policies_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_basic_publishing_credentials_policies_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12294,7 +13523,7 @@ async def get_basic_publishing_credentials_policies_slot( return deserialized - get_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async @@ -12307,7 +13536,7 @@ async def get_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -12326,18 +13555,25 @@ async def get_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ftp_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12352,7 +13588,7 @@ async def get_ftp_allowed_slot( return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -12366,7 +13602,7 @@ async def update_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -12388,6 +13624,7 @@ async def update_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -12397,6 +13634,7 @@ async def update_ftp_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed_slot.metadata['url'], @@ -12404,7 +13642,11 @@ async def update_ftp_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12419,7 +13661,7 @@ async def update_ftp_allowed_slot( return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -12432,7 +13674,7 @@ async def get_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -12451,18 +13693,25 @@ async def get_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_scm_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12477,7 +13726,7 @@ async def get_scm_allowed_slot( return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -12491,7 +13740,7 @@ async def update_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -12513,6 +13762,7 @@ async def update_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -12522,6 +13772,7 @@ async def update_scm_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed_slot.metadata['url'], @@ -12529,7 +13780,11 @@ async def update_scm_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12544,7 +13799,7 @@ async def update_scm_allowed_slot( return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -12557,7 +13812,7 @@ def list_configurations_slot( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -12573,6 +13828,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12586,6 +13843,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -12598,6 +13856,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12615,7 +13874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12629,7 +13892,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -12642,7 +13905,7 @@ async def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -12664,6 +13927,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -12673,6 +13937,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -12680,7 +13945,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12695,7 +13964,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -12708,7 +13977,7 @@ async def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -12728,18 +13997,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12754,7 +14030,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -12768,7 +14044,7 @@ async def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -12789,6 +14065,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -12798,6 +14075,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -12805,7 +14083,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12820,7 +14102,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -12833,7 +14115,7 @@ async def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -12853,18 +14135,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12879,7 +14168,7 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -12893,8 +14182,7 @@ async def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -12915,6 +14203,7 @@ async def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -12924,6 +14213,7 @@ async def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -12931,7 +14221,11 @@ async def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12946,7 +14240,7 @@ async def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -12959,7 +14253,7 @@ async def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -12979,18 +14273,25 @@ async def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13005,7 +14306,7 @@ async def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -13019,7 +14320,7 @@ async def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -13042,6 +14343,7 @@ async def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -13051,6 +14353,7 @@ async def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -13058,7 +14361,11 @@ async def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13073,7 +14380,7 @@ async def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -13086,7 +14393,7 @@ async def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -13106,18 +14413,25 @@ async def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13132,7 +14446,7 @@ async def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -13146,7 +14460,7 @@ async def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -13168,6 +14482,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -13177,6 +14492,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -13184,7 +14500,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13199,11 +14519,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13212,7 +14532,7 @@ async def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -13232,18 +14552,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13254,7 +14581,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -13267,7 +14594,7 @@ async def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -13287,18 +14614,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13313,7 +14647,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -13326,7 +14660,7 @@ def get_app_settings_key_vault_references_slot( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -13341,6 +14675,8 @@ def get_app_settings_key_vault_references_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13354,6 +14690,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -13366,6 +14703,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13383,7 +14721,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13397,7 +14739,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async async def get_app_setting_key_vault_reference_slot( @@ -13410,7 +14752,7 @@ async def get_app_setting_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -13431,6 +14773,8 @@ async def get_app_setting_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_app_setting_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -13438,12 +14782,17 @@ async def get_app_setting_key_vault_reference_slot( app_setting_key=app_setting_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13458,7 +14807,7 @@ async def get_app_setting_key_vault_reference_slot( return deserialized - get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -13471,7 +14820,7 @@ def get_site_connection_string_key_vault_references_slot( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -13486,6 +14835,8 @@ def get_site_connection_string_key_vault_references_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13499,6 +14850,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -13511,6 +14863,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13528,7 +14881,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13542,7 +14899,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace_async async def get_site_connection_string_key_vault_reference_slot( @@ -13555,7 +14912,7 @@ async def get_site_connection_string_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -13576,6 +14933,8 @@ async def get_site_connection_string_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_connection_string_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -13583,12 +14942,17 @@ async def get_site_connection_string_key_vault_reference_slot( connection_string_key=connection_string_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13603,7 +14967,7 @@ async def get_site_connection_string_key_vault_reference_slot( return deserialized - get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace_async @@ -13617,7 +14981,7 @@ async def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -13639,6 +15003,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -13648,6 +15013,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -13655,7 +15021,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13670,7 +15040,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -13683,7 +15053,7 @@ async def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -13703,18 +15073,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13729,7 +15106,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -13742,7 +15119,7 @@ async def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -13762,18 +15139,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13788,7 +15172,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -13802,7 +15186,7 @@ async def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -13825,6 +15209,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -13834,6 +15219,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -13841,7 +15227,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13856,7 +15246,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -13870,7 +15260,7 @@ async def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -13892,6 +15282,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -13901,6 +15292,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -13908,7 +15300,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13923,7 +15319,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -13936,7 +15332,7 @@ async def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -13956,18 +15352,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13982,7 +15385,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -13998,18 +15401,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14023,7 +15433,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -14036,7 +15446,7 @@ async def begin_list_publishing_credentials_slot( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -14057,7 +15467,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -14069,6 +15480,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -14092,10 +15504,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -14108,7 +15519,7 @@ async def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -14129,6 +15540,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -14138,6 +15550,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -14145,7 +15558,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14160,7 +15577,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -14173,7 +15590,7 @@ async def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -14192,18 +15609,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14218,7 +15642,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -14232,8 +15656,8 @@ async def get_configuration_slot( """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. + 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 @@ -14253,18 +15677,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14279,7 +15710,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -14293,7 +15724,7 @@ async def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -14315,6 +15746,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14324,6 +15756,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -14331,7 +15764,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14346,7 +15783,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -14360,7 +15797,7 @@ async def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -14382,6 +15819,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14391,6 +15829,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -14398,7 +15837,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14413,7 +15856,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -14427,8 +15870,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -14444,6 +15887,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14457,6 +15902,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -14469,6 +15915,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14486,7 +15933,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14500,7 +15951,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -14513,7 +15964,7 @@ async def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -14535,6 +15986,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -14542,12 +15995,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14562,11 +16020,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14576,7 +16034,7 @@ async def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -14598,6 +16056,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -14605,12 +16065,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -14621,7 +16086,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -14634,7 +16099,7 @@ async def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -14653,18 +16118,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14680,7 +16152,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -14693,7 +16165,7 @@ async def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -14712,18 +16184,25 @@ async def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14739,7 +16218,7 @@ async def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -14752,7 +16231,7 @@ def list_continuous_web_jobs_slot( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -14768,6 +16247,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14781,6 +16262,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -14793,6 +16275,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14810,7 +16293,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14824,7 +16311,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -14837,7 +16324,7 @@ async def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -14859,6 +16346,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -14866,12 +16355,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -14888,11 +16382,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14902,7 +16396,7 @@ async def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -14924,6 +16418,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -14931,12 +16427,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14947,11 +16448,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14961,7 +16462,7 @@ async def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -14983,6 +16484,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -14990,12 +16493,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15006,11 +16514,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15020,7 +16528,7 @@ async def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -15042,6 +16550,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15049,12 +16559,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15065,7 +16580,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -15078,7 +16593,7 @@ def list_deployments_slot( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -15094,6 +16609,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15107,6 +16624,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -15119,6 +16637,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15136,7 +16655,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15150,7 +16673,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -15163,7 +16686,7 @@ async def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -15185,6 +16708,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -15192,12 +16717,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15212,7 +16742,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -15227,7 +16757,7 @@ async def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -15251,6 +16781,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -15261,6 +16792,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -15268,7 +16800,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15283,11 +16819,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15297,7 +16833,7 @@ async def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -15319,6 +16855,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -15326,12 +16864,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15342,7 +16885,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -15356,7 +16899,7 @@ async def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -15379,6 +16922,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -15386,12 +16931,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15406,7 +16956,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -15421,8 +16971,8 @@ async def discover_backup_slot( """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. + 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 @@ -15445,6 +16995,7 @@ async def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -15454,6 +17005,7 @@ async def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -15461,7 +17013,11 @@ async def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15476,7 +17032,7 @@ async def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -15489,7 +17045,7 @@ def list_domain_ownership_identifiers_slot( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -15505,6 +17061,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15518,6 +17076,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -15530,6 +17089,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15547,7 +17107,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15561,7 +17125,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -15574,7 +17138,7 @@ async def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -15596,6 +17160,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -15603,12 +17169,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15623,7 +17194,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15638,8 +17209,7 @@ async def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -15663,6 +17233,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15673,6 +17244,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -15680,7 +17252,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15695,11 +17271,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15709,7 +17285,7 @@ async def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -15731,6 +17307,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -15738,12 +17316,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15754,7 +17337,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15769,8 +17352,7 @@ async def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -15794,6 +17376,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15804,6 +17387,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -15811,7 +17395,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15826,7 +17414,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15839,7 +17427,7 @@ async def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -15858,18 +17446,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15884,7 +17479,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -15901,6 +17496,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -15910,6 +17506,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -15917,7 +17514,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -15933,7 +17534,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -15947,7 +17548,7 @@ async def begin_create_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -15970,8 +17571,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -15984,6 +17586,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16008,10 +17611,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -16023,7 +17625,7 @@ async def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -16042,18 +17644,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16070,7 +17679,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -16083,7 +17692,7 @@ def list_instance_functions_slot( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -16098,6 +17707,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16111,6 +17722,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -16123,6 +17735,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16140,7 +17753,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16154,7 +17771,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -16166,7 +17783,7 @@ async def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -16185,18 +17802,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16211,7 +17835,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -16225,7 +17849,7 @@ async def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -16246,6 +17870,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -16253,12 +17879,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16275,7 +17906,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -16293,6 +17924,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -16303,6 +17935,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -16310,7 +17943,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -16324,7 +17961,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -16339,7 +17976,7 @@ async def begin_create_instance_function_slot( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -16364,8 +18001,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -16379,6 +18017,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16403,13 +18042,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16419,7 +18057,7 @@ async def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -16440,6 +18078,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -16447,12 +18087,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -16463,7 +18108,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -16479,7 +18124,7 @@ async def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -16504,6 +18149,7 @@ async def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -16515,6 +18161,7 @@ async def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -16522,7 +18169,11 @@ async def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -16541,11 +18192,11 @@ async def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret_slot( + async def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16556,7 +18207,7 @@ async def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -16579,6 +18230,8 @@ async def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -16587,12 +18240,17 @@ async def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -16603,7 +18261,7 @@ async def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -16617,7 +18275,7 @@ async def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -16638,6 +18296,8 @@ async def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -16645,12 +18305,17 @@ async def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16665,7 +18330,7 @@ async def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -16679,7 +18344,7 @@ async def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -16700,6 +18365,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -16707,12 +18374,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16727,7 +18399,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -16740,7 +18412,7 @@ async def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -16759,18 +18431,25 @@ async def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16785,11 +18464,11 @@ async def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status_slot( + async def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16798,7 +18477,7 @@ async def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -16817,18 +18496,25 @@ async def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16839,11 +18525,11 @@ async def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions_slot( + async def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16852,7 +18538,7 @@ async def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -16871,18 +18557,25 @@ async def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16893,7 +18586,7 @@ async def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace_async @@ -16909,7 +18602,7 @@ async def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -16934,6 +18627,7 @@ async def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -16945,6 +18639,7 @@ async def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -16952,7 +18647,11 @@ async def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -16971,11 +18670,11 @@ async def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret_slot( + async def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16986,7 +18685,7 @@ async def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -17009,6 +18708,8 @@ async def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -17017,12 +18718,17 @@ async def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -17033,7 +18739,7 @@ async def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -17046,7 +18752,7 @@ def list_host_name_bindings_slot( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -17062,6 +18768,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17075,6 +18783,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -17087,6 +18796,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17104,7 +18814,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17118,7 +18832,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -17131,7 +18845,7 @@ async def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -17153,6 +18867,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -17160,12 +18876,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17180,7 +18901,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -17195,7 +18916,7 @@ async def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -17220,6 +18941,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -17230,6 +18952,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -17237,7 +18960,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17252,11 +18979,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17266,7 +18993,7 @@ async def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -17288,6 +19015,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -17295,12 +19024,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -17311,7 +19045,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -17326,7 +19060,7 @@ async def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -17349,6 +19083,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -17357,12 +19093,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17377,7 +19118,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17393,7 +19134,7 @@ async def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -17418,6 +19159,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -17429,6 +19171,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -17436,7 +19179,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17451,11 +19198,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17466,7 +19213,7 @@ async def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -17489,6 +19236,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -17497,12 +19246,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17513,7 +19267,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17529,7 +19283,7 @@ async def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -17554,6 +19308,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -17565,6 +19320,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -17572,7 +19328,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17587,7 +19347,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17600,7 +19360,7 @@ async def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -17619,18 +19379,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17645,7 +19412,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -17658,8 +19425,7 @@ async def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -17679,18 +19445,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17705,7 +19478,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -17719,7 +19492,7 @@ async def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -17741,6 +19514,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -17748,12 +19523,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17768,7 +19548,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -17783,8 +19563,7 @@ async def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -17808,6 +19587,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -17818,6 +19598,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -17825,7 +19606,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17840,11 +19625,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17854,7 +19639,7 @@ async def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -17876,6 +19661,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -17883,12 +19670,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -17899,7 +19691,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -17914,8 +19706,7 @@ async def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -17939,6 +19730,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -17949,6 +19741,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -17956,7 +19749,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17971,7 +19768,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -17984,7 +19781,7 @@ def list_instance_identifiers_slot( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -18000,6 +19797,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18013,6 +19812,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -18025,6 +19825,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18042,7 +19843,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18056,7 +19861,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_info_slot( @@ -18069,7 +19874,7 @@ async def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -18091,6 +19896,8 @@ async def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -18098,12 +19905,17 @@ async def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18118,7 +19930,7 @@ async def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -18132,7 +19944,7 @@ async def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -18153,6 +19965,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -18160,12 +19974,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18180,7 +19999,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -18198,6 +20017,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -18208,6 +20028,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -18215,7 +20036,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -18231,7 +20056,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -18246,7 +20071,7 @@ async def begin_create_instance_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -18271,8 +20096,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -18286,6 +20112,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18310,10 +20137,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -18326,7 +20152,7 @@ async def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -18347,6 +20173,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -18354,12 +20182,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18376,7 +20209,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -18391,8 +20224,8 @@ def list_instance_processes_slot( """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. + 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 @@ -18411,6 +20244,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18425,6 +20260,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -18438,6 +20274,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18455,7 +20292,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18469,7 +20310,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -18483,8 +20324,7 @@ async def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -18509,6 +20349,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -18517,12 +20359,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18539,11 +20386,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18555,8 +20402,8 @@ async def delete_instance_process_slot( """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. + 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 @@ -18581,6 +20428,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -18589,12 +20438,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -18605,7 +20459,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -18620,8 +20474,7 @@ async def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -18646,6 +20499,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -18654,12 +20509,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18676,7 +20536,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -18692,8 +20552,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -18714,6 +20574,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18729,6 +20591,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -18743,6 +20606,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18760,7 +20624,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18774,7 +20642,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -18789,8 +20657,7 @@ async def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -18817,6 +20684,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -18826,12 +20695,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18848,7 +20722,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -18863,8 +20737,7 @@ def list_instance_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -18885,6 +20758,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18900,6 +20775,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -18914,6 +20790,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18931,7 +20808,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -18945,7 +20826,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable_slot( @@ -18957,7 +20838,7 @@ async def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -18977,18 +20858,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19003,7 +20891,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -19016,7 +20904,7 @@ def list_site_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -19032,6 +20920,8 @@ def list_site_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19045,6 +20935,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -19057,6 +20948,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19074,7 +20966,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19088,7 +20984,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers_slot( @@ -19100,7 +20996,7 @@ async def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -19119,18 +21015,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19145,7 +21048,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace_async @@ -19159,8 +21062,8 @@ async def get_migrate_my_sql_status_slot( """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. + 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 @@ -19179,18 +21082,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19205,7 +21115,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -19218,7 +21128,7 @@ async def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -19238,18 +21148,25 @@ async def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19264,11 +21181,11 @@ async def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network_slot( + async def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19277,7 +21194,7 @@ async def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -19297,18 +21214,25 @@ async def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19319,7 +21243,7 @@ async def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -19333,7 +21257,7 @@ async def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -19355,6 +21279,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -19362,12 +21288,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19384,7 +21315,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -19398,8 +21329,7 @@ async def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19421,6 +21351,8 @@ async def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -19428,12 +21360,17 @@ async def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19452,7 +21389,7 @@ async def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -19468,7 +21405,7 @@ async def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -19476,11 +21413,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -19493,12 +21430,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -19507,7 +21447,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19522,7 +21466,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_slot_initial( @@ -19541,12 +21485,15 @@ async def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -19555,7 +21502,11 @@ async def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19573,7 +21524,7 @@ async def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -19589,7 +21540,7 @@ async def begin_start_web_site_network_trace_operation_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -19597,11 +21548,11 @@ async def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -19617,7 +21568,8 @@ async def begin_start_web_site_network_trace_operation_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_01_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -19632,6 +21584,7 @@ async def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -19655,13 +21608,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace_slot( + async def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19670,7 +21622,7 @@ async def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -19689,18 +21641,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19711,7 +21670,7 @@ async def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -19725,8 +21684,7 @@ async def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19748,6 +21706,8 @@ async def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -19755,12 +21715,17 @@ async def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19775,7 +21740,7 @@ async def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -19789,8 +21754,7 @@ async def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19812,6 +21776,8 @@ async def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -19819,12 +21785,17 @@ async def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19843,7 +21814,7 @@ async def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -19857,8 +21828,7 @@ async def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19880,6 +21850,8 @@ async def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -19887,12 +21859,17 @@ async def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19907,11 +21884,11 @@ async def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19920,8 +21897,7 @@ async def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -19941,18 +21917,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19963,7 +21946,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -19977,7 +21960,7 @@ def list_perf_mon_counters_slot( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -19987,7 +21970,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -19996,6 +21979,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20009,6 +21994,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -20022,6 +22008,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -20040,7 +22027,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20054,7 +22045,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -20066,7 +22057,7 @@ async def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -20085,18 +22076,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20111,7 +22109,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -20124,7 +22122,7 @@ async def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -20144,18 +22142,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20170,7 +22175,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -20184,7 +22189,7 @@ async def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -20206,6 +22211,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -20213,12 +22220,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20233,7 +22245,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20248,7 +22260,7 @@ async def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -20272,6 +22284,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -20282,6 +22295,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -20289,7 +22303,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20304,11 +22322,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20318,7 +22336,7 @@ async def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -20340,6 +22358,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -20347,12 +22367,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20363,7 +22388,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20378,7 +22403,7 @@ async def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -20402,6 +22427,7 @@ async def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -20412,6 +22438,7 @@ async def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -20419,7 +22446,11 @@ async def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20434,7 +22465,7 @@ async def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20448,8 +22479,8 @@ async def get_private_access_slot( """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. + 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 @@ -20468,18 +22499,25 @@ async def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20494,7 +22532,7 @@ async def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -20509,8 +22547,8 @@ async def put_private_access_vnet_slot( """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. + 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 @@ -20531,6 +22569,7 @@ async def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -20540,6 +22579,7 @@ async def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -20547,7 +22587,11 @@ async def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20562,7 +22606,7 @@ async def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -20575,7 +22619,7 @@ def get_private_endpoint_connection_list_slot( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -20590,6 +22634,8 @@ def get_private_endpoint_connection_list_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20603,6 +22649,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list_slot.metadata['url'], ) request = _convert_request(request) @@ -20615,6 +22662,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20632,7 +22680,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20646,7 +22698,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection_slot( @@ -20659,7 +22711,7 @@ async def get_private_endpoint_connection_slot( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20680,6 +22732,8 @@ async def get_private_endpoint_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_endpoint_connection_slot_request( resource_group_name=resource_group_name, @@ -20687,12 +22741,17 @@ async def get_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20707,7 +22766,7 @@ async def get_private_endpoint_connection_slot( return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_slot_initial( @@ -20725,6 +22784,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -20735,6 +22795,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'], @@ -20742,7 +22803,11 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20760,7 +22825,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( return deserialized - _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -20775,7 +22840,7 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -20802,8 +22867,9 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -20817,6 +22883,7 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20841,10 +22908,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_slot_initial( self, @@ -20860,6 +22926,8 @@ async def _delete_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_private_endpoint_connection_slot_request_initial( resource_group_name=resource_group_name, @@ -20867,12 +22935,17 @@ async def _delete_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -20893,7 +22966,7 @@ async def _delete_private_endpoint_connection_slot_initial( return deserialized - _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -20907,7 +22980,7 @@ async def begin_delete_private_endpoint_connection_slot( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20929,7 +23002,8 @@ async def begin_delete_private_endpoint_connection_slot( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -20942,6 +23016,7 @@ async def begin_delete_private_endpoint_connection_slot( name=name, private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -20965,10 +23040,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources_slot( @@ -20980,7 +23054,7 @@ async def get_private_link_resources_slot( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20999,18 +23073,25 @@ async def get_private_link_resources_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_link_resources_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21025,7 +23106,7 @@ async def get_private_link_resources_slot( return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + get_private_link_resources_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources"} # type: ignore @distributed_trace @@ -21039,8 +23120,8 @@ def list_processes_slot( """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. + 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 @@ -21056,6 +23137,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21069,6 +23152,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -21081,6 +23165,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21098,7 +23183,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21112,7 +23201,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -21125,8 +23214,7 @@ async def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21148,6 +23236,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -21155,12 +23245,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21177,11 +23272,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21192,8 +23287,8 @@ async def delete_process_slot( """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. + 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 @@ -21215,6 +23310,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -21222,12 +23319,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21238,7 +23340,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -21252,8 +23354,7 @@ async def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -21275,6 +23376,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -21282,12 +23385,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21304,7 +23412,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -21319,8 +23427,8 @@ def list_process_modules_slot( """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. + 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 @@ -21338,6 +23446,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21352,6 +23462,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -21365,6 +23476,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21382,7 +23494,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21396,7 +23512,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -21410,8 +23526,7 @@ async def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21435,6 +23550,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -21443,12 +23560,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21465,7 +23587,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -21479,8 +23601,7 @@ def list_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -21498,6 +23619,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21512,6 +23635,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -21525,6 +23649,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21542,7 +23667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21556,7 +23685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -21568,7 +23697,7 @@ def list_public_certificates_slot( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -21584,6 +23713,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21597,6 +23728,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -21609,6 +23741,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21626,7 +23759,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21640,7 +23777,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -21653,7 +23790,7 @@ async def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -21675,6 +23812,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -21682,12 +23821,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21702,7 +23846,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -21717,7 +23861,7 @@ async def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -21742,6 +23886,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -21752,6 +23897,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -21759,7 +23905,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21774,11 +23924,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21788,7 +23938,7 @@ async def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -21810,6 +23960,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -21817,12 +23969,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -21833,7 +23990,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -21847,7 +24004,7 @@ async def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -21871,6 +24028,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -21880,6 +24038,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -21887,7 +24046,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21902,11 +24065,11 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21916,8 +24079,8 @@ async def reset_slot_configuration_slot( """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. + 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 @@ -21937,18 +24100,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21959,11 +24129,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21974,7 +24144,7 @@ async def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -21984,10 +24154,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -22000,12 +24171,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -22013,7 +24187,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22024,10 +24202,10 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - async def _restore_from_backup_blob_slot_initial( + async def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22041,6 +24219,7 @@ async def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -22050,6 +24229,7 @@ async def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -22057,7 +24237,11 @@ async def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22067,11 +24251,11 @@ async def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob_slot( + async def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22081,7 +24265,7 @@ async def begin_restore_from_backup_blob_slot( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -22104,8 +24288,9 @@ async def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22118,6 +24303,7 @@ async def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22139,12 +24325,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_slot_initial( + async def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22158,6 +24343,7 @@ async def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -22167,6 +24353,7 @@ async def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -22174,7 +24361,11 @@ async def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22184,11 +24375,11 @@ async def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app_slot( + async def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22198,7 +24389,7 @@ async def begin_restore_from_deleted_app_slot( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -22220,8 +24411,9 @@ async def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22234,6 +24426,7 @@ async def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22255,12 +24448,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_slot_initial( + async def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22274,6 +24466,7 @@ async def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -22283,6 +24476,7 @@ async def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -22290,7 +24484,11 @@ async def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22300,11 +24498,11 @@ async def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot_slot( + async def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22314,7 +24512,7 @@ async def begin_restore_snapshot_slot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -22337,8 +24535,9 @@ async def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22351,6 +24550,7 @@ async def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22372,10 +24572,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -22387,7 +24586,7 @@ def list_site_extensions_slot( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -22403,6 +24602,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22416,6 +24617,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -22428,6 +24630,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22445,7 +24648,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22459,7 +24666,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -22472,7 +24679,7 @@ async def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -22494,6 +24701,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -22501,12 +24710,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22523,7 +24737,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -22540,6 +24754,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -22547,12 +24763,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -22571,7 +24792,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -22585,7 +24806,7 @@ async def begin_install_site_extension_slot( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -22610,7 +24831,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -22623,6 +24845,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -22646,13 +24869,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22662,7 +24884,7 @@ async def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -22684,6 +24906,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -22691,12 +24915,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -22707,7 +24936,7 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -22721,7 +24950,7 @@ def list_slot_differences_slot( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -22739,6 +24968,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -22755,6 +24985,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -22770,6 +25001,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -22789,7 +25021,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22803,9 +25039,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22819,6 +25055,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -22828,6 +25065,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -22835,7 +25073,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22845,11 +25087,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22859,7 +25101,7 @@ async def begin_swap_slot( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -22882,8 +25124,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22896,6 +25139,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22917,10 +25161,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -22932,7 +25175,7 @@ def list_snapshots_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -22946,6 +25189,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22959,6 +25204,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -22971,6 +25217,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22988,7 +25235,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23002,7 +25253,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -23014,7 +25265,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -23028,6 +25279,8 @@ def list_snapshots_from_dr_secondary_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23041,6 +25294,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -23053,6 +25307,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23070,7 +25325,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23084,7 +25343,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -23096,7 +25355,7 @@ async def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -23116,18 +25375,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23149,7 +25415,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -23166,6 +25432,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23175,6 +25442,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -23182,7 +25450,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23203,7 +25475,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23217,7 +25489,7 @@ async def begin_create_or_update_source_control_slot( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -23242,8 +25514,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -23256,6 +25529,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23280,13 +25554,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23296,7 +25569,7 @@ async def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -23305,7 +25578,7 @@ async def delete_source_control_slot( :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: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -23318,19 +25591,26 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -23341,7 +25621,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23355,7 +25635,7 @@ async def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -23377,6 +25657,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23386,6 +25667,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -23393,7 +25675,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23415,11 +25701,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23428,7 +25714,7 @@ async def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -23448,18 +25734,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23470,7 +25763,7 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore async def _start_network_trace_slot_initial( @@ -23489,12 +25782,15 @@ async def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23503,7 +25799,11 @@ async def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23521,7 +25821,7 @@ async def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -23537,7 +25837,7 @@ async def begin_start_network_trace_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -23545,11 +25845,11 @@ async def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23565,7 +25865,8 @@ async def begin_start_network_trace_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_01_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -23580,6 +25881,7 @@ async def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23603,13 +25905,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23618,7 +25919,7 @@ async def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -23638,18 +25939,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23660,11 +25968,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace_slot( + async def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23673,7 +25981,7 @@ async def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -23692,18 +26000,25 @@ async def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23714,11 +26029,11 @@ async def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23727,7 +26042,7 @@ async def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -23746,18 +26061,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23768,11 +26090,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23781,7 +26103,7 @@ async def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -23800,18 +26122,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -23822,7 +26151,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -23835,7 +26164,7 @@ def list_triggered_web_jobs_slot( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -23851,6 +26180,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23864,6 +26195,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -23876,6 +26208,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23893,7 +26226,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23907,7 +26244,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -23920,7 +26257,7 @@ async def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -23942,6 +26279,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -23949,12 +26288,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23971,11 +26315,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23985,7 +26329,7 @@ async def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -24007,6 +26351,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24014,12 +26360,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24030,7 +26381,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -24044,7 +26395,7 @@ def list_triggered_web_job_history_slot( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -24062,6 +26413,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24076,6 +26429,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -24089,6 +26443,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24106,7 +26461,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24120,7 +26479,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -24134,8 +26493,7 @@ async def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -24159,6 +26517,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -24167,12 +26527,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24189,11 +26554,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24203,7 +26568,7 @@ async def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -24225,6 +26590,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24232,12 +26599,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24248,7 +26620,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -24262,7 +26634,7 @@ def list_usages_slot( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -24274,7 +26646,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -24283,6 +26655,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24296,6 +26670,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -24309,6 +26684,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24327,7 +26703,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24341,7 +26721,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -24353,7 +26733,7 @@ async def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -24373,18 +26753,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24399,7 +26786,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -24413,7 +26800,7 @@ async def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -24435,6 +26822,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -24442,12 +26831,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24462,7 +26856,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24478,8 +26872,8 @@ async def create_or_update_vnet_connection_slot( """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). + 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 @@ -24503,6 +26897,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -24513,6 +26908,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -24520,7 +26916,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24535,11 +26935,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24549,8 +26949,7 @@ async def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -24572,6 +26971,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -24579,12 +26980,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24595,7 +27001,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24611,8 +27017,8 @@ async def update_vnet_connection_slot( """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). + 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 @@ -24636,6 +27042,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -24646,6 +27053,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -24653,7 +27061,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24668,7 +27080,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24683,7 +27095,7 @@ async def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -24707,6 +27119,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -24715,12 +27129,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -24737,7 +27156,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -24753,7 +27172,7 @@ async def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -24779,6 +27198,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -24790,6 +27210,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -24797,7 +27218,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24812,7 +27237,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -24828,7 +27253,7 @@ async def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -24854,6 +27279,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -24865,6 +27291,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -24872,7 +27299,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24887,7 +27318,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -24900,7 +27331,7 @@ def list_web_jobs_slot( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -24915,6 +27346,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24928,6 +27361,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -24940,6 +27374,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24957,7 +27392,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24971,7 +27410,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -24984,7 +27423,7 @@ async def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -25006,6 +27445,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -25013,12 +27454,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25033,7 +27479,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -25046,7 +27492,7 @@ def list_slot_differences_from_production( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -25061,6 +27507,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -25076,6 +27523,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -25090,6 +27538,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -25109,7 +27558,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25123,9 +27576,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25138,6 +27591,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -25146,6 +27600,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -25153,7 +27608,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25163,11 +27622,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25176,7 +27635,7 @@ async def begin_swap_slot_with_production( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -25196,8 +27655,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25209,6 +27669,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25230,10 +27691,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -25244,7 +27704,7 @@ def list_snapshots( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -25256,6 +27716,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25268,6 +27730,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -25279,6 +27742,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25296,7 +27760,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25310,7 +27778,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -25321,7 +27789,7 @@ def list_snapshots_from_dr_secondary( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -25333,6 +27801,8 @@ def list_snapshots_from_dr_secondary( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25345,6 +27815,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -25356,6 +27827,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25373,7 +27845,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25387,7 +27863,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control( @@ -25398,7 +27874,7 @@ async def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -25415,17 +27891,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25447,7 +27930,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -25463,6 +27946,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -25471,6 +27955,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -25478,7 +27963,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25499,7 +27988,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -25512,7 +28001,7 @@ async def begin_create_or_update_source_control( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -25534,8 +28023,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -25547,6 +28037,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25571,13 +28062,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25586,13 +28076,13 @@ async def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 additional_flags: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -25605,18 +28095,25 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -25627,7 +28124,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -25640,7 +28137,7 @@ async def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -25659,6 +28156,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -25667,6 +28165,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -25674,7 +28173,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25696,11 +28199,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25708,7 +28211,7 @@ async def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -25725,17 +28228,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25746,7 +28256,7 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore async def _start_network_trace_initial( @@ -25764,11 +28274,14 @@ async def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -25777,7 +28290,11 @@ async def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25795,7 +28312,7 @@ async def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -25810,17 +28327,17 @@ async def begin_start_network_trace( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -25836,7 +28353,8 @@ async def begin_start_network_trace( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_01_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -25850,6 +28368,7 @@ async def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25873,13 +28392,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25887,7 +28405,7 @@ async def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -25904,17 +28422,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25925,11 +28450,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace( + async def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25937,7 +28462,7 @@ async def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -25954,17 +28479,24 @@ async def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -25975,11 +28507,11 @@ async def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25987,7 +28519,7 @@ async def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -26004,17 +28536,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26025,11 +28564,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26037,7 +28576,7 @@ async def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -26054,17 +28593,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -26075,7 +28621,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -26087,7 +28633,7 @@ def list_triggered_web_jobs( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -26100,6 +28646,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26112,6 +28660,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -26123,6 +28672,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26140,7 +28690,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26154,7 +28708,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -26166,7 +28720,7 @@ async def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -26185,18 +28739,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26213,11 +28774,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26226,7 +28787,7 @@ async def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -26245,18 +28806,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -26267,7 +28835,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -26280,7 +28848,7 @@ def list_triggered_web_job_history( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -26295,6 +28863,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26308,6 +28878,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -26320,6 +28891,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26337,7 +28909,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26351,7 +28927,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -26364,8 +28940,7 @@ async def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -26386,6 +28961,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -26393,12 +28970,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26415,11 +28997,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26428,7 +29010,7 @@ async def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -26447,18 +29029,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26469,7 +29058,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -26482,7 +29071,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -26491,7 +29080,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -26500,6 +29089,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26512,6 +29103,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -26524,6 +29116,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -26542,7 +29135,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26556,7 +29153,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -26567,7 +29164,7 @@ async def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -26584,17 +29181,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26609,7 +29213,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -26622,7 +29226,7 @@ async def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -26641,18 +29245,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26667,7 +29278,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -26682,8 +29293,8 @@ async def create_or_update_vnet_connection( """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). + 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 @@ -26704,6 +29315,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -26713,6 +29325,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -26720,7 +29333,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26735,11 +29352,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26748,8 +29365,7 @@ async def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -26768,18 +29384,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26790,7 +29413,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -26805,8 +29428,8 @@ async def update_vnet_connection( """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). + 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 @@ -26827,6 +29450,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -26836,6 +29460,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -26843,7 +29468,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26858,7 +29487,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -26872,7 +29501,7 @@ async def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -26893,6 +29522,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -26900,12 +29531,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26922,7 +29558,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -26937,7 +29573,7 @@ async def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -26960,6 +29596,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -26970,6 +29607,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -26977,7 +29615,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26992,7 +29634,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -27007,7 +29649,7 @@ async def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -27030,6 +29672,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -27040,6 +29683,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -27047,7 +29691,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27062,7 +29710,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -27074,7 +29722,7 @@ def list_web_jobs( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -27086,6 +29734,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27098,6 +29748,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -27109,6 +29760,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27126,7 +29778,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27140,7 +29796,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -27152,7 +29808,7 @@ async def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -27171,18 +29827,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27197,5 +29860,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_web_site_management_client_operations.py index 64d0c85f7a97..fb31258e790b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -33,7 +32,7 @@ async def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -68,7 +74,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -79,7 +85,7 @@ async def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2021_01_01.models.User @@ -94,11 +100,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -106,7 +114,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +133,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -131,7 +143,7 @@ def list_source_controls( ) -> AsyncIterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -140,6 +152,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -149,6 +163,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -157,6 +172,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -174,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -188,7 +208,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -198,7 +218,7 @@ async def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -213,15 +233,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -236,7 +263,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -248,7 +275,7 @@ async def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -265,12 +292,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -278,7 +307,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -293,7 +326,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -305,11 +338,11 @@ def list_billing_meters( ) -> AsyncIterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -318,6 +351,8 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -328,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -339,6 +375,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -358,7 +395,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -372,7 +413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace_async async def check_name_availability( @@ -384,13 +425,13 @@ async def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2021_01_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -403,6 +444,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -410,6 +452,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -417,7 +460,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -432,7 +479,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace_async @@ -442,7 +489,7 @@ async def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -455,15 +502,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -478,7 +532,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -492,18 +546,18 @@ def list_geo_regions( ) -> AsyncIterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2021_01_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -511,6 +565,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -521,6 +577,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -534,6 +591,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -555,7 +613,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -569,7 +631,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -579,7 +641,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> AsyncIterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2021_01_01.models.NameIdentifier @@ -590,6 +652,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -603,6 +666,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -615,6 +679,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -634,7 +699,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -648,7 +717,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -657,7 +726,7 @@ def list_premier_add_on_offers( ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -666,6 +735,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -676,6 +747,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -685,6 +757,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -702,7 +775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -716,7 +793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -725,7 +802,7 @@ async def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -738,15 +815,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -761,7 +845,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -773,8 +857,8 @@ async def verify_hosting_environment_vnet( """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. + 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.v2021_01_01.models.VnetParameters @@ -789,12 +873,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -802,7 +888,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -817,11 +907,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -829,7 +919,7 @@ async def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -846,6 +936,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -853,6 +944,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -860,7 +952,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -871,7 +967,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -883,7 +979,7 @@ async def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -900,6 +996,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -907,6 +1004,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -914,7 +1012,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -929,11 +1031,11 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -941,7 +1043,7 @@ async def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -958,6 +1060,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -965,6 +1068,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -972,7 +1076,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -983,5 +1091,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_certificate_orders_operations.py index 1bc3279db54d..e6d4b7a8bcfa 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,33 +68,33 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -105,30 +106,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -297,31 +301,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -333,10 +338,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -344,21 +350,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -373,12 +379,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -386,23 +392,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -416,10 +422,11 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -427,21 +434,21 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -456,12 +463,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -469,23 +476,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -501,35 +508,35 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -545,35 +552,35 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -586,31 +593,32 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -624,35 +632,35 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -668,35 +676,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -709,31 +717,32 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -744,31 +753,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -779,35 +789,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -836,7 +847,7 @@ def list( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -845,6 +856,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -855,6 +868,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -864,6 +878,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -881,7 +896,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -895,17 +914,17 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -921,12 +940,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -934,7 +955,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -945,7 +970,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -956,7 +981,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -967,6 +992,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -978,6 +1005,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -988,6 +1016,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1005,7 +1034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1019,7 +1052,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1030,7 +1063,7 @@ def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -1047,17 +1080,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1072,7 +1112,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1088,6 +1128,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1096,6 +1137,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1103,7 +1145,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1121,7 +1167,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1134,7 +1180,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -1157,8 +1203,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1170,6 +1217,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1194,13 +1242,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1208,7 +1255,7 @@ def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -1225,17 +1272,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1246,7 +1300,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1259,7 +1313,7 @@ def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -1279,6 +1333,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1287,6 +1342,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1294,7 +1350,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1313,7 +1373,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1325,7 +1385,7 @@ def list_certificates( ) -> Iterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -1338,6 +1398,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1350,6 +1412,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1361,6 +1424,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1378,7 +1442,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,7 +1460,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1404,7 +1472,7 @@ def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -1423,18 +1491,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1449,7 +1524,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1466,6 +1541,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1475,6 +1551,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1482,7 +1559,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1500,7 +1581,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1514,7 +1595,7 @@ def begin_create_or_update_certificate( ) -> LROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1538,8 +1619,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1552,6 +1634,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1576,13 +1659,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1591,7 +1673,7 @@ def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -1610,18 +1692,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1632,7 +1721,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1646,7 +1735,7 @@ def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1668,6 +1757,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1677,6 +1767,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1684,7 +1775,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1703,11 +1798,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1716,7 +1811,7 @@ def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -1736,6 +1831,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1744,6 +1840,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1751,7 +1848,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1762,11 +1863,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1775,7 +1876,7 @@ def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1795,6 +1896,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1803,6 +1905,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1810,7 +1913,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1821,11 +1928,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1833,7 +1940,7 @@ def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1850,17 +1957,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1871,11 +1985,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1884,7 +1998,7 @@ def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1903,6 +2017,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1911,6 +2026,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1918,7 +2034,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1929,7 +2049,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1942,7 +2062,7 @@ def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1961,6 +2081,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1969,6 +2090,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1976,7 +2098,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1991,11 +2117,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -2003,7 +2129,7 @@ def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -2020,17 +2146,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2041,7 +2174,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2053,7 +2186,7 @@ def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -2070,17 +2203,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2095,7 +2235,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2107,7 +2247,7 @@ def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -2124,17 +2264,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2149,5 +2296,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_environments_operations.py index a844b729a2cf..9f858490f30f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,33 +183,34 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -296,31 +301,32 @@ def build_get_vip_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -334,35 +340,35 @@ def build_change_vnet_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -375,31 +381,32 @@ def build_get_ase_v3_networking_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -413,35 +420,35 @@ def build_update_ase_networking_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -454,31 +461,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -490,10 +498,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -501,21 +510,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -526,31 +535,32 @@ def build_get_inbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -561,31 +571,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -596,31 +607,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -634,35 +646,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -678,35 +690,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -720,10 +732,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -731,21 +744,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -756,31 +769,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -791,31 +805,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -826,31 +841,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -861,31 +877,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -896,31 +913,32 @@ def build_get_outbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -931,31 +949,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -967,10 +986,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -978,21 +998,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1027,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1020,23 +1040,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1050,10 +1070,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1061,21 +1082,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1086,31 +1107,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1121,31 +1143,32 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1156,31 +1179,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1191,31 +1215,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1228,33 +1253,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1265,31 +1291,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1302,33 +1329,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1339,31 +1367,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1375,10 +1404,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1386,21 +1416,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1415,12 +1445,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1428,23 +1458,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1461,12 +1491,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1474,23 +1504,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1505,10 +1535,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1517,21 +1548,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1543,10 +1574,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1554,21 +1586,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1580,10 +1612,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1591,21 +1624,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1617,10 +1650,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1628,25 +1662,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1675,7 +1709,7 @@ def list( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -1684,6 +1718,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1694,6 +1730,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1703,6 +1740,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1720,7 +1758,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1734,7 +1776,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1744,7 +1786,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -1755,6 +1797,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1766,6 +1810,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1776,6 +1821,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1793,7 +1839,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1807,7 +1857,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1818,7 +1868,7 @@ def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -1835,17 +1885,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1860,7 +1917,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1876,6 +1933,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1884,6 +1942,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1891,7 +1950,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1912,7 +1975,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1925,7 +1988,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -1948,8 +2011,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1961,6 +2025,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1985,12 +2050,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2003,18 +2067,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -2024,11 +2095,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2037,7 +2108,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -2058,7 +2129,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2070,6 +2142,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2090,10 +2163,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -2105,7 +2177,7 @@ def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -2125,6 +2197,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -2133,6 +2206,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -2140,7 +2214,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -2162,7 +2240,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -2174,7 +2252,7 @@ def list_capacities( ) -> Iterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -2187,6 +2265,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2199,6 +2279,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -2210,6 +2291,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2227,7 +2309,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2241,7 +2327,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def get_vip_info( @@ -2252,7 +2338,7 @@ def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -2269,17 +2355,24 @@ def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2294,7 +2387,7 @@ def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore def _change_vnet_initial( @@ -2310,6 +2403,7 @@ def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -2318,6 +2412,7 @@ def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -2325,7 +2420,11 @@ def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2343,7 +2442,7 @@ def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2356,7 +2455,7 @@ def begin_change_vnet( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -2379,6 +2478,7 @@ def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -2394,6 +2494,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -2408,6 +2509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -2427,7 +2529,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2438,7 +2544,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2450,6 +2556,7 @@ def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2460,8 +2567,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -2477,10 +2583,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2492,7 +2597,7 @@ def get_ase_v3_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Get networking configuration of an App Service Environment. - Description for Get networking configuration of an App Service Environment. + 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 @@ -2509,17 +2614,24 @@ def get_ase_v3_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ase_v3_networking_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ase_v3_networking_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2534,7 +2646,7 @@ def get_ase_v3_networking_configuration( return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + get_ase_v3_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace @@ -2547,7 +2659,7 @@ def update_ase_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Update networking configuration of an App Service Environment. - Description for Update networking configuration of an App Service Environment. + 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 @@ -2567,6 +2679,7 @@ def update_ase_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') @@ -2575,6 +2688,7 @@ def update_ase_networking_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ase_networking_configuration.metadata['url'], @@ -2582,7 +2696,11 @@ def update_ase_networking_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2597,7 +2715,7 @@ def update_ase_networking_configuration( return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + update_ase_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace @@ -2609,7 +2727,7 @@ def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -2626,17 +2744,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2651,7 +2776,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2664,7 +2789,7 @@ def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -2683,18 +2808,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2709,7 +2841,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2721,8 +2853,7 @@ def get_inbound_network_dependencies_endpoints( ) -> Iterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -2735,6 +2866,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2747,6 +2880,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2758,6 +2892,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2775,7 +2910,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2789,7 +2928,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2800,7 +2939,7 @@ def list_multi_role_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -2812,6 +2951,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2824,6 +2965,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2835,6 +2977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2852,7 +2995,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2866,7 +3013,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2877,7 +3024,7 @@ def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -2894,17 +3041,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2919,7 +3073,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2935,6 +3089,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2943,6 +3098,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2950,7 +3106,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2968,7 +3128,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2981,7 +3141,7 @@ def begin_create_or_update_multi_role_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -3002,8 +3162,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3015,6 +3176,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3039,10 +3201,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -3054,7 +3215,7 @@ def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -3073,6 +3234,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -3081,6 +3243,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -3088,7 +3251,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3107,7 +3274,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -3121,8 +3288,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -3137,6 +3304,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3150,6 +3319,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3162,6 +3332,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3179,7 +3350,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3193,7 +3368,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -3204,7 +3379,7 @@ def list_multi_role_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -3217,6 +3392,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3229,6 +3406,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3240,6 +3418,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3257,7 +3436,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3271,7 +3454,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -3282,7 +3465,7 @@ def list_multi_role_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -3293,6 +3476,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3305,6 +3490,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3316,6 +3502,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3333,7 +3520,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,7 +3538,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -3358,7 +3549,7 @@ def list_multi_role_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -3369,6 +3560,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3381,6 +3574,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3392,6 +3586,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3409,7 +3604,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3423,7 +3622,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3434,7 +3633,7 @@ def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -3451,17 +3650,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3476,7 +3682,7 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -3488,8 +3694,7 @@ def get_outbound_network_dependencies_endpoints( ) -> Iterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -3502,6 +3707,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3514,6 +3721,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -3525,6 +3733,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3542,7 +3751,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3556,7 +3769,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def get_private_endpoint_connection_list( @@ -3567,7 +3780,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoints associated with a hosting environment. - Description for Gets the list of private endpoints associated with a hosting environment. + 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 @@ -3580,6 +3793,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3592,6 +3807,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -3603,6 +3819,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3620,7 +3837,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3634,7 +3855,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -3646,7 +3867,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3665,18 +3886,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3691,7 +3919,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -3708,6 +3936,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -3717,6 +3946,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -3724,7 +3954,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3742,7 +3976,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -3756,7 +3990,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -3781,8 +4015,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3795,6 +4030,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3819,10 +4055,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -3837,18 +4072,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3869,7 +4111,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -3882,7 +4124,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3902,7 +4144,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -3914,6 +4157,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3937,10 +4181,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -3951,7 +4194,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3968,17 +4211,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3993,11 +4243,11 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4005,7 +4255,7 @@ def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -4022,17 +4272,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -4043,7 +4300,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -4058,17 +4315,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4086,7 +4350,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -4098,7 +4362,7 @@ def begin_resume( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -4119,6 +4383,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4131,6 +4397,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -4142,6 +4409,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4159,7 +4427,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4170,7 +4442,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4181,6 +4453,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4190,8 +4463,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4207,10 +4479,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -4222,7 +4493,7 @@ def list_app_service_plans( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -4235,6 +4506,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4247,6 +4520,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -4258,6 +4532,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4275,7 +4550,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4289,7 +4568,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -4301,19 +4580,22 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4326,6 +4608,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -4338,6 +4621,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -4356,7 +4640,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4370,7 +4658,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -4384,17 +4672,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4412,7 +4707,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4424,7 +4719,7 @@ def begin_suspend( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -4445,6 +4740,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4457,6 +4754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -4468,6 +4766,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4485,7 +4784,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4496,7 +4799,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4507,6 +4810,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4516,8 +4820,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4533,10 +4836,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4549,7 +4851,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -4558,7 +4860,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -4567,6 +4869,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4579,6 +4883,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -4591,6 +4896,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -4609,7 +4915,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4623,7 +4933,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -4634,7 +4944,7 @@ def list_worker_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -4646,6 +4956,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4658,6 +4970,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -4669,6 +4982,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4686,7 +5000,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4700,7 +5018,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -4712,7 +5030,7 @@ def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -4731,18 +5049,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4757,7 +5082,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -4774,6 +5099,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4783,6 +5109,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -4790,7 +5117,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4808,7 +5139,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4822,7 +5153,7 @@ def begin_create_or_update_worker_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -4845,8 +5176,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4859,6 +5191,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4883,10 +5216,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4899,7 +5231,7 @@ def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -4920,6 +5252,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4929,6 +5262,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4936,7 +5270,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4955,7 +5293,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4969,8 +5307,7 @@ def list_worker_pool_instance_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -4987,6 +5324,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5001,6 +5340,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -5014,6 +5354,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5031,7 +5372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5045,7 +5390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -5057,7 +5402,7 @@ def list_web_worker_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -5072,6 +5417,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5085,6 +5432,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -5097,6 +5445,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5114,7 +5463,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5128,7 +5481,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -5140,7 +5493,7 @@ def list_worker_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -5153,6 +5506,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5166,6 +5521,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -5178,6 +5534,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5195,7 +5552,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5209,7 +5570,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -5221,7 +5582,7 @@ def list_web_worker_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -5234,6 +5595,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5247,6 +5610,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -5259,6 +5623,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5276,7 +5641,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5290,4 +5659,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_plans_operations.py index 20524a5e4c45..52107d411c24 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,31 +185,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +303,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -310,21 +316,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -337,10 +343,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -349,21 +356,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -376,10 +383,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -388,21 +396,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -415,10 +423,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -427,21 +436,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -452,31 +461,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -487,31 +497,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -524,33 +535,34 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -565,37 +577,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,31 +619,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -643,33 +657,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -680,31 +695,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -716,10 +732,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -727,21 +744,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -754,10 +771,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -766,21 +784,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -796,12 +814,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -810,23 +828,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -840,10 +858,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -851,21 +870,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -878,10 +897,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -890,21 +910,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -920,12 +940,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -934,23 +954,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -965,10 +985,11 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -977,21 +998,21 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1028,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1021,23 +1042,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1051,10 +1072,11 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1062,25 +1084,25 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1110,7 +1132,7 @@ def list( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -1123,6 +1145,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1133,6 +1157,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1143,6 +1168,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1161,7 +1187,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1175,7 +1205,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1185,7 +1215,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -1196,6 +1226,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1207,6 +1239,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1217,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1234,7 +1268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1248,7 +1286,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1259,7 +1297,7 @@ def get( ) -> Optional["_models.AppServicePlan"]: """Get an App Service plan. - Description for 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 @@ -1276,17 +1314,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -1303,7 +1348,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1319,6 +1364,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1327,6 +1373,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1334,7 +1381,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1352,7 +1403,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1365,7 +1416,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -1386,8 +1437,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1399,6 +1451,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1423,13 +1476,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1437,7 +1489,7 @@ def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -1454,17 +1506,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1475,7 +1534,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1488,7 +1547,7 @@ def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -1507,6 +1566,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1515,6 +1575,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1522,7 +1583,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1541,7 +1606,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1553,7 +1618,7 @@ def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -1570,17 +1635,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1595,7 +1667,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1609,7 +1681,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -1630,6 +1702,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1637,12 +1711,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1657,11 +1736,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1671,7 +1750,7 @@ def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -1692,6 +1771,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1699,12 +1780,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1715,7 +1801,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1729,7 +1815,7 @@ def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -1750,6 +1836,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1757,12 +1845,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1777,7 +1870,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1791,7 +1884,7 @@ def list_web_apps_by_hybrid_connection( ) -> Iterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -1806,6 +1899,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1820,6 +1915,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1833,6 +1929,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1850,7 +1947,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1864,7 +1965,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1875,7 +1976,7 @@ def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -1892,17 +1993,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1917,7 +2025,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1929,7 +2037,7 @@ def list_hybrid_connections( ) -> Iterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -1942,6 +2050,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1954,6 +2064,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -1965,6 +2076,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1982,7 +2094,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1996,10 +2112,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2008,7 +2124,7 @@ def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -2029,18 +2145,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2051,7 +2174,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2066,7 +2189,7 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -2074,18 +2197,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2098,6 +2224,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2112,6 +2239,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2132,7 +2260,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2146,7 +2278,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2157,7 +2289,7 @@ def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -2174,17 +2306,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2199,7 +2338,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2212,14 +2351,15 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2228,6 +2368,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2240,6 +2382,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2252,6 +2395,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2270,7 +2414,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2284,7 +2432,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2295,7 +2443,7 @@ def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -2312,17 +2460,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2337,7 +2492,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2350,7 +2505,7 @@ def get_vnet_from_server_farm( ) -> Optional["_models.VnetInfo"]: """Get a Virtual Network associated with an App Service plan. - Description for Get a Virtual Network associated with an App Service plan. + 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 @@ -2369,18 +2524,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2397,7 +2559,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2411,7 +2573,7 @@ def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -2432,6 +2594,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2439,12 +2603,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2459,7 +2628,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2474,7 +2643,7 @@ def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -2497,6 +2666,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2507,6 +2677,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2514,7 +2685,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2529,7 +2704,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2542,8 +2717,7 @@ def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -2562,18 +2736,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2588,7 +2769,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2602,7 +2783,7 @@ def get_route_for_vnet( ) -> Optional[List["_models.VnetRoute"]]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -2623,6 +2804,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2630,12 +2813,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2652,7 +2840,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2667,7 +2855,7 @@ def create_or_update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2690,6 +2878,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2700,6 +2889,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2707,7 +2897,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2724,11 +2918,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2738,7 +2932,7 @@ def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -2759,6 +2953,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2766,12 +2962,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -2782,7 +2983,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2797,7 +2998,7 @@ def update_vnet_route( ) -> Optional["_models.VnetRoute"]: """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2820,6 +3021,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2830,6 +3032,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -2837,7 +3040,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 400, 404]: @@ -2854,11 +3061,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2867,7 +3074,7 @@ def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -2886,18 +3093,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2908,5 +3122,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificate_orders_diagnostics_operations.py index 96ba410a87da..51eec4ef2b22 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificate_orders_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificate_orders_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_app_service_certificate_order_detector_response_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_app_service_certificate_order_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -84,27 +86,27 @@ def build_get_app_service_certificate_order_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,7 +141,7 @@ def list_app_service_certificate_order_detector_response( ) -> Iterable["_models.DetectorResponseCollection"]: """Microsoft.CertificateRegistration to get the list of detectors for this RP. - Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + 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 @@ -152,6 +154,8 @@ def list_app_service_certificate_order_detector_response( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_certificate_order_detector_response.metadata['url'], ) request = _convert_request(request) @@ -175,6 +180,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -192,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -206,7 +216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + list_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors"} # type: ignore @distributed_trace def get_app_service_certificate_order_detector_response( @@ -221,8 +231,7 @@ def get_app_service_certificate_order_detector_response( ) -> "_models.DetectorResponse": """Microsoft.CertificateRegistration call to get a detector response from App Lens. - Description for Microsoft.CertificateRegistration call to get a detector response from App - Lens. + 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 @@ -230,11 +239,11 @@ def get_app_service_certificate_order_detector_response( :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. + :param start_time: The start time for detector response. Default value is None. :type start_time: ~datetime.datetime - :param end_time: The end time for the detector response. + :param end_time: The end time for the detector response. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: The time grain for the detector response. + :param time_grain: The time grain for the detector response. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -247,12 +256,15 @@ def get_app_service_certificate_order_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_app_service_certificate_order_detector_response_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -261,7 +273,11 @@ def get_app_service_certificate_order_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -276,5 +292,5 @@ def get_app_service_certificate_order_detector_response( return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore + get_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificate_registration_provider_operations.py index fc1e9a04ac47..3208749d40e3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificates_operations.py index 85d6ff5d9697..87862a3ee1ea 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,30 +68,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -101,31 +103,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,35 +142,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,31 +183,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -218,35 +222,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -282,10 +286,10 @@ def list( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :param filter: Return only information specified in the filter (using OData syntax). For - example: $filter=KeyVaultId eq 'KeyVaultId'. + example: $filter=KeyVaultId eq 'KeyVaultId'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -293,6 +297,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -303,6 +309,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list.metadata['url'], ) @@ -313,6 +320,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -331,7 +339,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -345,7 +357,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -355,7 +367,7 @@ def list_by_resource_group( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -365,6 +377,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -376,6 +390,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -386,6 +401,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -403,7 +419,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +437,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -428,7 +448,7 @@ def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -445,17 +465,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -470,7 +497,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -483,7 +510,7 @@ def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -502,6 +529,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -510,6 +538,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -517,7 +546,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -532,11 +565,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -544,7 +577,7 @@ def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -561,17 +594,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -582,7 +622,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -595,7 +635,7 @@ def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -614,6 +654,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -622,6 +663,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -629,7 +671,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -644,5 +690,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_deleted_web_apps_operations.py index dde024d34502..d8d7301dc1d8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_get_deleted_web_app_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -153,7 +156,7 @@ def list( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -162,6 +165,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -172,6 +177,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -181,6 +187,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -198,7 +205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -222,7 +233,7 @@ def list_by_location( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -233,6 +244,8 @@ def list_by_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -244,6 +257,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -254,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -271,7 +286,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -285,7 +304,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace def get_deleted_web_app_by_location( @@ -296,7 +315,7 @@ def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -313,17 +332,24 @@ def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,5 +364,5 @@ def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_diagnostics_operations.py index 491f7a2fb87b..c17f9fd1e968 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -967,7 +989,7 @@ def list_hosting_environment_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1049,7 +1079,7 @@ def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -1057,11 +1087,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1074,12 +1104,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1088,7 +1121,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1103,7 +1140,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1115,7 +1152,7 @@ def list_site_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1128,6 +1165,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1140,6 +1179,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1151,6 +1191,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1168,7 +1209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1182,7 +1227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1197,7 +1242,7 @@ def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1205,11 +1250,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1222,12 +1267,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1236,7 +1284,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1303,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1263,7 +1315,7 @@ def list_site_diagnostic_categories( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1276,6 +1328,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1288,6 +1342,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1299,6 +1354,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1316,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1330,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1342,7 +1402,7 @@ def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1361,18 +1421,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1454,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1400,7 +1467,7 @@ def list_site_analyses( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1415,6 +1482,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1428,6 +1497,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1440,6 +1510,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1457,7 +1528,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,7 +1546,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1484,7 +1559,7 @@ def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1505,6 +1580,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1512,12 +1589,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1614,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1549,7 +1631,7 @@ def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1559,11 +1641,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1576,6 +1658,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1583,6 +1667,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1591,7 +1676,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1695,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1619,7 +1708,7 @@ def list_site_detectors( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1634,6 +1723,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1647,6 +1738,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1751,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1769,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1787,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1703,7 +1800,7 @@ def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1724,6 +1821,8 @@ def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -1731,12 +1830,17 @@ def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1751,7 +1855,7 @@ def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1768,7 +1872,7 @@ def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1778,11 +1882,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1795,6 +1899,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1802,6 +1908,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1810,7 +1917,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1825,7 +1936,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1838,7 +1949,7 @@ def list_site_detector_responses_slot( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1853,6 +1964,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1866,6 +1979,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1878,6 +1992,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1895,7 +2010,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1909,7 +2028,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1925,7 +2044,7 @@ def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1935,11 +2054,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1952,6 +2071,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1959,6 +2080,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1967,7 +2089,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1982,7 +2108,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1995,7 +2121,7 @@ def list_site_diagnostic_categories_slot( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -2010,6 +2136,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2023,6 +2151,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2164,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2182,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2200,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2079,7 +2213,7 @@ def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -2100,6 +2234,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2107,12 +2243,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2127,7 +2268,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2141,7 +2282,7 @@ def list_site_analyses_slot( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -2158,6 +2299,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2172,6 +2315,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2185,6 +2329,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2202,7 +2347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2216,7 +2365,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2230,7 +2379,7 @@ def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -2253,6 +2402,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2261,12 +2412,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2281,7 +2437,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2299,7 +2455,7 @@ def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2311,11 +2467,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2328,6 +2484,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2336,6 +2494,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2344,7 +2503,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2359,7 +2522,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2373,7 +2536,7 @@ def list_site_detectors_slot( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2390,6 +2553,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2404,6 +2569,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2417,6 +2583,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2434,7 +2601,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2448,7 +2619,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2462,7 +2633,7 @@ def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2485,6 +2656,8 @@ def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2493,12 +2666,17 @@ def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2513,7 +2691,7 @@ def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2531,7 +2709,7 @@ def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2543,11 +2721,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2560,6 +2738,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2568,6 +2748,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2576,7 +2757,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2591,5 +2776,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_domain_registration_provider_operations.py index 9fc7d9d8eb21..90fbc36eceb6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_domains_operations.py index 1e2526e59996..da38e0accee3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,33 +295,34 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,35 +336,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -372,31 +377,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -408,10 +414,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -419,21 +426,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -448,12 +455,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -461,23 +468,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -491,10 +498,11 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -502,21 +510,21 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -531,12 +539,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -544,23 +552,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -573,31 +581,32 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,7 +640,7 @@ def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2021_01_01.models.NameIdentifier @@ -646,12 +655,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -659,7 +670,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +689,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -684,13 +699,15 @@ def list( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -701,6 +718,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -710,6 +728,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -727,7 +746,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -741,7 +764,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -750,7 +773,7 @@ def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -763,15 +786,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -786,7 +816,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -797,7 +827,7 @@ def list_recommendations( ) -> Iterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2021_01_01.models.DomainRecommendationSearchParameters @@ -808,6 +838,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -821,6 +852,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -833,6 +865,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -852,7 +885,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -866,7 +903,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -876,7 +913,7 @@ def list_by_resource_group( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -885,6 +922,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -896,6 +935,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -906,6 +946,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -923,7 +964,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,7 +982,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -948,7 +993,7 @@ def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -965,17 +1010,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -990,7 +1042,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -1006,6 +1058,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -1014,6 +1067,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1021,7 +1075,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1039,7 +1097,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1052,7 +1110,7 @@ def begin_create_or_update( ) -> LROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -1072,8 +1130,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1085,6 +1144,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1109,13 +1169,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1124,7 +1183,7 @@ def delete( ) -> None: """Delete a domain. - Description for 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 @@ -1144,18 +1203,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1166,7 +1232,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1179,7 +1245,7 @@ def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -1198,6 +1264,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1206,6 +1273,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1213,7 +1281,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1304,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1244,7 +1316,7 @@ def list_ownership_identifiers( ) -> Iterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -1257,6 +1329,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1269,6 +1343,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1280,6 +1355,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1297,7 +1373,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1311,7 +1391,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1323,7 +1403,7 @@ def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -1342,18 +1422,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,7 +1455,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1383,8 +1470,8 @@ def create_or_update_ownership_identifier( """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. + 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 @@ -1405,6 +1492,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1414,6 +1502,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1421,7 +1510,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1436,11 +1529,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1449,7 +1542,7 @@ def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -1468,18 +1561,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1490,7 +1590,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1505,8 +1605,8 @@ def update_ownership_identifier( """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. + 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 @@ -1527,6 +1627,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1536,6 +1637,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1543,7 +1645,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1558,11 +1664,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1570,7 +1676,7 @@ def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1587,17 +1693,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1608,5 +1721,5 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_global_operations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_global_operations_operations.py index 42557f4e1bfa..3b0d4c074f07 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_global_operations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_global_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, List, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse @@ -15,7 +16,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,30 +30,31 @@ def build_get_deleted_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}") path_format_arguments = { "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_deleted_web_app_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_subscription_operation_with_async_response_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,7 +158,7 @@ def get_deleted_web_app( ) -> "_models.DeletedSite": """Get deleted app for a subscription. - Description for Get deleted app for a subscription. + 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 @@ -170,16 +173,23 @@ def get_deleted_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deleted_web_app_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +204,7 @@ def get_deleted_web_app( return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}"} # type: ignore @distributed_trace @@ -205,7 +215,7 @@ def get_deleted_web_app_snapshots( ) -> List["_models.Snapshot"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + 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 @@ -220,16 +230,23 @@ def get_deleted_web_app_snapshots( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deleted_web_app_snapshots_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_snapshots.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,11 +261,11 @@ def get_deleted_web_app_snapshots( return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + get_deleted_web_app_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots"} # type: ignore @distributed_trace - def get_subscription_operation_with_async_response( + def get_subscription_operation_with_async_response( # pylint: disable=inconsistent-return-statements self, location: str, operation_id: str, @@ -256,7 +273,7 @@ def get_subscription_operation_with_async_response( ) -> None: """Gets an operation in a subscription and given region. - Description for Gets an operation in a subscription and given region. + Gets an operation in a subscription and given region. :param location: Location name. :type location: str @@ -273,17 +290,24 @@ def get_subscription_operation_with_async_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_subscription_operation_with_async_response_request( location=location, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_operation_with_async_response.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -294,5 +318,5 @@ def get_subscription_operation_with_async_response( if cls: return cls(pipeline_response, None, {}) - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore + get_subscription_operation_with_async_response.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_kube_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_kube_environments_operations.py index f07568ebbcce..a331ebe7b242 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_kube_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_kube_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_by_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -178,31 +181,32 @@ def build_delete_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -216,35 +220,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -279,7 +283,7 @@ def list_by_subscription( ) -> Iterable["_models.KubeEnvironmentCollection"]: """Get all Kubernetes Environments for a subscription. - Description for Get all Kubernetes Environments for a subscription. + Get all Kubernetes Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KubeEnvironmentCollection or the result of @@ -288,6 +292,8 @@ def list_by_subscription( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -298,6 +304,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_subscription.metadata['url'], ) request = _convert_request(request) @@ -307,6 +314,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -324,7 +332,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,7 +350,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -348,7 +360,7 @@ def list_by_resource_group( ) -> Iterable["_models.KubeEnvironmentCollection"]: """Get all the Kubernetes Environments in a resource group. - Description for Get all the Kubernetes Environments in a resource group. + 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 @@ -359,6 +371,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -370,6 +384,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -380,6 +395,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -397,7 +413,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -411,7 +431,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def get( @@ -422,7 +442,7 @@ def get( ) -> "_models.KubeEnvironment": """Get the properties of a Kubernetes Environment. - Description for Get the properties of a Kubernetes Environment. + 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 @@ -439,17 +459,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -464,7 +491,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -480,6 +507,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') @@ -488,6 +516,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -495,7 +524,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -513,7 +546,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace @@ -526,7 +559,7 @@ def begin_create_or_update( ) -> LROPoller["_models.KubeEnvironment"]: """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -547,8 +580,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.KubeEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -560,6 +594,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -584,12 +619,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -601,17 +635,24 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -621,11 +662,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -633,7 +674,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete a Kubernetes Environment. - Description for Delete a Kubernetes Environment. + Delete a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -651,7 +692,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -662,6 +704,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -682,10 +725,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -697,7 +739,7 @@ def update( ) -> "_models.KubeEnvironment": """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -717,6 +759,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentPatchResource') @@ -725,6 +768,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -732,7 +776,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -751,5 +799,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_provider_operations.py index 3da7247ed235..c12024c487de 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum10"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -60,26 +61,27 @@ def build_get_function_app_stacks_request( stack_os_type: Optional[Union[str, "_models.Enum11"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/functionAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/functionAppStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -90,31 +92,32 @@ def build_get_function_app_stacks_for_location_request( stack_os_type: Optional[Union[str, "_models.Enum12"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/locations/{location}/functionAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/locations/{location}/functionAppStacks") path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -125,31 +128,32 @@ def build_get_web_app_stacks_for_location_request( stack_os_type: Optional[Union[str, "_models.Enum13"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/locations/{location}/webAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/locations/{location}/webAppStacks") path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -157,24 +161,25 @@ def build_get_web_app_stacks_for_location_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -184,26 +189,27 @@ def build_get_web_app_stacks_request( stack_os_type: Optional[Union[str, "_models.Enum14"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/webAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/webAppStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -214,31 +220,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum15"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -272,9 +279,9 @@ def get_available_stacks( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_01_01.models.Enum10 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -283,6 +290,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -292,6 +301,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -301,6 +311,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -319,7 +330,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -333,7 +348,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def get_function_app_stacks( @@ -343,9 +358,9 @@ def get_function_app_stacks( ) -> Iterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions. - Description for Get available Function app frameworks and their versions. + Get available Function app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_01.models.Enum11 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -354,6 +369,8 @@ def get_function_app_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -363,6 +380,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks.metadata['url'], ) @@ -372,6 +390,7 @@ def prepare_request(next_link=None): else: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -390,7 +409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -404,7 +427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + get_function_app_stacks.metadata = {'url': "/providers/Microsoft.Web/functionAppStacks"} # type: ignore @distributed_trace def get_function_app_stacks_for_location( @@ -415,11 +438,11 @@ def get_function_app_stacks_for_location( ) -> Iterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions for location. - Description for Get available Function app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_01.models.Enum12 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -428,6 +451,8 @@ def get_function_app_stacks_for_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -438,6 +463,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks_for_location.metadata['url'], ) @@ -448,6 +474,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -466,7 +493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -480,7 +511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + get_function_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/functionAppStacks"} # type: ignore @distributed_trace def get_web_app_stacks_for_location( @@ -491,11 +522,11 @@ def get_web_app_stacks_for_location( ) -> Iterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions for location. - Description for Get available Web app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_01.models.Enum13 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -503,6 +534,8 @@ def get_web_app_stacks_for_location( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -513,6 +546,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks_for_location.metadata['url'], ) @@ -523,6 +557,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -541,7 +576,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -555,7 +594,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + get_web_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/webAppStacks"} # type: ignore @distributed_trace def list_operations( @@ -565,8 +604,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -574,6 +613,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -583,6 +624,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -591,6 +633,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -608,7 +651,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -622,7 +669,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_web_app_stacks( @@ -632,9 +679,9 @@ def get_web_app_stacks( ) -> Iterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions. - Description for Get available Web app frameworks and their versions. + Get available Web app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_01.models.Enum14 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -642,6 +689,8 @@ def get_web_app_stacks( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -651,6 +700,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks.metadata['url'], ) @@ -660,6 +710,7 @@ def prepare_request(next_link=None): else: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -678,7 +729,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -692,7 +747,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + get_web_app_stacks.metadata = {'url': "/providers/Microsoft.Web/webAppStacks"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -702,9 +757,9 @@ def get_available_stacks_on_prem( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_01_01.models.Enum15 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -713,6 +768,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -723,6 +780,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -733,6 +791,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -751,7 +810,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -765,4 +828,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_recommendations_operations.py index dd139e734b8e..670c2b5d598f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,29 +69,30 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -100,30 +102,31 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,36 @@ def build_list_history_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +183,36 @@ def build_list_recommended_rules_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,32 +225,33 @@ def build_disable_all_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,32 +264,33 @@ def build_reset_all_filters_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +305,11 @@ def build_get_rule_details_by_hosting_environment_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), @@ -309,25 +317,25 @@ def build_get_rule_details_by_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -341,10 +349,11 @@ def build_disable_recommendation_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -352,22 +361,22 @@ def build_disable_recommendation_for_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -381,35 +390,36 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -423,35 +433,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -462,31 +473,32 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -497,31 +509,32 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,10 +549,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -547,25 +561,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -577,10 +591,11 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -588,21 +603,21 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -637,14 +652,14 @@ def list( ) -> Iterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -653,6 +668,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -663,6 +680,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -674,6 +692,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -693,7 +712,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -707,16 +730,16 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -729,15 +752,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -748,19 +778,18 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -775,16 +804,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -795,7 +831,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -809,7 +845,7 @@ def list_history_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -820,7 +856,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -829,6 +865,8 @@ def list_history_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -841,6 +879,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -854,6 +893,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -873,7 +913,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -887,7 +931,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -900,7 +944,7 @@ def list_recommended_rules_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -910,7 +954,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -919,6 +963,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -931,6 +977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -944,6 +991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -963,7 +1011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,10 +1029,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_hosting_environment( + def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -989,7 +1041,7 @@ def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1008,18 +1060,25 @@ def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1030,11 +1089,11 @@ def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_hosting_environment( + def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1043,7 +1102,7 @@ def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1062,18 +1121,25 @@ def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1084,7 +1150,7 @@ def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1099,7 +1165,7 @@ def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1108,10 +1174,10 @@ def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1124,12 +1190,15 @@ def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -1137,7 +1206,11 @@ def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1152,11 +1225,11 @@ def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_hosting_environment( + def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1166,7 +1239,7 @@ def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1187,19 +1260,26 @@ def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,7 +1290,7 @@ def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -1224,7 +1304,7 @@ def list_history_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -1235,7 +1315,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1244,6 +1324,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1256,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -1269,6 +1352,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -1288,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1302,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -1315,7 +1403,7 @@ def list_recommended_rules_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -1325,7 +1413,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1334,6 +1422,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1346,6 +1436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -1359,6 +1450,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -1378,7 +1470,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,10 +1488,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1403,7 +1499,7 @@ def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1420,17 +1516,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1441,11 +1544,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1453,7 +1556,7 @@ def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1470,17 +1573,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1491,7 +1601,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1506,7 +1616,7 @@ def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1515,10 +1625,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1531,12 +1641,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -1544,7 +1657,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1559,11 +1676,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1572,7 +1689,7 @@ def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1591,18 +1708,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,5 +1737,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_resource_health_metadata_operations.py index d2a4d84bfd19..c73972b876d9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -262,7 +268,7 @@ def list( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -331,8 +345,7 @@ def list_by_resource_group( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -343,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -354,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -364,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -381,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -406,8 +427,7 @@ def list_by_site( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -420,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -432,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -443,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -460,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -474,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -485,7 +513,7 @@ def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -502,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -527,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -540,8 +575,7 @@ def list_by_site_slot( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -556,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -581,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -598,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -624,7 +666,7 @@ def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -643,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_static_sites_operations.py index b463d2d21577..15eb61baeded 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -37,34 +37,34 @@ def build_preview_workflow_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -75,29 +75,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -107,30 +108,31 @@ def build_get_static_sites_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,31 +143,32 @@ def build_get_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +182,35 @@ def build_create_or_update_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -220,31 +223,32 @@ def build_delete_static_site_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,35 +262,35 @@ def build_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -300,10 +304,11 @@ def build_list_static_site_users_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -311,21 +316,21 @@ def build_list_static_site_users_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -338,10 +343,11 @@ def build_delete_static_site_user_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -350,21 +356,21 @@ def build_delete_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -380,12 +386,12 @@ def build_update_static_site_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -394,23 +400,23 @@ def build_update_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -423,31 +429,32 @@ def build_get_static_site_builds_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -459,10 +466,11 @@ def build_get_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -470,21 +478,21 @@ def build_get_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -496,10 +504,11 @@ def build_delete_static_site_build_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -507,21 +516,21 @@ def build_delete_static_site_build_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,12 +545,12 @@ def build_create_or_update_static_site_build_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -549,23 +558,23 @@ def build_create_or_update_static_site_build_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -582,12 +591,12 @@ def build_create_or_update_static_site_build_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -595,23 +604,23 @@ def build_create_or_update_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -625,10 +634,11 @@ def build_list_static_site_build_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -636,21 +646,21 @@ def build_list_static_site_build_functions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -662,10 +672,11 @@ def build_list_static_site_build_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -673,21 +684,21 @@ def build_list_static_site_build_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -699,10 +710,11 @@ def build_list_static_site_build_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -710,21 +722,21 @@ def build_list_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -736,10 +748,11 @@ def build_get_user_provided_function_apps_for_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -747,21 +760,21 @@ def build_get_user_provided_function_apps_for_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -774,10 +787,11 @@ def build_get_user_provided_function_app_for_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -786,21 +800,21 @@ def build_get_user_provided_function_app_for_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -817,12 +831,12 @@ def build_register_user_provided_function_app_with_static_site_build_request_ini is_forced: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -831,25 +845,25 @@ def build_register_user_provided_function_app_with_static_site_build_request_ini "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if is_forced is not None: - query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -864,10 +878,11 @@ def build_detach_user_provided_function_app_from_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -876,21 +891,21 @@ def build_detach_user_provided_function_app_from_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -905,12 +920,12 @@ def build_create_zip_deployment_for_static_site_build_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -918,23 +933,23 @@ def build_create_zip_deployment_for_static_site_build_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -950,35 +965,35 @@ def build_create_or_update_static_site_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -994,35 +1009,35 @@ def build_create_or_update_static_site_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1038,35 +1053,35 @@ def build_create_user_roles_invitation_link_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1079,31 +1094,32 @@ def build_list_static_site_custom_domains_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1115,10 +1131,11 @@ def build_get_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1126,21 +1143,21 @@ def build_get_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1155,12 +1172,12 @@ def build_create_or_update_static_site_custom_domain_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1168,23 +1185,23 @@ def build_create_or_update_static_site_custom_domain_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1198,10 +1215,11 @@ def build_delete_static_site_custom_domain_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1209,21 +1227,21 @@ def build_delete_static_site_custom_domain_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1238,12 +1256,12 @@ def build_validate_custom_domain_can_be_added_to_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1251,23 +1269,23 @@ def build_validate_custom_domain_can_be_added_to_static_site_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1280,31 +1298,32 @@ def build_detach_static_site_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1315,31 +1334,32 @@ def build_list_static_site_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1350,31 +1370,32 @@ def build_list_static_site_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1385,31 +1406,32 @@ def build_list_static_site_configured_roles_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1420,31 +1442,32 @@ def build_list_static_site_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1455,31 +1478,32 @@ def build_list_static_site_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1490,31 +1514,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1526,10 +1551,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1537,21 +1563,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1566,12 +1592,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1579,23 +1605,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1609,10 +1635,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1620,21 +1647,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1645,31 +1672,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1683,35 +1711,35 @@ def build_reset_static_site_api_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1724,31 +1752,32 @@ def build_get_user_provided_function_apps_for_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1760,10 +1789,11 @@ def build_get_user_provided_function_app_for_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1771,21 +1801,21 @@ def build_get_user_provided_function_app_for_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1801,12 +1831,12 @@ def build_register_user_provided_function_app_with_static_site_request_initial( is_forced: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1814,25 +1844,25 @@ def build_register_user_provided_function_app_with_static_site_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if is_forced is not None: - query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1846,10 +1876,11 @@ def build_detach_user_provided_function_app_from_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1857,21 +1888,21 @@ def build_detach_user_provided_function_app_from_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1885,41 +1916,41 @@ def build_create_zip_deployment_for_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs ) -class StaticSitesOperations(object): +class StaticSitesOperations(object): # pylint: disable=too-many-public-methods """StaticSitesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1950,7 +1981,7 @@ def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -1969,6 +2000,7 @@ def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -1976,6 +2008,7 @@ def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -1983,7 +2016,11 @@ def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1998,7 +2035,7 @@ def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -2008,7 +2045,7 @@ def list( ) -> Iterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -2016,6 +2053,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2026,6 +2065,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2075,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2093,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2111,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -2076,7 +2121,7 @@ def get_static_sites_by_resource_group( ) -> Iterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -2086,6 +2131,8 @@ def get_static_sites_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2097,6 +2144,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -2107,6 +2155,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2124,7 +2173,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2138,7 +2191,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_site( @@ -2149,7 +2202,7 @@ def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -2166,17 +2219,24 @@ def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2191,7 +2251,7 @@ def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore def _create_or_update_static_site_initial( @@ -2207,6 +2267,7 @@ def _create_or_update_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -2215,6 +2276,7 @@ def _create_or_update_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_initial.metadata['url'], @@ -2222,7 +2284,11 @@ def _create_or_update_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2240,7 +2306,7 @@ def _create_or_update_static_site_initial( return deserialized - _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _create_or_update_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -2253,8 +2319,7 @@ def begin_create_or_update_static_site( ) -> LROPoller["_models.StaticSiteARMResource"]: """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -2275,8 +2340,9 @@ def begin_create_or_update_static_site( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.StaticSiteARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2288,6 +2354,7 @@ def begin_create_or_update_static_site( resource_group_name=resource_group_name, name=name, static_site_envelope=static_site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2312,12 +2379,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore - def _delete_static_site_initial( + def _delete_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2329,17 +2395,24 @@ def _delete_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2349,11 +2422,11 @@ def _delete_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _delete_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace - def begin_delete_static_site( + def begin_delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2361,7 +2434,7 @@ def begin_delete_static_site( ) -> LROPoller[None]: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2379,7 +2452,8 @@ def begin_delete_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2390,6 +2464,7 @@ def begin_delete_static_site( raw_result = self._delete_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2410,10 +2485,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace def update_static_site( @@ -2425,8 +2499,7 @@ def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -2445,6 +2518,7 @@ def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -2453,6 +2527,7 @@ def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -2460,7 +2535,11 @@ def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2479,7 +2558,7 @@ def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -2492,7 +2571,7 @@ def list_static_site_users( ) -> Iterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -2507,6 +2586,8 @@ def list_static_site_users( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2520,6 +2601,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -2532,6 +2614,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2549,7 +2632,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2563,10 +2650,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace - def delete_static_site_user( + def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2576,7 +2663,7 @@ def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -2597,6 +2684,8 @@ def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -2604,12 +2693,17 @@ def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2620,7 +2714,7 @@ def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -2635,7 +2729,7 @@ def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -2659,6 +2753,7 @@ def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -2669,6 +2764,7 @@ def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -2676,7 +2772,11 @@ def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2691,7 +2791,7 @@ def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -2703,7 +2803,7 @@ def get_static_site_builds( ) -> Iterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -2716,6 +2816,8 @@ def get_static_site_builds( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2728,6 +2830,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -2739,6 +2842,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2756,7 +2860,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2770,7 +2878,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace def get_static_site_build( @@ -2782,7 +2890,7 @@ def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -2801,18 +2909,25 @@ def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2827,10 +2942,10 @@ def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore - def _delete_static_site_build_initial( + def _delete_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2843,18 +2958,25 @@ def _delete_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_static_site_build_request_initial( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_build_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2864,11 +2986,11 @@ def _delete_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + _delete_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace - def begin_delete_static_site_build( + def begin_delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2877,7 +2999,7 @@ def begin_delete_static_site_build( ) -> LROPoller[None]: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2897,7 +3019,8 @@ def begin_delete_static_site_build( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2909,6 +3032,7 @@ def begin_delete_static_site_build( resource_group_name=resource_group_name, name=name, environment_name=environment_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2929,10 +3053,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + begin_delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace def create_or_update_static_site_build_app_settings( @@ -2945,7 +3068,7 @@ def create_or_update_static_site_build_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site build. - Description for Creates or updates the app settings of a static site build. + 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 @@ -2966,6 +3089,7 @@ def create_or_update_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -2975,6 +3099,7 @@ def create_or_update_static_site_build_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_app_settings.metadata['url'], @@ -2982,7 +3107,11 @@ def create_or_update_static_site_build_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2997,7 +3126,7 @@ def create_or_update_static_site_build_app_settings( return deserialized - create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + create_or_update_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings"} # type: ignore @distributed_trace @@ -3011,7 +3140,7 @@ def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -3032,6 +3161,7 @@ def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3041,6 +3171,7 @@ def create_or_update_static_site_build_function_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -3048,7 +3179,11 @@ def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3063,7 +3198,7 @@ def create_or_update_static_site_build_function_app_settings( return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings"} # type: ignore @distributed_trace @@ -3076,7 +3211,7 @@ def list_static_site_build_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -3091,6 +3226,8 @@ def list_static_site_build_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3104,6 +3241,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -3116,6 +3254,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3133,7 +3272,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3147,7 +3290,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions"} # type: ignore @distributed_trace def list_static_site_build_app_settings( @@ -3159,7 +3302,7 @@ def list_static_site_build_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -3178,18 +3321,25 @@ def list_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_build_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3204,7 +3354,7 @@ def list_static_site_build_app_settings( return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + list_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings"} # type: ignore @distributed_trace @@ -3217,7 +3367,7 @@ def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -3236,18 +3386,25 @@ def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3262,7 +3419,7 @@ def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -3275,8 +3432,7 @@ def get_user_provided_function_apps_for_static_site_build( ) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site build. - Description for Gets the details of the user provided function apps registered with a static - site build. + 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 @@ -3291,6 +3447,8 @@ def get_user_provided_function_apps_for_static_site_build( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3304,6 +3462,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site_build.metadata['url'], ) request = _convert_request(request) @@ -3316,6 +3475,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3333,7 +3493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,7 +3511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps"} # type: ignore @distributed_trace def get_user_provided_function_app_for_static_site_build( @@ -3360,8 +3524,7 @@ def get_user_provided_function_app_for_static_site_build( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site build. - Description for Gets the details of the user provided function app registered with a static - site build. + 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 @@ -3382,6 +3545,8 @@ def get_user_provided_function_app_for_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_user_provided_function_app_for_static_site_build_request( resource_group_name=resource_group_name, @@ -3389,12 +3554,17 @@ def get_user_provided_function_app_for_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3409,7 +3579,7 @@ def get_user_provided_function_app_for_static_site_build( return deserialized - get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore def _register_user_provided_function_app_with_static_site_build_initial( @@ -3428,6 +3598,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -3438,6 +3609,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -3446,7 +3618,11 @@ def _register_user_provided_function_app_with_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3464,7 +3640,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( return deserialized - _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace @@ -3480,7 +3656,7 @@ def begin_register_user_provided_function_app_with_static_site_build( ) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site build. - Description for Register a user provided function app with a static site build. + 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 @@ -3512,8 +3688,9 @@ def begin_register_user_provided_function_app_with_static_site_build( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3528,6 +3705,7 @@ def begin_register_user_provided_function_app_with_static_site_build( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3552,13 +3730,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace - def detach_user_provided_function_app_from_static_site_build( + def detach_user_provided_function_app_from_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3568,7 +3745,7 @@ def detach_user_provided_function_app_from_static_site_build( ) -> None: """Detach the user provided function app from the static site build. - Description for Detach the user provided function app from the static site build. + 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 @@ -3589,6 +3766,8 @@ def detach_user_provided_function_app_from_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_build_request( resource_group_name=resource_group_name, @@ -3596,12 +3775,17 @@ def detach_user_provided_function_app_from_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3612,10 +3796,10 @@ def detach_user_provided_function_app_from_static_site_build( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - def _create_zip_deployment_for_static_site_build_initial( + def _create_zip_deployment_for_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3629,6 +3813,7 @@ def _create_zip_deployment_for_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -3638,6 +3823,7 @@ def _create_zip_deployment_for_static_site_build_initial( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_build_initial.metadata['url'], @@ -3645,7 +3831,11 @@ def _create_zip_deployment_for_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3655,11 +3845,11 @@ def _create_zip_deployment_for_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace - def begin_create_zip_deployment_for_static_site_build( + def begin_create_zip_deployment_for_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3669,7 +3859,7 @@ def begin_create_zip_deployment_for_static_site_build( ) -> LROPoller[None]: """Deploys zipped content to a specific environment of a static site. - Description for Deploys zipped content to a specific environment of a static site. + 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 @@ -3693,8 +3883,9 @@ def begin_create_zip_deployment_for_static_site_build( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -3707,6 +3898,7 @@ def begin_create_zip_deployment_for_static_site_build( name=name, environment_name=environment_name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3728,10 +3920,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace def create_or_update_static_site_app_settings( @@ -3743,7 +3934,7 @@ def create_or_update_static_site_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site. - Description for Creates or updates the app settings of a static site. + 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 @@ -3762,6 +3953,7 @@ def create_or_update_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3770,6 +3962,7 @@ def create_or_update_static_site_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_app_settings.metadata['url'], @@ -3777,7 +3970,11 @@ def create_or_update_static_site_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3792,7 +3989,7 @@ def create_or_update_static_site_app_settings( return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + create_or_update_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -3805,7 +4002,7 @@ def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -3824,6 +4021,7 @@ def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3832,6 +4030,7 @@ def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -3839,7 +4038,11 @@ def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3854,7 +4057,7 @@ def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace @@ -3867,7 +4070,7 @@ def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -3887,6 +4090,7 @@ def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -3895,6 +4099,7 @@ def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -3902,7 +4107,11 @@ def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3917,7 +4126,7 @@ def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -3929,7 +4138,7 @@ def list_static_site_custom_domains( ) -> Iterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -3942,6 +4151,8 @@ def list_static_site_custom_domains( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3954,6 +4165,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -3965,6 +4177,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3982,7 +4195,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3996,7 +4213,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace def get_static_site_custom_domain( @@ -4008,7 +4225,7 @@ def get_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Gets an existing custom domain for a particular static site. - Description for Gets an existing custom domain for a particular static site. + 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 @@ -4027,18 +4244,25 @@ def get_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4053,7 +4277,7 @@ def get_static_site_custom_domain( return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + get_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore def _create_or_update_static_site_custom_domain_initial( @@ -4070,6 +4294,7 @@ def _create_or_update_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -4079,6 +4304,7 @@ def _create_or_update_static_site_custom_domain_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_custom_domain_initial.metadata['url'], @@ -4086,7 +4312,11 @@ def _create_or_update_static_site_custom_domain_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4104,7 +4334,7 @@ def _create_or_update_static_site_custom_domain_initial( return deserialized - _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _create_or_update_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace @@ -4118,8 +4348,7 @@ def begin_create_or_update_static_site_custom_domain( ) -> LROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -4145,8 +4374,9 @@ def begin_create_or_update_static_site_custom_domain( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.StaticSiteCustomDomainOverviewARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4159,6 +4389,7 @@ def begin_create_or_update_static_site_custom_domain( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4183,12 +4414,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - def _delete_static_site_custom_domain_initial( + def _delete_static_site_custom_domain_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4201,18 +4431,25 @@ def _delete_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_static_site_custom_domain_request_initial( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_custom_domain_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4222,11 +4459,11 @@ def _delete_static_site_custom_domain_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _delete_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def begin_delete_static_site_custom_domain( + def begin_delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4235,7 +4472,7 @@ def begin_delete_static_site_custom_domain( ) -> LROPoller[None]: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4255,7 +4492,8 @@ def begin_delete_static_site_custom_domain( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4267,6 +4505,7 @@ def begin_delete_static_site_custom_domain( resource_group_name=resource_group_name, name=name, domain_name=domain_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4287,12 +4526,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - def _validate_custom_domain_can_be_added_to_static_site_initial( + def _validate_custom_domain_can_be_added_to_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4306,6 +4544,7 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -4315,6 +4554,7 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'], @@ -4322,7 +4562,11 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4332,11 +4576,11 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace - def begin_validate_custom_domain_can_be_added_to_static_site( + def begin_validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4346,7 +4590,7 @@ def begin_validate_custom_domain_can_be_added_to_static_site( ) -> LROPoller[None]: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -4370,8 +4614,9 @@ def begin_validate_custom_domain_can_be_added_to_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4384,6 +4629,7 @@ def begin_validate_custom_domain_can_be_added_to_static_site( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4405,12 +4651,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore - def _detach_static_site_initial( + def _detach_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4422,17 +4667,24 @@ def _detach_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_detach_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._detach_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4442,11 +4694,11 @@ def _detach_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + _detach_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace - def begin_detach_static_site( + def begin_detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4454,7 +4706,7 @@ def begin_detach_static_site( ) -> LROPoller[None]: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4472,7 +4724,8 @@ def begin_detach_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4483,6 +4736,7 @@ def begin_detach_static_site( raw_result = self._detach_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4503,10 +4757,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + begin_detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace def list_static_site_functions( @@ -4517,7 +4770,7 @@ def list_static_site_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -4530,6 +4783,8 @@ def list_static_site_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4542,6 +4797,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -4553,6 +4809,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4570,7 +4827,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4584,7 +4845,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace def list_static_site_app_settings( @@ -4595,7 +4856,7 @@ def list_static_site_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -4612,17 +4873,24 @@ def list_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4637,7 +4905,7 @@ def list_static_site_app_settings( return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + list_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings"} # type: ignore @distributed_trace @@ -4649,7 +4917,7 @@ def list_static_site_configured_roles( ) -> "_models.StringList": """Lists the roles configured for the static site. - Description for Lists the roles configured for the static site. + 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 @@ -4666,17 +4934,24 @@ def list_static_site_configured_roles( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_configured_roles_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_configured_roles.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4691,7 +4966,7 @@ def list_static_site_configured_roles( return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + list_static_site_configured_roles.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles"} # type: ignore @distributed_trace @@ -4703,7 +4978,7 @@ def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -4720,17 +4995,24 @@ def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4745,7 +5027,7 @@ def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -4757,7 +5039,7 @@ def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -4774,17 +5056,24 @@ def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4799,7 +5088,7 @@ def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace @@ -4811,7 +5100,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a static site. - Description for Gets the list of private endpoint connections associated with a static site. + 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 @@ -4824,6 +5113,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4836,6 +5127,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -4847,6 +5139,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4864,7 +5157,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4878,7 +5175,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -4890,7 +5187,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4909,18 +5206,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4935,7 +5239,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -4952,6 +5256,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -4961,6 +5266,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -4968,7 +5274,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4986,7 +5296,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -5000,7 +5310,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -5025,8 +5335,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -5039,6 +5350,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5063,10 +5375,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -5081,18 +5392,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -5113,7 +5431,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -5126,7 +5444,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -5146,7 +5464,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -5158,6 +5477,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -5181,10 +5501,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -5195,7 +5514,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -5212,17 +5531,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5237,11 +5563,11 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources"} # type: ignore @distributed_trace - def reset_static_site_api_key( + def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5250,7 +5576,7 @@ def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -5270,6 +5596,7 @@ def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -5278,6 +5605,7 @@ def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -5285,7 +5613,11 @@ def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5296,7 +5628,7 @@ def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore @distributed_trace @@ -5308,8 +5640,7 @@ def get_user_provided_function_apps_for_static_site( ) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site. - Description for Gets the details of the user provided function apps registered with a static - site. + 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 @@ -5322,6 +5653,8 @@ def get_user_provided_function_apps_for_static_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5334,6 +5667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site.metadata['url'], ) request = _convert_request(request) @@ -5345,6 +5679,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5362,7 +5697,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5376,7 +5715,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps"} # type: ignore @distributed_trace def get_user_provided_function_app_for_static_site( @@ -5388,8 +5727,7 @@ def get_user_provided_function_app_for_static_site( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site. - Description for Gets the details of the user provided function app registered with a static - site. + 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 @@ -5408,18 +5746,25 @@ def get_user_provided_function_app_for_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_user_provided_function_app_for_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5434,7 +5779,7 @@ def get_user_provided_function_app_for_static_site( return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore def _register_user_provided_function_app_with_static_site_initial( @@ -5452,6 +5797,7 @@ def _register_user_provided_function_app_with_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -5461,6 +5807,7 @@ def _register_user_provided_function_app_with_static_site_initial( name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -5469,7 +5816,11 @@ def _register_user_provided_function_app_with_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5487,7 +5838,7 @@ def _register_user_provided_function_app_with_static_site_initial( return deserialized - _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace @@ -5502,7 +5853,7 @@ def begin_register_user_provided_function_app_with_static_site( ) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site. - Description for Register a user provided function app with a static site. + 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 @@ -5532,8 +5883,9 @@ def begin_register_user_provided_function_app_with_static_site( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -5547,6 +5899,7 @@ def begin_register_user_provided_function_app_with_static_site( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5571,13 +5924,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace - def detach_user_provided_function_app_from_static_site( + def detach_user_provided_function_app_from_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5586,7 +5938,7 @@ def detach_user_provided_function_app_from_static_site( ) -> None: """Detach the user provided function app from the static site. - Description for Detach the user provided function app from the static site. + 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 @@ -5605,18 +5957,25 @@ def detach_user_provided_function_app_from_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5627,10 +5986,10 @@ def detach_user_provided_function_app_from_static_site( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - def _create_zip_deployment_for_static_site_initial( + def _create_zip_deployment_for_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5643,6 +6002,7 @@ def _create_zip_deployment_for_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -5651,6 +6011,7 @@ def _create_zip_deployment_for_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_initial.metadata['url'], @@ -5658,7 +6019,11 @@ def _create_zip_deployment_for_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5668,11 +6033,11 @@ def _create_zip_deployment_for_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore @distributed_trace - def begin_create_zip_deployment_for_static_site( + def begin_create_zip_deployment_for_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5681,7 +6046,7 @@ def begin_create_zip_deployment_for_static_site( ) -> LROPoller[None]: """Deploys zipped content to a static site. - Description for Deploys zipped content to a static site. + 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 @@ -5703,8 +6068,9 @@ def begin_create_zip_deployment_for_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -5716,6 +6082,7 @@ def begin_create_zip_deployment_for_static_site( resource_group_name=resource_group_name, name=name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5737,7 +6104,6 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_top_level_domains_operations.py index e324eddd0f30..6c8ee7109989 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -161,7 +163,7 @@ def list( ) -> Iterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -220,7 +230,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -230,7 +240,7 @@ def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -245,16 +255,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,7 +286,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -281,7 +298,7 @@ def list_agreements( ) -> Iterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -294,6 +311,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -308,6 +326,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -321,6 +340,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -340,7 +360,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,4 +378,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_web_apps_operations.py index afcb034b8a7d..4364f0acdc57 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,35 +188,36 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,35 +231,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -270,33 +274,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -310,35 +315,35 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -354,35 +359,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -395,31 +400,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -431,10 +437,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -442,21 +449,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -468,10 +475,11 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -479,21 +487,21 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -508,12 +516,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -521,23 +529,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -554,12 +562,12 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -567,23 +575,23 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -596,31 +604,32 @@ def build_get_basic_publishing_credentials_policies_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,31 +640,32 @@ def build_get_ftp_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -669,35 +679,35 @@ def build_update_ftp_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -710,31 +720,32 @@ def build_get_scm_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -748,35 +759,35 @@ def build_update_scm_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -789,31 +800,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -827,35 +839,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -868,31 +880,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -906,35 +919,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -947,31 +960,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -985,35 +999,35 @@ def build_update_auth_settings_v2_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1026,31 +1040,32 @@ def build_get_auth_settings_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1064,35 +1079,35 @@ def build_update_azure_storage_accounts_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1105,31 +1120,32 @@ def build_list_azure_storage_accounts_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1143,35 +1159,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1184,31 +1200,32 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1219,31 +1236,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1254,31 +1272,32 @@ def build_get_app_settings_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1290,10 +1309,11 @@ def build_get_app_setting_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1301,21 +1321,21 @@ def build_get_app_setting_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1326,31 +1346,32 @@ def build_get_site_connection_string_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1362,10 +1383,11 @@ def build_get_site_connection_string_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1373,21 +1395,21 @@ def build_get_site_connection_string_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1401,35 +1423,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1442,31 +1464,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1477,31 +1500,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1515,35 +1539,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1559,35 +1583,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1600,31 +1624,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1635,31 +1660,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1673,35 +1699,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1714,31 +1740,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1749,31 +1776,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1787,35 +1815,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1828,31 +1856,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1866,35 +1895,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1910,35 +1939,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1951,31 +1980,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1987,10 +2017,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1998,21 +2029,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2024,10 +2055,11 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2035,21 +2067,21 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2060,31 +2092,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2095,31 +2128,32 @@ def build_get_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2130,31 +2164,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2166,10 +2201,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2177,21 +2213,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2203,10 +2239,11 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2214,21 +2251,21 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2240,10 +2277,11 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2251,21 +2289,21 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2277,10 +2315,11 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2288,21 +2327,21 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2313,31 +2352,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2349,10 +2389,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2360,21 +2401,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2389,12 +2430,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2402,23 +2443,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2432,10 +2473,11 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2443,21 +2485,21 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2469,10 +2511,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2480,21 +2523,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2508,35 +2551,35 @@ def build_discover_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2549,31 +2592,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2585,10 +2629,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2596,21 +2641,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2625,12 +2670,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2638,23 +2683,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2668,10 +2713,11 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2679,21 +2725,21 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2708,12 +2754,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2721,23 +2767,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2750,31 +2796,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2788,35 +2835,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2829,31 +2876,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2864,31 +2912,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2899,31 +2948,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2935,10 +2985,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2946,21 +2997,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2975,12 +3026,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2988,23 +3039,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3018,10 +3069,11 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3029,21 +3081,21 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3059,12 +3111,12 @@ def build_create_or_update_function_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3073,23 +3125,23 @@ def build_create_or_update_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3104,10 +3156,11 @@ def build_delete_function_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3116,21 +3169,21 @@ def build_delete_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3142,10 +3195,11 @@ def build_list_function_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3153,21 +3207,21 @@ def build_list_function_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3179,10 +3233,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3190,21 +3245,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3215,31 +3270,32 @@ def build_list_host_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3250,31 +3306,32 @@ def build_list_sync_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3285,31 +3342,32 @@ def build_sync_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3325,12 +3383,12 @@ def build_create_or_update_host_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3339,23 +3397,23 @@ def build_create_or_update_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3370,10 +3428,11 @@ def build_delete_host_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3382,21 +3441,21 @@ def build_delete_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3407,31 +3466,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3443,10 +3503,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3454,21 +3515,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3483,12 +3544,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3496,23 +3557,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3526,10 +3587,11 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3537,21 +3599,21 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3564,10 +3626,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3576,21 +3639,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3606,12 +3669,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3620,23 +3683,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3651,10 +3714,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3663,21 +3727,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3693,12 +3757,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3707,23 +3771,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3736,31 +3800,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3771,31 +3836,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3807,10 +3873,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3818,21 +3885,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3847,12 +3914,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3860,23 +3927,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3890,10 +3957,11 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3901,21 +3969,21 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3930,12 +3998,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3943,23 +4011,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3972,31 +4040,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4008,10 +4077,11 @@ def build_get_instance_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4019,21 +4089,21 @@ def build_get_instance_info_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4045,10 +4115,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4056,21 +4127,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4085,12 +4156,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4098,23 +4169,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4128,10 +4199,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4139,21 +4211,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4165,10 +4237,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4176,21 +4249,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4203,10 +4276,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4215,21 +4289,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4242,10 +4316,11 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4254,21 +4329,21 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4281,10 +4356,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4293,21 +4369,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4320,10 +4396,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4332,21 +4409,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4360,10 +4437,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4373,21 +4451,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4400,10 +4478,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4412,21 +4491,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4437,31 +4516,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4472,31 +4552,32 @@ def build_list_site_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4507,31 +4588,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4546,36 +4628,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4591,35 +4673,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4632,31 +4714,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4667,31 +4750,32 @@ def build_get_swift_virtual_network_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4705,35 +4789,35 @@ def build_create_or_update_swift_virtual_network_connection_with_check_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4746,31 +4830,32 @@ def build_delete_swift_virtual_network_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4782,10 +4867,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4793,21 +4879,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4819,10 +4905,11 @@ def build_get_network_trace_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4830,21 +4917,21 @@ def build_get_network_trace_operation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4859,37 +4946,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4904,37 +4992,38 @@ def build_start_web_site_network_trace_operation_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4945,31 +5034,32 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4981,10 +5071,11 @@ def build_get_network_traces_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4992,21 +5083,21 @@ def build_get_network_traces_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5018,10 +5109,11 @@ def build_get_network_trace_operation_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5029,21 +5121,21 @@ def build_get_network_trace_operation_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5055,10 +5147,11 @@ def build_get_network_traces_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5066,21 +5159,21 @@ def build_get_network_traces_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5091,31 +5184,32 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5128,33 +5222,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5165,31 +5260,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5200,31 +5296,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5236,10 +5333,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5247,21 +5345,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5276,12 +5374,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5289,23 +5387,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5319,10 +5417,11 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5330,21 +5429,21 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5359,12 +5458,12 @@ def build_update_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5372,23 +5471,23 @@ def build_update_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5401,31 +5500,32 @@ def build_get_private_access_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5439,35 +5539,35 @@ def build_put_private_access_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5480,31 +5580,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5516,10 +5617,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5527,21 +5629,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5556,12 +5658,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5569,23 +5671,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5599,10 +5701,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5610,21 +5713,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5635,31 +5738,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5670,31 +5774,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5706,10 +5811,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5717,21 +5823,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5743,10 +5849,11 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5754,21 +5861,21 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5780,10 +5887,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5791,21 +5899,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5817,10 +5925,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5828,21 +5937,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5855,10 +5964,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5867,21 +5977,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5893,10 +6003,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5904,21 +6015,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5929,31 +6040,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5965,10 +6077,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5976,21 +6089,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6005,12 +6118,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6018,23 +6131,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6048,10 +6161,11 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6059,21 +6173,21 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6087,35 +6201,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6128,31 +6242,32 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6166,35 +6281,36 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6208,35 +6324,35 @@ def build_restore_from_backup_blob_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6252,35 +6368,35 @@ def build_restore_from_deleted_app_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6296,35 +6412,35 @@ def build_restore_snapshot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6337,31 +6453,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6373,10 +6490,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6384,21 +6502,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6410,10 +6528,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6421,21 +6540,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6447,10 +6566,11 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6458,21 +6578,21 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6483,31 +6603,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6519,10 +6640,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6530,21 +6652,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6559,12 +6681,12 @@ def build_create_or_update_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6572,23 +6694,23 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6605,10 +6727,11 @@ def build_delete_slot_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6616,25 +6739,25 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6649,12 +6772,12 @@ def build_update_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6662,23 +6785,23 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6694,10 +6817,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6705,23 +6829,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6736,12 +6860,12 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6749,23 +6873,23 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6782,12 +6906,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6795,23 +6919,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6825,10 +6949,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6836,21 +6961,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6863,10 +6988,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6875,21 +7001,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6902,10 +7028,11 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6914,21 +7041,21 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6944,12 +7071,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6958,23 +7085,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6992,12 +7119,12 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7006,23 +7133,23 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7036,10 +7163,11 @@ def build_get_basic_publishing_credentials_policies_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7047,21 +7175,21 @@ def build_get_basic_publishing_credentials_policies_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7073,10 +7201,11 @@ def build_get_ftp_allowed_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7084,21 +7213,21 @@ def build_get_ftp_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7113,12 +7242,12 @@ def build_update_ftp_allowed_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7126,23 +7255,23 @@ def build_update_ftp_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7156,10 +7285,11 @@ def build_get_scm_allowed_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7167,21 +7297,21 @@ def build_get_scm_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7196,12 +7326,12 @@ def build_update_scm_allowed_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7209,23 +7339,23 @@ def build_update_scm_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7239,10 +7369,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7250,21 +7381,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7279,12 +7410,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7292,23 +7423,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7322,10 +7453,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7333,21 +7465,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7362,12 +7494,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7375,23 +7507,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7405,10 +7537,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7416,21 +7549,21 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7445,12 +7578,12 @@ def build_update_auth_settings_v2_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7458,23 +7591,23 @@ def build_update_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7488,10 +7621,11 @@ def build_get_auth_settings_v2_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7499,21 +7633,21 @@ def build_get_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7528,12 +7662,12 @@ def build_update_azure_storage_accounts_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7541,23 +7675,23 @@ def build_update_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7571,10 +7705,11 @@ def build_list_azure_storage_accounts_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7582,21 +7717,21 @@ def build_list_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7611,12 +7746,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7624,23 +7759,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7654,10 +7789,11 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7665,21 +7801,21 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7691,10 +7827,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7702,21 +7839,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7728,10 +7865,11 @@ def build_get_app_settings_key_vault_references_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7739,21 +7877,21 @@ def build_get_app_settings_key_vault_references_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7766,10 +7904,11 @@ def build_get_app_setting_key_vault_reference_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7778,21 +7917,21 @@ def build_get_app_setting_key_vault_reference_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7804,10 +7943,11 @@ def build_get_site_connection_string_key_vault_references_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7815,21 +7955,21 @@ def build_get_site_connection_string_key_vault_references_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7842,10 +7982,11 @@ def build_get_site_connection_string_key_vault_reference_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7854,21 +7995,21 @@ def build_get_site_connection_string_key_vault_reference_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7883,12 +8024,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7896,23 +8037,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7926,10 +8067,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7937,21 +8079,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7963,10 +8105,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7974,21 +8117,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8003,12 +8146,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8016,23 +8159,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8049,12 +8192,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8062,23 +8205,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8092,10 +8235,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8103,21 +8247,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8129,10 +8273,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8140,21 +8285,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8169,12 +8314,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8182,23 +8327,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8212,10 +8357,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8223,21 +8369,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8249,10 +8395,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8260,21 +8407,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8289,12 +8436,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8302,23 +8449,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8335,12 +8482,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8348,23 +8495,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8378,10 +8525,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8389,21 +8537,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8416,10 +8564,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8428,21 +8577,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8455,10 +8604,11 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8467,21 +8617,21 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8493,10 +8643,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8504,21 +8655,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8530,10 +8681,11 @@ def build_get_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8541,21 +8693,21 @@ def build_get_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8567,10 +8719,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8578,21 +8731,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8605,10 +8758,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8617,21 +8771,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8644,10 +8798,11 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8656,21 +8811,21 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8683,10 +8838,11 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8695,21 +8851,21 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8722,10 +8878,11 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8734,21 +8891,21 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8760,10 +8917,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8771,21 +8929,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8798,10 +8956,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8810,21 +8969,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8840,12 +8999,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8854,23 +9013,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8885,10 +9044,11 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8897,21 +9057,21 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8924,10 +9084,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8936,21 +9097,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8965,12 +9126,12 @@ def build_discover_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8978,23 +9139,23 @@ def build_discover_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9008,10 +9169,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9019,21 +9181,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9046,10 +9208,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9058,21 +9221,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9088,12 +9251,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9102,23 +9265,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9133,10 +9296,11 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9145,21 +9309,21 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9175,12 +9339,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9189,23 +9353,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9219,10 +9383,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9230,21 +9395,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9259,12 +9424,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9272,23 +9437,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9302,10 +9467,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9313,21 +9479,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9339,10 +9505,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9350,21 +9517,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9376,10 +9543,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9387,21 +9555,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9414,10 +9582,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9426,21 +9595,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9456,12 +9625,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9470,23 +9639,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9501,10 +9670,11 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9513,21 +9683,21 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9544,12 +9714,12 @@ def build_create_or_update_function_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9559,23 +9729,23 @@ def build_create_or_update_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9591,10 +9761,11 @@ def build_delete_function_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9604,21 +9775,21 @@ def build_delete_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9631,10 +9802,11 @@ def build_list_function_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9643,21 +9815,21 @@ def build_list_function_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9670,10 +9842,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9682,21 +9855,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9708,10 +9881,11 @@ def build_list_host_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9719,21 +9893,21 @@ def build_list_host_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9745,10 +9919,11 @@ def build_list_sync_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9756,21 +9931,21 @@ def build_list_sync_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9782,10 +9957,11 @@ def build_sync_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9793,21 +9969,21 @@ def build_sync_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9824,12 +10000,12 @@ def build_create_or_update_host_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9839,23 +10015,23 @@ def build_create_or_update_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9871,10 +10047,11 @@ def build_delete_host_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9884,21 +10061,21 @@ def build_delete_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9910,10 +10087,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9921,21 +10099,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9948,10 +10126,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9960,21 +10139,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9990,12 +10169,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10004,23 +10183,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10035,10 +10214,11 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10047,21 +10227,21 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10075,10 +10255,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10088,21 +10269,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10119,12 +10300,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10134,23 +10315,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10166,10 +10347,11 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10179,21 +10361,21 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10210,12 +10392,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10225,23 +10407,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10255,10 +10437,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10266,21 +10449,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10292,10 +10475,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10303,21 +10487,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10330,10 +10514,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10342,21 +10527,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10372,12 +10557,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10386,23 +10571,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10417,10 +10602,11 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10429,21 +10615,21 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10459,12 +10645,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10473,23 +10659,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10503,10 +10689,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10514,21 +10701,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10541,10 +10728,11 @@ def build_get_instance_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10553,21 +10741,21 @@ def build_get_instance_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10580,10 +10768,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10592,21 +10781,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10622,12 +10811,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10636,23 +10825,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10667,10 +10856,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10679,21 +10869,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10706,10 +10896,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10718,21 +10909,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10746,10 +10937,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10759,21 +10951,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10787,10 +10979,11 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10800,21 +10993,21 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10828,10 +11021,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10841,21 +11035,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10869,10 +11063,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10882,21 +11077,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10911,10 +11106,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10925,21 +11121,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10953,10 +11149,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10966,21 +11163,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10992,10 +11189,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11003,21 +11201,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11029,10 +11227,11 @@ def build_list_site_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11040,21 +11239,21 @@ def build_list_site_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11066,10 +11265,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11077,21 +11277,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11103,10 +11303,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11114,21 +11315,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11140,10 +11341,11 @@ def build_get_swift_virtual_network_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11151,21 +11353,21 @@ def build_get_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11177,10 +11379,11 @@ def build_delete_swift_virtual_network_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11188,21 +11391,21 @@ def build_delete_swift_virtual_network_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11215,10 +11418,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11227,21 +11431,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11254,10 +11458,11 @@ def build_get_network_trace_operation_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11266,21 +11471,21 @@ def build_get_network_trace_operation_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11296,10 +11501,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11307,27 +11513,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11343,10 +11549,11 @@ def build_start_web_site_network_trace_operation_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11354,27 +11561,27 @@ def build_start_web_site_network_trace_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11386,10 +11593,11 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11397,21 +11605,21 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11424,10 +11632,11 @@ def build_get_network_traces_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11436,21 +11645,21 @@ def build_get_network_traces_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11463,10 +11672,11 @@ def build_get_network_trace_operation_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11475,21 +11685,21 @@ def build_get_network_trace_operation_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11502,10 +11712,11 @@ def build_get_network_traces_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11514,21 +11725,21 @@ def build_get_network_traces_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11540,10 +11751,11 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11551,21 +11763,21 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11579,10 +11791,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11590,23 +11803,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11618,10 +11831,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11629,21 +11843,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11655,10 +11869,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11666,21 +11881,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11693,10 +11908,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11705,21 +11921,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11735,12 +11951,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11749,23 +11965,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11780,10 +11996,11 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11792,21 +12009,21 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11822,12 +12039,12 @@ def build_update_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11836,23 +12053,23 @@ def build_update_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11866,10 +12083,11 @@ def build_get_private_access_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11877,21 +12095,21 @@ def build_get_private_access_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11906,12 +12124,12 @@ def build_put_private_access_vnet_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11919,23 +12137,23 @@ def build_put_private_access_vnet_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11949,10 +12167,11 @@ def build_get_private_endpoint_connection_list_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11960,21 +12179,21 @@ def build_get_private_endpoint_connection_list_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11987,10 +12206,11 @@ def build_get_private_endpoint_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11999,21 +12219,21 @@ def build_get_private_endpoint_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12029,12 +12249,12 @@ def build_approve_or_reject_private_endpoint_connection_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12043,23 +12263,23 @@ def build_approve_or_reject_private_endpoint_connection_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12074,10 +12294,11 @@ def build_delete_private_endpoint_connection_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12086,21 +12307,21 @@ def build_delete_private_endpoint_connection_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12112,10 +12333,11 @@ def build_get_private_link_resources_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12123,21 +12345,21 @@ def build_get_private_link_resources_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12149,10 +12371,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12160,21 +12383,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12187,10 +12410,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12199,21 +12423,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12226,10 +12450,11 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12238,21 +12463,21 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12265,10 +12490,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12277,21 +12503,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12304,10 +12530,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12316,21 +12543,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12344,10 +12571,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12357,21 +12585,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12384,10 +12612,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12396,21 +12625,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12422,10 +12651,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12433,21 +12663,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12460,10 +12690,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12472,21 +12703,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12502,12 +12733,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12516,23 +12747,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12547,10 +12778,11 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12559,21 +12791,21 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12588,12 +12820,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12601,23 +12833,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12631,10 +12863,11 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12642,21 +12875,21 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12671,10 +12904,11 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12682,25 +12916,25 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12715,12 +12949,12 @@ def build_restore_from_backup_blob_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12728,23 +12962,23 @@ def build_restore_from_backup_blob_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12761,12 +12995,12 @@ def build_restore_from_deleted_app_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12774,23 +13008,23 @@ def build_restore_from_deleted_app_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12807,12 +13041,12 @@ def build_restore_snapshot_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12820,23 +13054,23 @@ def build_restore_snapshot_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12850,10 +13084,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12861,21 +13096,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12888,10 +13123,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12900,21 +13136,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12927,10 +13163,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12939,21 +13176,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12966,10 +13203,11 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12978,21 +13216,21 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13007,12 +13245,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13020,23 +13258,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13053,12 +13291,12 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13066,23 +13304,23 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13096,10 +13334,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13107,21 +13346,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13133,10 +13372,11 @@ def build_list_snapshots_from_dr_secondary_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13144,21 +13384,21 @@ def build_list_snapshots_from_dr_secondary_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13170,10 +13410,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13181,21 +13422,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13210,12 +13451,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13223,23 +13464,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13255,10 +13496,11 @@ def build_delete_source_control_slot_request( additional_flags: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13266,23 +13508,23 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if additional_flags is not None: - query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13297,12 +13539,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13310,23 +13552,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13340,10 +13582,11 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13351,21 +13594,21 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13381,10 +13624,11 @@ def build_start_network_trace_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13392,27 +13636,27 @@ def build_start_network_trace_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13424,10 +13668,11 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13435,21 +13680,21 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13461,10 +13706,11 @@ def build_stop_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13472,21 +13718,21 @@ def build_stop_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13498,10 +13744,11 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13509,21 +13756,21 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13535,10 +13782,11 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13546,21 +13794,21 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13572,10 +13820,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13583,21 +13832,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13610,10 +13859,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13622,21 +13872,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13649,10 +13899,11 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13661,21 +13912,21 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13688,10 +13939,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13700,21 +13952,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13728,10 +13980,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13741,21 +13994,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13768,10 +14021,11 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13780,21 +14034,21 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13808,10 +14062,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13819,23 +14074,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13847,10 +14102,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13858,21 +14114,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13885,10 +14141,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13897,21 +14154,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13927,12 +14184,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13941,23 +14198,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13972,10 +14229,11 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13984,21 +14242,21 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14014,12 +14272,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14028,23 +14286,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14060,10 +14318,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14073,21 +14332,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14104,12 +14363,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14119,23 +14378,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14154,12 +14413,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14169,23 +14428,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14199,10 +14458,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14210,21 +14470,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14237,10 +14497,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14249,21 +14510,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14277,35 +14538,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14321,35 +14582,35 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14362,31 +14623,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14397,31 +14659,32 @@ def build_list_snapshots_from_dr_secondary_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14432,31 +14695,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14470,35 +14734,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14513,33 +14777,34 @@ def build_delete_source_control_request( additional_flags: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if additional_flags is not None: - query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14553,35 +14818,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14594,31 +14859,32 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14633,37 +14899,38 @@ def build_start_network_trace_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14674,31 +14941,32 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14709,31 +14977,32 @@ def build_stop_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14744,31 +15013,32 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14779,31 +15049,32 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14814,31 +15085,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14850,10 +15122,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14861,21 +15134,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14887,10 +15160,11 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14898,21 +15172,21 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14924,10 +15198,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14935,21 +15210,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14962,10 +15237,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14974,21 +15250,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15000,10 +15276,11 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15011,21 +15288,21 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15038,33 +15315,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15075,31 +15353,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15111,10 +15390,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15122,21 +15402,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15151,12 +15431,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15164,23 +15444,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15194,10 +15474,11 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15205,21 +15486,21 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15234,12 +15515,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15247,23 +15528,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15278,10 +15559,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15290,21 +15572,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15320,12 +15602,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15334,23 +15616,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15368,12 +15650,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15382,23 +15664,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15411,31 +15693,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15447,10 +15730,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15458,25 +15742,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -15505,13 +15789,15 @@ def list( ) -> Iterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15522,6 +15808,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -15531,6 +15818,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15548,7 +15836,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15562,7 +15854,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -15573,7 +15865,7 @@ def list_by_resource_group( ) -> Iterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -15585,6 +15877,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15596,6 +15890,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -15607,6 +15902,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -15625,7 +15921,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15639,7 +15939,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -15650,7 +15950,7 @@ def get( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -15667,17 +15967,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -15694,7 +16001,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -15710,6 +16017,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -15718,6 +16026,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -15725,7 +16034,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15743,7 +16056,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15757,8 +16070,8 @@ def begin_create_or_update( """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. + 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 @@ -15779,8 +16092,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -15792,6 +16106,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15816,13 +16131,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15832,16 +16146,16 @@ def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -15854,11 +16168,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -15866,7 +16183,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -15877,7 +16198,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15891,8 +16212,8 @@ def update( """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. + 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 @@ -15912,6 +16233,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -15920,6 +16242,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -15927,7 +16250,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15946,7 +16273,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15959,13 +16286,13 @@ def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -15978,18 +16305,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16004,11 +16338,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16017,7 +16351,7 @@ def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -16036,6 +16370,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -16044,6 +16379,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -16051,7 +16387,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16062,7 +16402,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -16075,7 +16415,7 @@ def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -16095,6 +16435,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16103,6 +16444,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -16110,7 +16452,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16125,7 +16471,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -16137,7 +16483,7 @@ def list_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -16149,6 +16495,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16161,6 +16509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -16172,6 +16521,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16189,7 +16539,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16203,7 +16557,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def get_backup_status( @@ -16215,7 +16569,7 @@ def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -16234,18 +16588,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16260,11 +16621,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16273,7 +16634,7 @@ def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -16292,18 +16653,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -16314,7 +16682,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -16330,9 +16698,9 @@ def list_backup_status_secrets( 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. + 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 @@ -16353,6 +16721,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16362,6 +16731,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -16369,7 +16739,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16384,10 +16758,10 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - def _restore_initial( + def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16401,6 +16775,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -16410,6 +16785,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -16417,7 +16793,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -16427,11 +16807,11 @@ def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore( + def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16441,7 +16821,7 @@ def begin_restore( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -16463,8 +16843,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -16477,6 +16858,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16498,10 +16880,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def get_basic_publishing_credentials_policies( @@ -16512,8 +16893,7 @@ def get_basic_publishing_credentials_policies( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -16530,17 +16910,24 @@ def get_basic_publishing_credentials_policies( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_basic_publishing_credentials_policies_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16555,7 +16942,7 @@ def get_basic_publishing_credentials_policies( return deserialized - get_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace @@ -16567,7 +16954,7 @@ def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -16584,17 +16971,24 @@ def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16609,7 +17003,7 @@ def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16622,7 +17016,7 @@ def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -16642,6 +17036,7 @@ def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16650,6 +17045,7 @@ def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -16657,7 +17053,11 @@ def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16672,7 +17072,7 @@ def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16684,7 +17084,7 @@ def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -16701,17 +17101,24 @@ def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16726,7 +17133,7 @@ def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16739,7 +17146,7 @@ def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -16759,6 +17166,7 @@ def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16767,6 +17175,7 @@ def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -16774,7 +17183,11 @@ def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16789,7 +17202,7 @@ def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16801,7 +17214,7 @@ def list_configurations( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -16814,6 +17227,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16826,6 +17241,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -16837,6 +17253,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16854,7 +17271,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16868,7 +17289,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -16880,7 +17301,7 @@ def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -16899,6 +17320,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -16907,6 +17329,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -16914,7 +17337,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16929,7 +17356,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -16941,7 +17368,7 @@ def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -16958,17 +17385,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16983,7 +17417,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -16996,7 +17430,7 @@ def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -17015,6 +17449,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -17023,6 +17458,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -17030,7 +17466,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17045,7 +17485,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -17057,7 +17497,7 @@ def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -17074,17 +17514,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17099,7 +17546,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -17112,8 +17559,7 @@ def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -17132,6 +17578,7 @@ def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -17140,6 +17587,7 @@ def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -17147,7 +17595,11 @@ def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17162,7 +17614,7 @@ def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -17174,7 +17626,7 @@ def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -17191,17 +17643,24 @@ def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17216,7 +17675,7 @@ def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -17229,7 +17688,7 @@ def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -17249,6 +17708,7 @@ def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -17257,6 +17717,7 @@ def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -17264,7 +17725,11 @@ def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17279,7 +17744,7 @@ def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -17291,7 +17756,7 @@ def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -17308,17 +17773,24 @@ def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17333,7 +17805,7 @@ def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -17346,7 +17818,7 @@ def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -17365,6 +17837,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -17373,6 +17846,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -17380,7 +17854,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17395,11 +17873,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17407,7 +17885,7 @@ def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -17424,17 +17902,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17445,7 +17930,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -17457,7 +17942,7 @@ def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -17474,17 +17959,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17499,7 +17991,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -17511,7 +18003,7 @@ def get_app_settings_key_vault_references( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -17524,6 +18016,8 @@ def get_app_settings_key_vault_references( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17536,6 +18030,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -17547,6 +18042,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17564,7 +18060,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17578,7 +18078,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace def get_app_setting_key_vault_reference( @@ -17590,7 +18090,7 @@ def get_app_setting_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -17609,18 +18109,25 @@ def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17635,7 +18142,7 @@ def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -17647,7 +18154,7 @@ def get_site_connection_string_key_vault_references( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -17660,6 +18167,8 @@ def get_site_connection_string_key_vault_references( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17672,6 +18181,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -17683,6 +18193,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17700,7 +18211,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17714,7 +18229,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace def get_site_connection_string_key_vault_reference( @@ -17726,7 +18241,7 @@ def get_site_connection_string_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -17745,18 +18260,25 @@ def get_site_connection_string_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_connection_string_key_vault_reference_request( resource_group_name=resource_group_name, name=name, connection_string_key=connection_string_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17771,7 +18293,7 @@ def get_site_connection_string_key_vault_reference( return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace @@ -17784,7 +18306,7 @@ def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -17803,6 +18325,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -17811,6 +18334,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -17818,7 +18342,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17833,7 +18361,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -17845,7 +18373,7 @@ def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -17862,17 +18390,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17887,7 +18422,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -17899,7 +18434,7 @@ def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -17916,17 +18451,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17941,7 +18483,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -17954,7 +18496,7 @@ def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -17974,6 +18516,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -17982,6 +18525,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -17989,7 +18533,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18004,7 +18552,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -18017,7 +18565,7 @@ def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -18036,6 +18584,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -18044,6 +18593,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -18051,7 +18601,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18066,7 +18620,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -18078,7 +18632,7 @@ def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -18095,17 +18649,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18120,7 +18681,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -18135,17 +18696,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18159,7 +18727,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -18171,7 +18739,7 @@ def begin_list_publishing_credentials( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -18189,7 +18757,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -18200,6 +18769,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -18223,10 +18793,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -18238,7 +18807,7 @@ def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -18257,6 +18826,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -18265,6 +18835,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -18272,7 +18843,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18287,7 +18862,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -18299,7 +18874,7 @@ def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -18316,17 +18891,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18341,7 +18923,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -18353,8 +18935,7 @@ def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -18371,17 +18952,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18396,7 +18984,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -18410,8 +18998,8 @@ def update_slot_configuration_names( """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. + 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 @@ -18430,6 +19018,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -18438,6 +19027,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -18445,7 +19035,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18460,7 +19054,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -18473,8 +19067,8 @@ def get_configuration( """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. + 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 @@ -18491,17 +19085,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18516,7 +19117,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18529,7 +19130,7 @@ def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -18548,6 +19149,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -18556,6 +19158,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -18563,7 +19166,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18578,7 +19185,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18591,7 +19198,7 @@ def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -18610,6 +19217,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -18618,6 +19226,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -18625,7 +19234,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18640,7 +19253,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18653,8 +19266,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -18667,6 +19280,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18679,6 +19294,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -18690,6 +19306,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18707,7 +19324,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18721,7 +19342,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -18733,7 +19354,7 @@ def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -18752,18 +19373,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18778,11 +19406,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18791,7 +19419,7 @@ def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -18810,18 +19438,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18832,7 +19467,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -18844,7 +19479,7 @@ def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -18861,17 +19496,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18887,7 +19529,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -18899,7 +19541,7 @@ def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -18916,17 +19558,24 @@ def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -18942,7 +19591,7 @@ def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -18954,7 +19603,7 @@ def list_continuous_web_jobs( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -18967,6 +19616,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18979,6 +19630,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -18990,6 +19642,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19007,7 +19660,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19021,7 +19678,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -19033,7 +19690,7 @@ def get_continuous_web_job( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -19052,18 +19709,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19080,11 +19744,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19093,7 +19757,7 @@ def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -19112,18 +19776,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19134,11 +19805,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19147,7 +19818,7 @@ def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -19166,18 +19837,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19188,11 +19866,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19201,7 +19879,7 @@ def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -19220,18 +19898,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -19242,7 +19927,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -19254,7 +19939,7 @@ def list_deployments( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -19266,6 +19951,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19278,6 +19965,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -19289,6 +19977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19306,7 +19995,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19320,7 +20013,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -19332,7 +20025,7 @@ def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -19351,18 +20044,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19377,7 +20077,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -19391,7 +20091,7 @@ def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -19412,6 +20112,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -19421,6 +20122,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -19428,7 +20130,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19443,11 +20149,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19456,7 +20162,7 @@ def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -19475,18 +20181,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19497,7 +20210,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -19510,7 +20223,7 @@ def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -19530,18 +20243,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19556,7 +20276,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -19570,8 +20290,8 @@ def discover_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. - 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. + 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 @@ -19591,6 +20311,7 @@ def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -19599,6 +20320,7 @@ def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -19606,7 +20328,11 @@ def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19621,7 +20347,7 @@ def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -19633,7 +20359,7 @@ def list_domain_ownership_identifiers( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -19645,6 +20371,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19657,6 +20385,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -19668,6 +20397,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19685,7 +20415,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19699,7 +20433,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -19711,7 +20445,7 @@ def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -19730,18 +20464,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19756,7 +20497,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19770,8 +20511,7 @@ def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19792,6 +20532,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19801,6 +20542,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -19808,7 +20550,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19823,11 +20569,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19836,7 +20582,7 @@ def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -19855,18 +20601,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19877,7 +20630,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19891,8 +20644,7 @@ def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19913,6 +20665,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19922,6 +20675,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -19929,7 +20683,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19944,7 +20702,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19956,7 +20714,7 @@ def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -19973,17 +20731,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19998,7 +20763,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -20014,6 +20779,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -20022,6 +20788,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -20029,7 +20796,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -20045,7 +20816,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -20058,7 +20829,7 @@ def begin_create_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -20079,8 +20850,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -20092,6 +20864,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20116,10 +20889,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -20130,7 +20902,7 @@ def get_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -20147,17 +20919,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20174,7 +20953,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -20186,7 +20965,7 @@ def list_functions( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -20199,6 +20978,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20211,6 +20992,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -20222,6 +21004,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20239,7 +21022,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20253,7 +21040,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -20264,7 +21051,7 @@ def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -20281,17 +21068,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20306,7 +21100,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -20319,7 +21113,7 @@ def get_function( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -20338,18 +21132,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -20366,7 +21167,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -20383,6 +21184,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -20392,6 +21194,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -20399,7 +21202,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -20413,7 +21220,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -20427,7 +21234,7 @@ def begin_create_function( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -20450,8 +21257,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -20464,6 +21272,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20488,13 +21297,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20503,7 +21311,7 @@ def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -20522,18 +21330,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20544,7 +21359,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -20559,7 +21374,7 @@ def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -20582,6 +21397,7 @@ def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -20592,6 +21408,7 @@ def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -20599,7 +21416,11 @@ def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -20618,11 +21439,11 @@ def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret( + def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20632,7 +21453,7 @@ def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -20653,6 +21474,8 @@ def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -20660,12 +21483,17 @@ def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -20676,7 +21504,7 @@ def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -20689,7 +21517,7 @@ def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -20708,18 +21536,25 @@ def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20734,7 +21569,7 @@ def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -20747,7 +21582,7 @@ def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -20766,18 +21601,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20792,7 +21634,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -20804,7 +21646,7 @@ def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -20821,17 +21663,24 @@ def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20846,11 +21695,11 @@ def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status( + def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20858,7 +21707,7 @@ def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -20875,17 +21724,24 @@ def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20896,11 +21752,11 @@ def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions( + def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20908,7 +21764,7 @@ def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -20925,17 +21781,24 @@ def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20946,7 +21809,7 @@ def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace @@ -20961,7 +21824,7 @@ def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -20984,6 +21847,7 @@ def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -20994,6 +21858,7 @@ def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -21001,7 +21866,11 @@ def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -21020,11 +21889,11 @@ def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret( + def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21034,7 +21903,7 @@ def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -21055,6 +21924,8 @@ def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -21062,12 +21933,17 @@ def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -21078,7 +21954,7 @@ def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -21090,7 +21966,7 @@ def list_host_name_bindings( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -21103,6 +21979,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21115,6 +21993,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -21126,6 +22005,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21143,7 +22023,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21157,7 +22041,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -21169,7 +22053,7 @@ def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -21188,18 +22072,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21214,7 +22105,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -21228,7 +22119,7 @@ def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -21250,6 +22141,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -21259,6 +22151,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -21266,7 +22159,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21281,11 +22178,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21294,7 +22191,7 @@ def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -21313,18 +22210,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -21335,7 +22239,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -21349,7 +22253,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -21370,6 +22274,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -21377,12 +22283,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21397,7 +22308,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21412,7 +22323,7 @@ def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -21435,6 +22346,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -21445,6 +22357,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -21452,7 +22365,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21467,11 +22384,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21481,7 +22398,7 @@ def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -21502,6 +22419,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -21509,12 +22428,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21525,7 +22449,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21540,7 +22464,7 @@ def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -21563,6 +22487,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -21573,6 +22498,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -21580,7 +22506,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21595,7 +22525,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21607,7 +22537,7 @@ def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -21624,17 +22554,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21649,7 +22586,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -21661,8 +22598,7 @@ def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -21679,17 +22615,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21704,7 +22647,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -21717,7 +22660,7 @@ def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -21736,18 +22679,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21762,7 +22712,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21776,8 +22726,7 @@ def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21798,6 +22747,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21807,6 +22757,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -21814,7 +22765,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21829,11 +22784,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21842,7 +22797,7 @@ def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -21861,18 +22816,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -21883,7 +22845,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21897,8 +22859,7 @@ def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21919,6 +22880,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21928,6 +22890,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -21935,7 +22898,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21950,7 +22917,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21962,7 +22929,7 @@ def list_instance_identifiers( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -21975,6 +22942,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21987,6 +22956,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -21998,6 +22968,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22015,7 +22986,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22029,7 +23004,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_info( @@ -22041,7 +23016,7 @@ def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -22060,18 +23035,25 @@ def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22086,7 +23068,7 @@ def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -22099,7 +23081,7 @@ def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -22118,18 +23100,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22144,7 +23133,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -22161,6 +23150,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -22170,6 +23160,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -22177,7 +23168,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -22193,7 +23188,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -22207,7 +23202,7 @@ def begin_create_instance_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -22230,8 +23225,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -22244,6 +23240,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22268,10 +23265,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -22283,7 +23279,7 @@ def get_instance_ms_deploy_log( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -22302,18 +23298,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22330,7 +23333,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -22344,8 +23347,8 @@ def list_instance_processes( """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. + 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 @@ -22360,6 +23363,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22373,6 +23378,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -22385,6 +23391,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22402,7 +23409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22416,7 +23427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -22429,8 +23440,7 @@ def get_instance_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -22452,6 +23462,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -22459,12 +23471,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22481,11 +23498,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22496,8 +23513,8 @@ def delete_instance_process( """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. + 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 @@ -22519,6 +23536,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -22526,12 +23545,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -22542,7 +23566,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -22556,8 +23580,7 @@ def get_instance_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -22579,6 +23602,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -22586,12 +23611,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22608,7 +23638,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -22623,8 +23653,8 @@ def list_instance_process_modules( """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. + 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 @@ -22642,6 +23672,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22656,6 +23688,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -22669,6 +23702,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22686,7 +23720,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22700,7 +23738,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -22714,8 +23752,7 @@ def get_instance_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -22739,6 +23776,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -22747,12 +23786,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22769,7 +23813,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -22783,8 +23827,7 @@ def list_instance_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -22802,6 +23845,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22816,6 +23861,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -22829,6 +23875,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22846,7 +23893,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -22860,7 +23911,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable( @@ -22871,7 +23922,7 @@ def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -22888,17 +23939,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22913,7 +23971,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -22925,7 +23983,7 @@ def list_site_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -22937,6 +23995,8 @@ def list_site_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22949,6 +24009,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -22960,6 +24021,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22977,7 +24039,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22991,7 +24057,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers( @@ -23002,7 +24068,7 @@ def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -23019,17 +24085,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23044,7 +24117,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore def _migrate_storage_initial( @@ -23061,6 +24134,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -23069,6 +24143,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -23077,7 +24152,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23091,7 +24170,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -23105,7 +24184,7 @@ def begin_migrate_storage( ) -> LROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -23129,8 +24208,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -23143,6 +24223,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23167,10 +24248,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -23185,6 +24265,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -23193,6 +24274,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -23200,7 +24282,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23214,7 +24300,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -23227,7 +24313,7 @@ def begin_migrate_my_sql( ) -> LROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -23247,8 +24333,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -23260,6 +24347,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23284,10 +24372,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -23299,8 +24386,8 @@ def get_migrate_my_sql_status( """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. + 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 @@ -23317,17 +24404,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23342,7 +24436,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -23354,7 +24448,7 @@ def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -23371,17 +24465,24 @@ def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23396,7 +24497,7 @@ def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23412,9 +24513,9 @@ def create_or_update_swift_virtual_network_connection_with_check( 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 + 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. @@ -23434,6 +24535,7 @@ def create_or_update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -23442,6 +24544,7 @@ def create_or_update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check.metadata['url'], @@ -23449,7 +24552,11 @@ def create_or_update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23464,11 +24571,11 @@ def create_or_update_swift_virtual_network_connection_with_check( return deserialized - create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network( + def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23476,7 +24583,7 @@ def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -23493,17 +24600,24 @@ def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23514,7 +24628,7 @@ def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23527,7 +24641,7 @@ def list_network_features( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -23546,18 +24660,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -23574,7 +24695,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -23587,8 +24708,7 @@ def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23607,18 +24727,25 @@ def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23637,7 +24764,7 @@ def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -23652,17 +24779,17 @@ def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -23675,11 +24802,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23688,7 +24818,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23703,7 +24837,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_initial( @@ -23721,11 +24855,14 @@ def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23734,7 +24871,11 @@ def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23752,7 +24893,7 @@ def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -23767,17 +24908,17 @@ def begin_start_web_site_network_trace_operation( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23792,7 +24933,8 @@ def begin_start_web_site_network_trace_operation( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_01_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -23806,6 +24948,7 @@ def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23829,13 +24972,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace( + def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23843,7 +24985,7 @@ def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -23860,17 +25002,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23881,7 +25030,7 @@ def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace @@ -23894,8 +25043,7 @@ def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23914,18 +25062,25 @@ def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23940,7 +25095,7 @@ def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -23953,8 +25108,7 @@ def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23973,18 +25127,25 @@ def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24003,7 +25164,7 @@ def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -24016,8 +25177,7 @@ def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24036,18 +25196,25 @@ def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24062,11 +25229,11 @@ def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24074,8 +25241,7 @@ def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -24092,17 +25258,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24113,7 +25286,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -24126,7 +25299,7 @@ def list_perf_mon_counters( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -24134,7 +25307,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -24143,6 +25316,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24155,6 +25330,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -24167,6 +25343,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24185,7 +25362,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24199,7 +25380,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -24210,7 +25391,7 @@ def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -24227,17 +25408,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24252,7 +25440,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -24264,7 +25452,7 @@ def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -24281,17 +25469,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24306,7 +25501,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -24319,7 +25514,7 @@ def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -24338,18 +25533,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24364,7 +25566,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24378,7 +25580,7 @@ def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -24399,6 +25601,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -24408,6 +25611,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -24415,7 +25619,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24430,11 +25638,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24443,7 +25651,7 @@ def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -24462,18 +25670,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24484,7 +25699,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24498,7 +25713,7 @@ def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -24519,6 +25734,7 @@ def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -24528,6 +25744,7 @@ def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -24535,7 +25752,11 @@ def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24550,7 +25771,7 @@ def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24563,8 +25784,8 @@ def get_private_access( """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. + 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 @@ -24581,17 +25802,24 @@ def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24606,7 +25834,7 @@ def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -24620,8 +25848,8 @@ def put_private_access_vnet( """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. + 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 @@ -24640,6 +25868,7 @@ def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -24648,6 +25877,7 @@ def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -24655,7 +25885,11 @@ def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24670,7 +25904,7 @@ def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -24682,7 +25916,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -24695,6 +25929,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24707,6 +25943,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -24718,6 +25955,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24735,7 +25973,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24749,7 +25991,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -24761,7 +26003,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -24780,18 +26022,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24806,7 +26055,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -24823,6 +26072,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -24832,6 +26082,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -24839,7 +26090,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24857,7 +26112,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -24871,7 +26126,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -24896,8 +26151,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -24910,6 +26166,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -24934,10 +26191,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -24952,18 +26208,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -24984,7 +26247,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -24997,7 +26260,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25017,7 +26280,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -25029,6 +26293,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25052,10 +26317,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -25066,7 +26330,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25083,17 +26347,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25108,7 +26379,7 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -25121,8 +26392,8 @@ def list_processes( """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. + 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 @@ -25134,6 +26405,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25146,6 +26419,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -25157,6 +26431,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25174,7 +26449,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25188,7 +26467,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -25200,8 +26479,7 @@ def get_process( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -25220,18 +26498,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25248,11 +26533,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25262,8 +26547,8 @@ def delete_process( """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. + 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 @@ -25282,18 +26567,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -25304,7 +26596,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -25317,8 +26609,7 @@ def get_process_dump( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -25337,18 +26628,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25365,7 +26663,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -25379,8 +26677,8 @@ def list_process_modules( """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. + 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 @@ -25395,6 +26693,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25408,6 +26708,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -25420,6 +26721,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25437,7 +26739,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25451,7 +26757,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -25464,8 +26770,7 @@ def get_process_module( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -25486,6 +26791,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -25493,12 +26800,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25515,7 +26827,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -25528,8 +26840,7 @@ def list_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -25544,6 +26855,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25557,6 +26870,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -25569,6 +26883,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25586,7 +26901,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -25600,7 +26919,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -25611,7 +26930,7 @@ def list_public_certificates( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -25624,6 +26943,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25636,6 +26957,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -25647,6 +26969,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25664,7 +26987,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25678,7 +27005,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -25690,7 +27017,7 @@ def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -25709,18 +27036,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25735,7 +27069,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -25749,7 +27083,7 @@ def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -25771,6 +27105,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -25780,6 +27115,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -25787,7 +27123,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25802,11 +27142,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25815,7 +27155,7 @@ def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -25834,18 +27174,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -25856,7 +27203,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -25869,7 +27216,7 @@ def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -25890,6 +27237,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -25898,6 +27246,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -25905,7 +27254,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25920,11 +27273,11 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25933,8 +27286,8 @@ def reset_production_slot_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. + 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 @@ -25951,17 +27304,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25972,11 +27332,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25986,17 +27346,18 @@ def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -26009,11 +27370,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -26021,7 +27385,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26032,10 +27400,10 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - def _restore_from_backup_blob_initial( + def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26048,6 +27416,7 @@ def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -26056,6 +27425,7 @@ def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -26063,7 +27433,11 @@ def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26073,11 +27447,11 @@ def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob( + def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26086,7 +27460,7 @@ def begin_restore_from_backup_blob( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -26106,8 +27480,9 @@ def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26119,6 +27494,7 @@ def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26140,12 +27516,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_initial( + def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26158,6 +27533,7 @@ def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -26166,6 +27542,7 @@ def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -26173,7 +27550,11 @@ def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26183,11 +27564,11 @@ def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app( + def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26196,7 +27577,7 @@ def begin_restore_from_deleted_app( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -26216,8 +27597,9 @@ def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26229,6 +27611,7 @@ def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26250,12 +27633,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_initial( + def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26268,6 +27650,7 @@ def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -26276,6 +27659,7 @@ def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -26283,7 +27667,11 @@ def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26293,11 +27681,11 @@ def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot( + def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26306,7 +27694,7 @@ def begin_restore_snapshot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -26327,8 +27715,9 @@ def begin_restore_snapshot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26340,6 +27729,7 @@ def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26361,10 +27751,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -26375,7 +27764,7 @@ def list_site_extensions( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -26388,6 +27777,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26400,6 +27791,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -26411,6 +27803,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26428,7 +27821,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26442,7 +27839,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -26454,7 +27851,7 @@ def get_site_extension( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -26473,18 +27870,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26501,7 +27905,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -26517,18 +27921,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -26547,7 +27958,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -26560,7 +27971,7 @@ def begin_install_site_extension( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -26581,7 +27992,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -26593,6 +28005,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -26616,13 +28029,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26631,7 +28043,7 @@ def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -26650,18 +28062,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -26672,7 +28091,7 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -26684,7 +28103,7 @@ def list_slots( ) -> Iterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -26695,6 +28114,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26707,6 +28128,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -26718,6 +28140,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26735,7 +28158,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26749,7 +28176,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -26761,7 +28188,7 @@ def get_slot( ) -> Optional["_models.Site"]: """Gets the details of a web, mobile, or API app. - Description for Gets the details of a web, mobile, or API app. + 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 @@ -26780,18 +28207,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -26808,7 +28242,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -26825,6 +28259,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -26834,6 +28269,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -26841,7 +28277,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26859,7 +28299,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -26874,8 +28314,8 @@ def begin_create_or_update_slot( """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. + 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 @@ -26899,8 +28339,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -26913,6 +28354,7 @@ def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26937,13 +28379,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26954,7 +28395,7 @@ def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -26963,10 +28404,10 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -26979,12 +28420,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -26992,7 +28436,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204, 404]: @@ -27003,7 +28451,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27018,8 +28466,8 @@ def update_slot( """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. + 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 @@ -27042,6 +28490,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -27051,6 +28500,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -27058,7 +28508,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27077,7 +28531,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27091,7 +28545,7 @@ def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -27099,7 +28553,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -27112,19 +28566,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27139,11 +28600,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27153,7 +28614,7 @@ def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -27175,6 +28636,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -27184,6 +28646,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -27191,7 +28654,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27202,7 +28669,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -27216,7 +28683,7 @@ def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -27239,6 +28706,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27248,6 +28716,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -27255,7 +28724,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27270,7 +28743,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -27283,7 +28756,7 @@ def list_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -27298,6 +28771,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27311,6 +28786,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -27323,6 +28799,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27340,7 +28817,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27354,7 +28835,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def get_backup_status_slot( @@ -27367,7 +28848,7 @@ def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -27389,6 +28870,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -27396,12 +28879,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27416,11 +28904,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27430,7 +28918,7 @@ def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -27452,6 +28940,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -27459,12 +28949,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -27475,7 +28970,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -27492,9 +28987,9 @@ def list_backup_status_secrets_slot( 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. + 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 @@ -27517,6 +29012,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27527,6 +29023,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -27534,7 +29031,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27549,10 +29050,10 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - def _restore_slot_initial( + def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27567,6 +29068,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -27577,6 +29079,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -27584,7 +29087,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27594,11 +29101,11 @@ def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore_slot( + def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27609,7 +29116,7 @@ def begin_restore_slot( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -27634,8 +29141,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -27649,6 +29157,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -27670,10 +29179,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def get_basic_publishing_credentials_policies_slot( @@ -27685,8 +29193,7 @@ def get_basic_publishing_credentials_policies_slot( ) -> "_models.CsmPublishingCredentialsPoliciesCollection": """Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. - Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - given site. + 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 @@ -27705,18 +29212,25 @@ def get_basic_publishing_credentials_policies_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_basic_publishing_credentials_policies_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_basic_publishing_credentials_policies_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27731,7 +29245,7 @@ def get_basic_publishing_credentials_policies_slot( return deserialized - get_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + get_basic_publishing_credentials_policies_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace @@ -27744,7 +29258,7 @@ def get_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -27763,18 +29277,25 @@ def get_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ftp_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27789,7 +29310,7 @@ def get_ftp_allowed_slot( return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -27803,7 +29324,7 @@ def update_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -27825,6 +29346,7 @@ def update_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -27834,6 +29356,7 @@ def update_ftp_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed_slot.metadata['url'], @@ -27841,7 +29364,11 @@ def update_ftp_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27856,7 +29383,7 @@ def update_ftp_allowed_slot( return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -27869,7 +29396,7 @@ def get_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -27888,18 +29415,25 @@ def get_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_scm_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27914,7 +29448,7 @@ def get_scm_allowed_slot( return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -27928,7 +29462,7 @@ def update_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -27950,6 +29484,7 @@ def update_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -27959,6 +29494,7 @@ def update_scm_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed_slot.metadata['url'], @@ -27966,7 +29502,11 @@ def update_scm_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27981,7 +29521,7 @@ def update_scm_allowed_slot( return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -27994,7 +29534,7 @@ def list_configurations_slot( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -28010,6 +29550,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28023,6 +29565,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -28035,6 +29578,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28052,7 +29596,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28066,7 +29614,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -28079,7 +29627,7 @@ def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -28101,6 +29649,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -28110,6 +29659,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -28117,7 +29667,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28132,7 +29686,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -28145,7 +29699,7 @@ def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -28165,18 +29719,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28191,7 +29752,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -28205,7 +29766,7 @@ def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -28226,6 +29787,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -28235,6 +29797,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -28242,7 +29805,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28257,7 +29824,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -28270,7 +29837,7 @@ def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -28290,18 +29857,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28316,7 +29890,7 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace @@ -28330,8 +29904,7 @@ def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -28352,6 +29925,7 @@ def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -28361,6 +29935,7 @@ def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -28368,7 +29943,11 @@ def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28383,7 +29962,7 @@ def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -28396,7 +29975,7 @@ def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -28416,18 +29995,25 @@ def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28442,7 +30028,7 @@ def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -28456,7 +30042,7 @@ def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -28479,6 +30065,7 @@ def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -28488,6 +30075,7 @@ def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -28495,7 +30083,11 @@ def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28510,7 +30102,7 @@ def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -28523,7 +30115,7 @@ def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -28543,18 +30135,25 @@ def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28569,7 +30168,7 @@ def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -28583,7 +30182,7 @@ def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -28605,6 +30204,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -28614,6 +30214,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -28621,7 +30222,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28636,11 +30241,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28649,7 +30254,7 @@ def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -28669,18 +30274,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28691,7 +30303,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -28704,7 +30316,7 @@ def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -28724,18 +30336,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28750,7 +30369,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -28763,7 +30382,7 @@ def get_app_settings_key_vault_references_slot( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -28778,6 +30397,8 @@ def get_app_settings_key_vault_references_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28791,6 +30412,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -28803,6 +30425,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28820,7 +30443,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28834,7 +30461,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings"} # type: ignore @distributed_trace def get_app_setting_key_vault_reference_slot( @@ -28847,7 +30474,7 @@ def get_app_setting_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -28868,6 +30495,8 @@ def get_app_setting_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_app_setting_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -28875,12 +30504,17 @@ def get_app_setting_key_vault_reference_slot( app_setting_key=app_setting_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28895,7 +30529,7 @@ def get_app_setting_key_vault_reference_slot( return deserialized - get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -28908,7 +30542,7 @@ def get_site_connection_string_key_vault_references_slot( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -28923,6 +30557,8 @@ def get_site_connection_string_key_vault_references_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28936,6 +30572,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -28948,6 +30585,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28965,7 +30603,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28979,7 +30621,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace def get_site_connection_string_key_vault_reference_slot( @@ -28992,7 +30634,7 @@ def get_site_connection_string_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -29013,6 +30655,8 @@ def get_site_connection_string_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_connection_string_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -29020,12 +30664,17 @@ def get_site_connection_string_key_vault_reference_slot( connection_string_key=connection_string_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29040,7 +30689,7 @@ def get_site_connection_string_key_vault_reference_slot( return deserialized - get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace @@ -29054,7 +30703,7 @@ def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -29076,6 +30725,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -29085,6 +30735,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -29092,7 +30743,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29107,7 +30762,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -29120,7 +30775,7 @@ def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -29140,18 +30795,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29166,7 +30828,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -29179,7 +30841,7 @@ def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -29199,18 +30861,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29225,7 +30894,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -29239,7 +30908,7 @@ def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -29262,6 +30931,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -29271,6 +30941,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -29278,7 +30949,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29293,7 +30968,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -29307,7 +30982,7 @@ def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -29329,6 +31004,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -29338,6 +31014,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -29345,7 +31022,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29360,7 +31041,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -29373,7 +31054,7 @@ def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -29393,18 +31074,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29419,7 +31107,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -29435,18 +31123,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29460,7 +31155,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -29473,7 +31168,7 @@ def begin_list_publishing_credentials_slot( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -29494,7 +31189,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -29506,6 +31202,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -29529,10 +31226,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -29545,7 +31241,7 @@ def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -29566,6 +31262,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -29575,6 +31272,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -29582,7 +31280,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29597,7 +31299,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -29610,7 +31312,7 @@ def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -29629,18 +31331,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29655,7 +31364,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -29669,8 +31378,8 @@ def get_configuration_slot( """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. + 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 @@ -29690,18 +31399,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29716,7 +31432,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -29730,7 +31446,7 @@ def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -29752,6 +31468,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -29761,6 +31478,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -29768,7 +31486,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29783,7 +31505,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -29797,7 +31519,7 @@ def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -29819,6 +31541,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -29828,6 +31551,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -29835,7 +31559,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29850,7 +31578,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -29864,8 +31592,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -29881,6 +31609,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29894,6 +31624,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -29906,6 +31637,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29923,7 +31655,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29937,7 +31673,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -29950,7 +31686,7 @@ def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -29972,6 +31708,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -29979,12 +31717,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29999,11 +31742,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30013,7 +31756,7 @@ def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -30035,6 +31778,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -30042,12 +31787,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30058,7 +31808,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -30071,7 +31821,7 @@ def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -30090,18 +31840,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30117,7 +31874,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -30130,7 +31887,7 @@ def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -30149,18 +31906,25 @@ def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30176,7 +31940,7 @@ def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -30189,7 +31953,7 @@ def list_continuous_web_jobs_slot( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -30205,6 +31969,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30218,6 +31984,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -30230,6 +31997,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30247,7 +32015,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30261,7 +32033,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -30274,7 +32046,7 @@ def get_continuous_web_job_slot( ) -> Optional["_models.ContinuousWebJob"]: """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -30296,6 +32068,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30303,12 +32077,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30325,11 +32104,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30339,7 +32118,7 @@ def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -30361,6 +32140,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30368,12 +32149,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30384,11 +32170,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30398,7 +32184,7 @@ def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -30420,6 +32206,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30427,12 +32215,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30443,11 +32236,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30457,7 +32250,7 @@ def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -30479,6 +32272,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30486,12 +32281,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -30502,7 +32302,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -30515,7 +32315,7 @@ def list_deployments_slot( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -30530,6 +32330,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30543,6 +32345,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -30555,6 +32358,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30572,7 +32376,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30586,7 +32394,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -30599,7 +32407,7 @@ def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -30621,6 +32429,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -30628,12 +32438,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30648,7 +32463,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -30663,7 +32478,7 @@ def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -30687,6 +32502,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -30697,6 +32513,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -30704,7 +32521,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30719,11 +32540,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30733,7 +32554,7 @@ def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -30755,6 +32576,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -30762,12 +32585,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30778,7 +32606,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -30792,7 +32620,7 @@ def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -30815,6 +32643,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -30822,12 +32652,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30842,7 +32677,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -30857,8 +32692,8 @@ def discover_backup_slot( """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. + 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 @@ -30881,6 +32716,7 @@ def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -30890,6 +32726,7 @@ def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -30897,7 +32734,11 @@ def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30912,7 +32753,7 @@ def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -30925,7 +32766,7 @@ def list_domain_ownership_identifiers_slot( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -30940,6 +32781,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30953,6 +32796,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -30965,6 +32809,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30982,7 +32827,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30996,7 +32845,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -31009,7 +32858,7 @@ def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -31031,6 +32880,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -31038,12 +32889,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31058,7 +32914,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31073,8 +32929,7 @@ def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -31098,6 +32953,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -31108,6 +32964,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -31115,7 +32972,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31130,11 +32991,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31144,7 +33005,7 @@ def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -31166,6 +33027,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -31173,12 +33036,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -31189,7 +33057,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31204,8 +33072,7 @@ def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -31229,6 +33096,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -31239,6 +33107,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -31246,7 +33115,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31261,7 +33134,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31274,7 +33147,7 @@ def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -31293,18 +33166,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31319,7 +33199,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -31336,6 +33216,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -31345,6 +33226,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -31352,7 +33234,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -31368,7 +33254,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -31382,7 +33268,7 @@ def begin_create_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -31405,8 +33291,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -31419,6 +33306,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -31443,10 +33331,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -31458,7 +33345,7 @@ def get_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -31477,18 +33364,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31505,7 +33399,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -31518,7 +33412,7 @@ def list_instance_functions_slot( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -31533,6 +33427,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31546,6 +33442,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -31558,6 +33455,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31575,7 +33473,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31589,7 +33491,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -31601,7 +33503,7 @@ def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -31620,18 +33522,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31646,7 +33555,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -31660,7 +33569,7 @@ def get_instance_function_slot( ) -> Optional["_models.FunctionEnvelope"]: """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -31681,6 +33590,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -31688,12 +33599,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -31710,7 +33626,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -31728,6 +33644,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -31738,6 +33655,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -31745,7 +33663,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -31759,7 +33681,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -31774,7 +33696,7 @@ def begin_create_instance_function_slot( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -31799,8 +33721,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -31814,6 +33737,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -31838,13 +33762,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31854,7 +33777,7 @@ def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -31875,6 +33798,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -31882,12 +33807,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -31898,7 +33828,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -31914,7 +33844,7 @@ def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -31939,6 +33869,7 @@ def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -31950,6 +33881,7 @@ def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -31957,7 +33889,11 @@ def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -31976,11 +33912,11 @@ def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret_slot( + def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31991,7 +33927,7 @@ def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -32014,6 +33950,8 @@ def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -32022,12 +33960,17 @@ def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -32038,7 +33981,7 @@ def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -32052,7 +33995,7 @@ def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -32073,6 +34016,8 @@ def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -32080,12 +34025,17 @@ def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32100,7 +34050,7 @@ def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -32114,7 +34064,7 @@ def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -32135,6 +34085,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -32142,12 +34094,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32162,7 +34119,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -32175,7 +34132,7 @@ def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -32194,18 +34151,25 @@ def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32220,11 +34184,11 @@ def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status_slot( + def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32233,7 +34197,7 @@ def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -32252,18 +34216,25 @@ def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32274,11 +34245,11 @@ def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions_slot( + def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32287,7 +34258,7 @@ def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -32306,18 +34277,25 @@ def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32328,7 +34306,7 @@ def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace @@ -32344,7 +34322,7 @@ def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -32369,6 +34347,7 @@ def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -32380,6 +34359,7 @@ def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -32387,7 +34367,11 @@ def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -32406,11 +34390,11 @@ def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret_slot( + def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32421,7 +34405,7 @@ def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -32444,6 +34428,8 @@ def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -32452,12 +34438,17 @@ def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -32468,7 +34459,7 @@ def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -32481,7 +34472,7 @@ def list_host_name_bindings_slot( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -32497,6 +34488,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32510,6 +34503,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -32522,6 +34516,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32539,7 +34534,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32553,7 +34552,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -32566,7 +34565,7 @@ def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -32588,6 +34587,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -32595,12 +34596,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32615,7 +34621,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -32630,7 +34636,7 @@ def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -32655,6 +34661,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -32665,6 +34672,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -32672,7 +34680,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32687,11 +34699,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32701,7 +34713,7 @@ def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -32723,6 +34735,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -32730,12 +34744,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -32746,7 +34765,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -32761,7 +34780,7 @@ def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -32784,6 +34803,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -32792,12 +34813,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32812,7 +34838,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -32828,7 +34854,7 @@ def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -32853,6 +34879,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -32864,6 +34891,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -32871,7 +34899,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32886,11 +34918,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32901,7 +34933,7 @@ def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -32924,6 +34956,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -32932,12 +34966,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -32948,7 +34987,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -32964,7 +35003,7 @@ def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -32989,6 +35028,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -33000,6 +35040,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -33007,7 +35048,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33022,7 +35067,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -33035,7 +35080,7 @@ def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -33054,18 +35099,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33080,7 +35132,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -33093,8 +35145,7 @@ def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -33114,18 +35165,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33140,7 +35198,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -33154,7 +35212,7 @@ def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -33176,6 +35234,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -33183,12 +35243,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33203,7 +35268,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33218,8 +35283,7 @@ def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -33243,6 +35307,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -33253,6 +35318,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -33260,7 +35326,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33275,11 +35345,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33289,7 +35359,7 @@ def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -33311,6 +35381,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -33318,12 +35390,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33334,7 +35411,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33349,8 +35426,7 @@ def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -33374,6 +35450,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -33384,6 +35461,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -33391,7 +35469,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33406,7 +35488,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33419,7 +35501,7 @@ def list_instance_identifiers_slot( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -33435,6 +35517,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33448,6 +35532,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -33460,6 +35545,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33477,7 +35563,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33491,7 +35581,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_info_slot( @@ -33504,7 +35594,7 @@ def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -33526,6 +35616,8 @@ def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -33533,12 +35625,17 @@ def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33553,7 +35650,7 @@ def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -33567,7 +35664,7 @@ def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -33588,6 +35685,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -33595,12 +35694,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33615,7 +35719,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -33633,6 +35737,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -33643,6 +35748,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -33650,7 +35756,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201, 409]: @@ -33666,7 +35776,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -33681,7 +35791,7 @@ def begin_create_instance_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -33706,8 +35816,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -33721,6 +35832,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -33745,10 +35857,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -33761,7 +35872,7 @@ def get_instance_ms_deploy_log_slot( ) -> Optional["_models.MSDeployLog"]: """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -33782,6 +35893,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -33789,12 +35902,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33811,7 +35929,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -33826,8 +35944,8 @@ def list_instance_processes_slot( """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. + 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 @@ -33845,6 +35963,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33859,6 +35979,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -33872,6 +35993,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33889,7 +36011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33903,7 +36029,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -33917,8 +36043,7 @@ def get_instance_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -33943,6 +36068,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -33951,12 +36078,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -33973,11 +36105,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33989,8 +36121,8 @@ def delete_instance_process_slot( """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. + 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 @@ -34015,6 +36147,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -34023,12 +36157,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -34039,7 +36178,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -34054,8 +36193,7 @@ def get_instance_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -34080,6 +36218,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -34088,12 +36228,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34110,7 +36255,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -34126,8 +36271,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -34148,6 +36293,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34163,6 +36310,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -34177,6 +36325,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34194,7 +36343,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34208,7 +36361,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -34223,8 +36376,7 @@ def get_instance_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34251,6 +36403,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -34260,12 +36414,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34282,7 +36441,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -34297,8 +36456,7 @@ def list_instance_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -34319,6 +36477,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34334,6 +36494,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -34348,6 +36509,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34365,7 +36527,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34379,7 +36545,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable_slot( @@ -34391,7 +36557,7 @@ def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -34411,18 +36577,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34437,7 +36610,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -34450,7 +36623,7 @@ def list_site_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -34465,6 +36638,8 @@ def list_site_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34478,6 +36653,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -34490,6 +36666,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34507,7 +36684,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34521,7 +36702,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers_slot( @@ -34533,7 +36714,7 @@ def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -34552,18 +36733,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34578,7 +36766,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -34592,8 +36780,8 @@ def get_migrate_my_sql_status_slot( """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. + 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 @@ -34612,18 +36800,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34638,7 +36833,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -34651,7 +36846,7 @@ def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -34671,18 +36866,25 @@ def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34697,11 +36899,11 @@ def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network_slot( + def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34710,7 +36912,7 @@ def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -34730,18 +36932,25 @@ def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34752,7 +36961,7 @@ def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -34766,7 +36975,7 @@ def list_network_features_slot( ) -> Optional["_models.NetworkFeatures"]: """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -34788,6 +36997,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -34795,12 +37006,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -34817,7 +37033,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -34831,8 +37047,7 @@ def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -34854,6 +37069,8 @@ def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -34861,12 +37078,17 @@ def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -34885,7 +37107,7 @@ def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -34901,7 +37123,7 @@ def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -34909,11 +37131,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -34926,12 +37148,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -34940,7 +37165,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34955,7 +37184,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_slot_initial( @@ -34974,12 +37203,15 @@ def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -34988,7 +37220,11 @@ def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35006,7 +37242,7 @@ def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -35022,7 +37258,7 @@ def begin_start_web_site_network_trace_operation_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -35030,11 +37266,11 @@ def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -35049,7 +37285,8 @@ def begin_start_web_site_network_trace_operation_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_01_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -35064,6 +37301,7 @@ def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -35087,13 +37325,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace_slot( + def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35102,7 +37339,7 @@ def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -35121,18 +37358,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35143,7 +37387,7 @@ def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace @@ -35157,8 +37401,7 @@ def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35180,6 +37423,8 @@ def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -35187,12 +37432,17 @@ def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35207,7 +37457,7 @@ def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -35221,8 +37471,7 @@ def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35244,6 +37493,8 @@ def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -35251,12 +37502,17 @@ def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35275,7 +37531,7 @@ def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -35289,8 +37545,7 @@ def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35312,6 +37567,8 @@ def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -35319,12 +37576,17 @@ def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35339,11 +37601,11 @@ def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35352,8 +37614,7 @@ def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -35373,18 +37634,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35395,7 +37663,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -35409,7 +37677,7 @@ def list_perf_mon_counters_slot( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -35419,7 +37687,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -35428,6 +37696,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35441,6 +37711,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -35454,6 +37725,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -35472,7 +37744,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35486,7 +37762,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -35498,7 +37774,7 @@ def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -35517,18 +37793,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35543,7 +37826,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -35556,7 +37839,7 @@ def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -35576,18 +37859,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35602,7 +37892,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -35616,7 +37906,7 @@ def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -35638,6 +37928,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -35645,12 +37937,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35665,7 +37962,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -35680,7 +37977,7 @@ def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -35704,6 +38001,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -35714,6 +38012,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -35721,7 +38020,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35736,11 +38039,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35750,7 +38053,7 @@ def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -35772,6 +38075,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -35779,12 +38084,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35795,7 +38105,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -35810,7 +38120,7 @@ def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -35834,6 +38144,7 @@ def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -35844,6 +38155,7 @@ def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -35851,7 +38163,11 @@ def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35866,7 +38182,7 @@ def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -35880,8 +38196,8 @@ def get_private_access_slot( """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. + 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 @@ -35900,18 +38216,25 @@ def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35926,7 +38249,7 @@ def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -35941,8 +38264,8 @@ def put_private_access_vnet_slot( """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. + 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 @@ -35963,6 +38286,7 @@ def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -35972,6 +38296,7 @@ def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -35979,7 +38304,11 @@ def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35994,7 +38323,7 @@ def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -36007,7 +38336,7 @@ def get_private_endpoint_connection_list_slot( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -36022,6 +38351,8 @@ def get_private_endpoint_connection_list_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36035,6 +38366,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list_slot.metadata['url'], ) request = _convert_request(request) @@ -36047,6 +38379,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36064,7 +38397,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36078,7 +38415,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection_slot( @@ -36091,7 +38428,7 @@ def get_private_endpoint_connection_slot( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36112,6 +38449,8 @@ def get_private_endpoint_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_endpoint_connection_slot_request( resource_group_name=resource_group_name, @@ -36119,12 +38458,17 @@ def get_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36139,7 +38483,7 @@ def get_private_endpoint_connection_slot( return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_slot_initial( @@ -36157,6 +38501,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -36167,6 +38512,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'], @@ -36174,7 +38520,11 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36192,7 +38542,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( return deserialized - _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -36207,7 +38557,7 @@ def begin_approve_or_reject_private_endpoint_connection_slot( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -36234,8 +38584,9 @@ def begin_approve_or_reject_private_endpoint_connection_slot( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -36249,6 +38600,7 @@ def begin_approve_or_reject_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36273,10 +38625,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_slot_initial( self, @@ -36292,6 +38643,8 @@ def _delete_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_private_endpoint_connection_slot_request_initial( resource_group_name=resource_group_name, @@ -36299,12 +38652,17 @@ def _delete_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -36325,7 +38683,7 @@ def _delete_private_endpoint_connection_slot_initial( return deserialized - _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -36339,7 +38697,7 @@ def begin_delete_private_endpoint_connection_slot( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36361,7 +38719,8 @@ def begin_delete_private_endpoint_connection_slot( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -36374,6 +38733,7 @@ def begin_delete_private_endpoint_connection_slot( name=name, private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -36397,10 +38757,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources_slot( @@ -36412,7 +38771,7 @@ def get_private_link_resources_slot( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36431,18 +38790,25 @@ def get_private_link_resources_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_private_link_resources_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36457,7 +38823,7 @@ def get_private_link_resources_slot( return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + get_private_link_resources_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources"} # type: ignore @distributed_trace @@ -36471,8 +38837,8 @@ def list_processes_slot( """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. + 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 @@ -36487,6 +38853,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36500,6 +38868,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -36512,6 +38881,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36529,7 +38899,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36543,7 +38917,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -36556,8 +38930,7 @@ def get_process_slot( ) -> Optional["_models.ProcessInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -36579,6 +38952,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -36586,12 +38961,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36608,11 +38988,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36623,8 +39003,8 @@ def delete_process_slot( """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. + 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 @@ -36646,6 +39026,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -36653,12 +39035,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -36669,7 +39056,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -36683,8 +39070,7 @@ def get_process_dump_slot( ) -> Optional[IO]: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -36706,6 +39092,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -36713,12 +39101,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36735,7 +39128,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -36750,8 +39143,8 @@ def list_process_modules_slot( """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. + 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 @@ -36769,6 +39162,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36783,6 +39178,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -36796,6 +39192,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36813,7 +39210,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36827,7 +39228,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -36841,8 +39242,7 @@ def get_process_module_slot( ) -> Optional["_models.ProcessModuleInfo"]: """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -36866,6 +39266,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -36874,12 +39276,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36896,7 +39303,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -36910,8 +39317,7 @@ def list_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -36929,6 +39335,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36943,6 +39351,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -36956,6 +39365,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36973,7 +39383,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -36987,7 +39401,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -36999,7 +39413,7 @@ def list_public_certificates_slot( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -37015,6 +39429,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37028,6 +39444,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -37040,6 +39457,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37057,7 +39475,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37071,7 +39493,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -37084,7 +39506,7 @@ def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -37106,6 +39528,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -37113,12 +39537,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37133,7 +39562,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -37148,7 +39577,7 @@ def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -37173,6 +39602,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -37183,6 +39613,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -37190,7 +39621,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37205,11 +39640,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37219,7 +39654,7 @@ def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -37241,6 +39676,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -37248,12 +39685,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37264,7 +39706,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -37278,7 +39720,7 @@ def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -37302,6 +39744,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -37311,6 +39754,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -37318,7 +39762,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37333,11 +39781,11 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37347,8 +39795,8 @@ def reset_slot_configuration_slot( """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. + 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 @@ -37368,18 +39816,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37390,11 +39845,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37405,7 +39860,7 @@ def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -37415,10 +39870,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -37431,12 +39887,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -37444,7 +39903,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37455,10 +39918,10 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - def _restore_from_backup_blob_slot_initial( + def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37472,6 +39935,7 @@ def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -37481,6 +39945,7 @@ def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -37488,7 +39953,11 @@ def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37498,11 +39967,11 @@ def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob_slot( + def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37512,7 +39981,7 @@ def begin_restore_from_backup_blob_slot( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -37535,8 +40004,9 @@ def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -37549,6 +40019,7 @@ def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37570,12 +40041,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_slot_initial( + def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37589,6 +40059,7 @@ def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -37598,6 +40069,7 @@ def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -37605,7 +40077,11 @@ def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37615,11 +40091,11 @@ def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app_slot( + def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37629,7 +40105,7 @@ def begin_restore_from_deleted_app_slot( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -37651,8 +40127,9 @@ def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -37665,6 +40142,7 @@ def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37686,12 +40164,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_slot_initial( + def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37705,6 +40182,7 @@ def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -37714,6 +40192,7 @@ def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -37721,7 +40200,11 @@ def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37731,11 +40214,11 @@ def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot_slot( + def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37745,7 +40228,7 @@ def begin_restore_snapshot_slot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -37768,8 +40251,9 @@ def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -37782,6 +40266,7 @@ def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37803,10 +40288,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -37818,7 +40302,7 @@ def list_site_extensions_slot( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -37834,6 +40318,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37847,6 +40333,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -37859,6 +40346,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37876,7 +40364,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37890,7 +40382,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -37903,7 +40395,7 @@ def get_site_extension_slot( ) -> Optional["_models.SiteExtensionInfo"]: """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -37925,6 +40417,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -37932,12 +40426,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -37954,7 +40453,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -37971,6 +40470,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -37978,12 +40479,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 429]: @@ -38002,7 +40508,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -38016,7 +40522,7 @@ def begin_install_site_extension_slot( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -38040,7 +40546,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -38053,6 +40560,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -38076,13 +40584,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38092,7 +40599,7 @@ def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -38114,6 +40621,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -38121,12 +40630,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204, 404]: @@ -38137,7 +40651,7 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -38151,7 +40665,7 @@ def list_slot_differences_slot( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -38169,6 +40683,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -38185,6 +40700,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -38200,6 +40716,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -38219,7 +40736,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38233,9 +40754,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38249,6 +40770,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -38258,6 +40780,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -38265,7 +40788,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38275,11 +40802,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38289,7 +40816,7 @@ def begin_swap_slot( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -38312,8 +40839,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38326,6 +40854,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38347,10 +40876,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -38362,7 +40890,7 @@ def list_snapshots_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -38375,6 +40903,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38388,6 +40918,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -38400,6 +40931,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38417,7 +40949,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38431,7 +40967,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -38443,7 +40979,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -38456,6 +40992,8 @@ def list_snapshots_from_dr_secondary_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38469,6 +41007,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -38481,6 +41020,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38498,7 +41038,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38512,7 +41056,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control_slot( @@ -38524,7 +41068,7 @@ def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -38544,18 +41088,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38577,7 +41128,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -38594,6 +41145,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -38603,6 +41155,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -38610,7 +41163,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38631,7 +41188,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -38645,7 +41202,7 @@ def begin_create_or_update_source_control_slot( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -38669,8 +41226,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -38683,6 +41241,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38707,13 +41266,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38723,7 +41281,7 @@ def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -38732,7 +41290,7 @@ def delete_source_control_slot( :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: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -38745,19 +41303,26 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -38768,7 +41333,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -38782,7 +41347,7 @@ def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -38804,6 +41369,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -38813,6 +41379,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -38820,7 +41387,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38842,11 +41413,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38855,7 +41426,7 @@ def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -38875,18 +41446,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38897,7 +41475,7 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore def _start_network_trace_slot_initial( @@ -38916,12 +41494,15 @@ def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -38930,7 +41511,11 @@ def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38948,7 +41533,7 @@ def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace @@ -38964,7 +41549,7 @@ def begin_start_network_trace_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -38972,11 +41557,11 @@ def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -38991,7 +41576,8 @@ def begin_start_network_trace_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_01_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -39006,6 +41592,7 @@ def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -39029,13 +41616,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39044,7 +41630,7 @@ def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -39064,18 +41650,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39086,11 +41679,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def stop_network_trace_slot( + def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39099,7 +41692,7 @@ def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -39118,18 +41711,25 @@ def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39140,11 +41740,11 @@ def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39153,7 +41753,7 @@ def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -39172,18 +41772,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39194,11 +41801,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39207,7 +41814,7 @@ def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -39226,18 +41833,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -39248,7 +41862,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -39261,7 +41875,7 @@ def list_triggered_web_jobs_slot( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -39277,6 +41891,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39290,6 +41906,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -39302,6 +41919,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39319,7 +41937,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39333,7 +41955,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -39346,7 +41968,7 @@ def get_triggered_web_job_slot( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39368,6 +41990,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39375,12 +41999,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39397,11 +42026,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39411,7 +42040,7 @@ def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39433,6 +42062,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39440,12 +42071,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39456,7 +42092,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -39470,7 +42106,7 @@ def list_triggered_web_job_history_slot( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -39488,6 +42124,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39502,6 +42140,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -39515,6 +42154,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39532,7 +42172,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39546,7 +42190,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -39560,8 +42204,7 @@ def get_triggered_web_job_history_slot( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -39585,6 +42228,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -39593,12 +42238,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39615,11 +42265,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39629,7 +42279,7 @@ def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -39651,6 +42301,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39658,12 +42310,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -39674,7 +42331,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -39688,7 +42345,7 @@ def list_usages_slot( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -39700,7 +42357,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -39709,6 +42366,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39722,6 +42381,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -39735,6 +42395,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -39753,7 +42414,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39767,7 +42432,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -39779,7 +42444,7 @@ def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -39799,18 +42464,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39825,7 +42497,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -39839,7 +42511,7 @@ def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -39861,6 +42533,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -39868,12 +42542,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39888,7 +42567,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -39904,8 +42583,8 @@ def create_or_update_vnet_connection_slot( """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). + 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 @@ -39929,6 +42608,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -39939,6 +42619,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -39946,7 +42627,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39961,11 +42646,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39975,8 +42660,7 @@ def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -39998,6 +42682,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -40005,12 +42691,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40021,7 +42712,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40037,8 +42728,8 @@ def update_vnet_connection_slot( """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). + 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 @@ -40062,6 +42753,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40072,6 +42764,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -40079,7 +42772,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40094,7 +42791,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40109,7 +42806,7 @@ def get_vnet_connection_gateway_slot( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -40133,6 +42830,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -40141,12 +42840,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -40163,7 +42867,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40179,7 +42883,7 @@ def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40205,6 +42909,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40216,6 +42921,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -40223,7 +42929,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40238,7 +42948,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40254,7 +42964,7 @@ def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40280,6 +42990,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40291,6 +43002,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -40298,7 +43010,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40313,7 +43029,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40326,7 +43042,7 @@ def list_web_jobs_slot( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -40340,6 +43056,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40353,6 +43071,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -40365,6 +43084,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40382,7 +43102,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40396,7 +43120,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -40409,7 +43133,7 @@ def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -40431,6 +43155,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -40438,12 +43164,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40458,7 +43189,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -40471,7 +43202,7 @@ def list_slot_differences_from_production( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -40486,6 +43217,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -40501,6 +43233,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -40515,6 +43248,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -40534,7 +43268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40548,9 +43286,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40563,6 +43301,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -40571,6 +43310,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -40578,7 +43318,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -40588,11 +43332,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40601,7 +43345,7 @@ def begin_swap_slot_with_production( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -40621,8 +43365,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -40634,6 +43379,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -40655,10 +43401,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -40669,7 +43414,7 @@ def list_snapshots( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -40680,6 +43425,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40692,6 +43439,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -40703,6 +43451,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40720,7 +43469,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40734,7 +43487,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -40745,7 +43498,7 @@ def list_snapshots_from_dr_secondary( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -40756,6 +43509,8 @@ def list_snapshots_from_dr_secondary( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40768,6 +43523,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -40779,6 +43535,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40796,7 +43553,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40810,7 +43571,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control( @@ -40821,7 +43582,7 @@ def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -40838,17 +43599,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -40870,7 +43638,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -40886,6 +43654,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -40894,6 +43663,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -40901,7 +43671,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -40922,7 +43696,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -40935,7 +43709,7 @@ def begin_create_or_update_source_control( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -40956,8 +43730,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -40969,6 +43744,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -40993,13 +43769,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41008,13 +43783,13 @@ def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 additional_flags: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -41027,18 +43802,25 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 404]: @@ -41049,7 +43831,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -41062,7 +43844,7 @@ def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -41081,6 +43863,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -41089,6 +43872,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -41096,7 +43880,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -41118,11 +43906,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41130,7 +43918,7 @@ def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -41147,17 +43935,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41168,7 +43963,7 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore def _start_network_trace_initial( @@ -41186,11 +43981,14 @@ def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -41199,7 +43997,11 @@ def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -41217,7 +44019,7 @@ def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace @@ -41232,17 +44034,17 @@ def begin_start_network_trace( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -41257,7 +44059,8 @@ def begin_start_network_trace( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_01_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -41271,6 +44074,7 @@ def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -41294,13 +44098,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41308,7 +44111,7 @@ def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -41325,17 +44128,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41346,11 +44156,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def stop_network_trace( + def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41358,7 +44168,7 @@ def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -41375,17 +44185,24 @@ def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -41396,11 +44213,11 @@ def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41408,7 +44225,7 @@ def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -41425,17 +44242,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41446,11 +44270,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41458,7 +44282,7 @@ def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -41475,17 +44299,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -41496,7 +44327,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -41508,7 +44339,7 @@ def list_triggered_web_jobs( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -41521,6 +44352,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41533,6 +44366,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -41544,6 +44378,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41561,7 +44396,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41575,7 +44414,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -41587,7 +44426,7 @@ def get_triggered_web_job( ) -> Optional["_models.TriggeredWebJob"]: """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -41606,18 +44445,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -41634,11 +44480,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41647,7 +44493,7 @@ def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -41666,18 +44512,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -41688,7 +44541,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -41701,7 +44554,7 @@ def list_triggered_web_job_history( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -41716,6 +44569,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41729,6 +44584,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -41741,6 +44597,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41758,7 +44615,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -41772,7 +44633,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -41785,8 +44646,7 @@ def get_triggered_web_job_history( ) -> Optional["_models.TriggeredJobHistory"]: """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -41807,6 +44667,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -41814,12 +44676,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -41836,11 +44703,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41849,7 +44716,7 @@ def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -41868,18 +44735,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -41890,7 +44764,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -41903,7 +44777,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -41912,7 +44786,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -41921,6 +44795,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41933,6 +44809,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -41945,6 +44822,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -41963,7 +44841,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41977,7 +44859,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -41988,7 +44870,7 @@ def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -42005,17 +44887,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42030,7 +44919,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -42043,7 +44932,7 @@ def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -42062,18 +44951,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42088,7 +44984,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42103,8 +44999,8 @@ def create_or_update_vnet_connection( """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). + 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 @@ -42125,6 +45021,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -42134,6 +45031,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -42141,7 +45039,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42156,11 +45058,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42169,8 +45071,7 @@ def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -42189,18 +45090,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -42211,7 +45119,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42226,8 +45134,8 @@ def update_vnet_connection( """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). + 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 @@ -42248,6 +45156,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -42257,6 +45166,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -42264,7 +45174,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42279,7 +45193,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42293,7 +45207,7 @@ def get_vnet_connection_gateway( ) -> Optional["_models.VnetGateway"]: """Gets an app's Virtual Network gateway. - Description for 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 @@ -42314,6 +45228,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -42321,12 +45237,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 404]: @@ -42343,7 +45264,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42358,7 +45279,7 @@ def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -42381,6 +45302,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -42391,6 +45313,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -42398,7 +45321,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42413,7 +45340,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42428,7 +45355,7 @@ def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -42451,6 +45378,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -42461,6 +45389,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -42468,7 +45397,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42483,7 +45416,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42495,7 +45428,7 @@ def list_web_jobs( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -42506,6 +45439,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -42518,6 +45453,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -42529,6 +45465,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -42546,7 +45483,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42560,7 +45501,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -42572,7 +45513,7 @@ def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -42591,18 +45532,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42617,5 +45565,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_web_site_management_client_operations.py index a2e14a71ef67..5d742c4c876e 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_01/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,34 @@ def build_list_billing_meters_request( os_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') if os_type is not None: - query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,33 +231,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,29 +268,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -300,37 +305,38 @@ def build_list_geo_regions_request( linux_dynamic_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: - query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + _query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') if linux_dynamic_workers_enabled is not None: - query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -342,33 +348,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -379,29 +385,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -410,29 +417,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-01" + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -444,33 +452,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,34 +493,34 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -527,34 +535,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -569,34 +577,34 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -611,7 +619,7 @@ def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -624,14 +632,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -646,7 +661,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -657,7 +672,7 @@ def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2021_01_01.models.User @@ -672,11 +687,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -684,7 +701,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -699,7 +720,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -709,7 +730,7 @@ def list_source_controls( ) -> Iterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -718,6 +739,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -727,6 +750,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -735,6 +759,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -752,7 +777,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -766,7 +795,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -776,7 +805,7 @@ def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -791,15 +820,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -814,7 +850,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -826,7 +862,7 @@ def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -843,12 +879,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -856,7 +894,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -871,7 +913,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -883,11 +925,11 @@ def list_billing_meters( ) -> Iterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -895,6 +937,8 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -905,6 +949,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -916,6 +961,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -935,7 +981,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -949,7 +999,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace def check_name_availability( @@ -961,13 +1011,13 @@ def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2021_01_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -980,6 +1030,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -987,6 +1038,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -994,7 +1046,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1009,7 +1065,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -1019,7 +1075,7 @@ def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -1032,15 +1088,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1055,7 +1118,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -1069,24 +1132,26 @@ def list_geo_regions( ) -> Iterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2021_01_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1097,6 +1162,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1110,6 +1176,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1131,7 +1198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1145,7 +1216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1155,7 +1226,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> Iterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2021_01_01.models.NameIdentifier @@ -1165,6 +1236,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1178,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1190,6 +1263,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1209,7 +1283,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1223,7 +1301,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1232,7 +1310,7 @@ def list_premier_add_on_offers( ) -> Iterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -1241,6 +1319,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1251,6 +1331,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1260,6 +1341,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1277,7 +1359,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1291,7 +1377,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1300,7 +1386,7 @@ def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -1313,15 +1399,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1336,7 +1429,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1348,8 +1441,8 @@ def verify_hosting_environment_vnet( """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. + 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.v2021_01_01.models.VnetParameters @@ -1364,12 +1457,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1377,7 +1472,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,11 +1491,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1404,7 +1503,7 @@ def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -1421,6 +1520,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1428,6 +1528,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1435,7 +1536,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1446,7 +1551,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1458,7 +1563,7 @@ def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -1475,6 +1580,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1482,6 +1588,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1489,7 +1596,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1504,11 +1615,11 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1516,7 +1627,7 @@ def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -1533,6 +1644,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1540,6 +1652,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1547,7 +1660,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1558,5 +1675,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_configuration.py index e4bd3374f313..e425ba16a400 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2021-01-15". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-01-15" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_metadata.json index 377de5360a9a..051548009fab 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -123,192 +123,192 @@ "get_publishing_user" : { "sync": { "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_publishing_user(\n self,\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "update_publishing_user" : { "sync": { "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_01_15.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_01_15.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_01_15.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_01_15.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "user_details" }, "list_source_controls" : { "sync": { "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.SourceControlCollection\"]\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_source_controls(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_source_control" : { "sync": { "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type" }, "update_source_control" : { "sync": { "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type, request_message" }, "list_billing_meters" : { "sync": { "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.BillingMeterCollection\"]\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "billing_location, os_type" }, "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_01_15.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_01_15.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_01_15.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_01_15.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, "get_subscription_deployment_locations" : { "sync": { "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.DeploymentLocations\"\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs: Any\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2021_01_15.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2021_01_15.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2021_01_15.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2021_01_15.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" }, "list_site_identifiers_assigned_to_host_name" : { "sync": { "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.IdentifierCollection\"]\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_01_15.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_01_15.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_01_15.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_01_15.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name_identifier" }, "list_premier_add_on_offers" : { "sync": { "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.PremierAddOnOfferCollection\"]\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_premier_add_on_offers(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_skus" : { "sync": { "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SkuInfos\"\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def list_skus(\n self,\n **kwargs: Any\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "verify_hosting_environment_vnet" : { "sync": { "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.VnetValidationFailureDetails\"\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_01_15.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_01_15.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs: Any\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_01_15.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_01_15.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "parameters" }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_15.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_15.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_15.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_15.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" }, "validate" : { "sync": { "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ValidateResponse\"\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_01_15.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_01_15.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs: Any\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_01_15.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_01_15.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_01_15.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, validate_request" }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_15.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_15.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_15.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_01_15.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" } diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_web_site_management_client.py index 2ea423c783cc..8a424b1026a3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -71,8 +72,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2021-01-15". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -113,7 +117,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/_configuration.py index 00190e16f27b..c6125f7a8143 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2021-01-15". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-01-15" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/_web_site_management_client.py index 35d19715aa57..208380089d98 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -72,8 +73,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2021-01-15". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_certificate_orders_operations.py index 0ec6edd5c5fc..a94719f3818f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,17 +121,17 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -140,12 +147,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -153,7 +162,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -164,7 +177,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -175,7 +188,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -186,6 +199,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -197,6 +212,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -207,6 +223,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -224,7 +241,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +259,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -249,7 +270,7 @@ async def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -266,17 +287,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -291,7 +319,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -307,6 +335,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -315,6 +344,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -322,7 +352,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -340,7 +374,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -353,7 +387,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -376,8 +410,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -389,6 +424,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -413,13 +449,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -427,7 +462,7 @@ async def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -444,17 +479,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -465,7 +507,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -478,7 +520,7 @@ async def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -498,6 +540,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -506,6 +549,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -513,7 +557,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -532,7 +580,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -544,7 +592,7 @@ def list_certificates( ) -> AsyncIterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -557,6 +605,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +619,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -580,6 +631,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -597,7 +649,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -611,7 +667,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -623,7 +679,7 @@ async def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -642,18 +698,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -668,7 +731,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -685,6 +748,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -694,6 +758,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -701,7 +766,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -719,7 +788,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -733,7 +802,7 @@ async def begin_create_or_update_certificate( ) -> AsyncLROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -757,8 +826,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -771,6 +841,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -795,13 +866,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -810,7 +880,7 @@ async def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -829,18 +899,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -851,7 +928,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -865,7 +942,7 @@ async def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -887,6 +964,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -896,6 +974,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -903,7 +982,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -922,11 +1005,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -935,7 +1018,7 @@ async def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -955,6 +1038,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -963,6 +1047,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -970,7 +1055,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -981,11 +1070,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -994,7 +1083,7 @@ async def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1014,6 +1103,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1022,6 +1112,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1029,7 +1120,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1040,11 +1135,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1052,7 +1147,7 @@ async def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1069,17 +1164,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1090,11 +1192,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1103,7 +1205,7 @@ async def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1122,6 +1224,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1130,6 +1233,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1137,7 +1241,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1148,7 +1256,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1161,7 +1269,7 @@ async def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1180,6 +1288,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1188,6 +1297,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1195,7 +1305,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,11 +1324,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1222,7 +1336,7 @@ async def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1239,17 +1353,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1260,7 +1381,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1272,7 +1393,7 @@ async def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -1289,17 +1410,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1442,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1326,7 +1454,7 @@ async def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -1343,17 +1471,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,5 +1503,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_environments_operations.py index 7a30adc27ac3..0e3922979f6a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -292,7 +320,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -305,7 +333,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -328,8 +356,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -341,6 +370,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -365,12 +395,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,18 +412,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -404,11 +440,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -417,7 +453,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -438,7 +474,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -450,6 +487,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -470,10 +508,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -485,7 +522,7 @@ async def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -505,6 +542,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -513,6 +551,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -520,7 +559,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -542,7 +585,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -554,7 +597,7 @@ def list_capacities( ) -> AsyncIterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -567,6 +610,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -579,6 +624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -590,6 +636,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -607,7 +654,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +672,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def get_vip_info( @@ -632,7 +683,7 @@ async def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -649,17 +700,24 @@ async def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +732,7 @@ async def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore async def _change_vnet_initial( @@ -690,6 +748,7 @@ async def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -698,6 +757,7 @@ async def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -705,7 +765,11 @@ async def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -723,7 +787,7 @@ async def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -736,7 +800,7 @@ async def begin_change_vnet( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -759,6 +823,7 @@ async def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -774,6 +839,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -788,6 +854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -807,7 +874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -818,7 +889,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -830,6 +901,7 @@ async def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -840,8 +912,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -857,10 +928,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -872,7 +942,7 @@ async def get_ase_v3_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Get networking configuration of an App Service Environment. - Description for Get networking configuration of an App Service Environment. + 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 @@ -889,17 +959,24 @@ async def get_ase_v3_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ase_v3_networking_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ase_v3_networking_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +991,7 @@ async def get_ase_v3_networking_configuration( return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + get_ase_v3_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace_async @@ -927,7 +1004,7 @@ async def update_ase_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Update networking configuration of an App Service Environment. - Description for Update networking configuration of an App Service Environment. + 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 @@ -947,6 +1024,7 @@ async def update_ase_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') @@ -955,6 +1033,7 @@ async def update_ase_networking_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ase_networking_configuration.metadata['url'], @@ -962,7 +1041,11 @@ async def update_ase_networking_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,7 +1060,7 @@ async def update_ase_networking_configuration( return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + update_ase_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace_async @@ -989,7 +1072,7 @@ async def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -1006,17 +1089,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,7 +1121,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -1044,7 +1134,7 @@ async def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -1063,18 +1153,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1089,7 +1186,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -1101,8 +1198,7 @@ def get_inbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -1115,6 +1211,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1127,6 +1225,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1138,6 +1237,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1155,7 +1255,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1169,7 +1273,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -1180,7 +1284,7 @@ def list_multi_role_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -1193,6 +1297,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1205,6 +1311,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -1216,6 +1323,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1233,7 +1341,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1247,7 +1359,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1258,7 +1370,7 @@ async def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -1275,17 +1387,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1300,7 +1419,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1316,6 +1435,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1324,6 +1444,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1331,7 +1452,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1349,7 +1474,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1362,7 +1487,7 @@ async def begin_create_or_update_multi_role_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -1384,8 +1509,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1397,6 +1523,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1421,10 +1548,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1436,7 +1562,7 @@ async def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -1455,6 +1581,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1463,6 +1590,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1470,7 +1598,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1489,7 +1621,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1503,8 +1635,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -1519,6 +1651,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1532,6 +1666,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1544,6 +1679,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1561,7 +1697,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1575,7 +1715,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1586,7 +1726,7 @@ def list_multi_role_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -1599,6 +1739,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1611,6 +1753,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1622,6 +1765,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1639,7 +1783,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1653,7 +1801,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1664,7 +1812,7 @@ def list_multi_role_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -1676,6 +1824,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1688,6 +1838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1699,6 +1850,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1716,7 +1868,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1730,7 +1886,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1741,7 +1897,7 @@ def list_multi_role_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -1753,6 +1909,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1765,6 +1923,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1776,6 +1935,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1793,7 +1953,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1807,7 +1971,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -1818,7 +1982,7 @@ async def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -1835,17 +1999,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1860,7 +2031,7 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -1872,8 +2043,7 @@ def get_outbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -1886,6 +2056,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1898,6 +2070,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1909,6 +2082,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1926,7 +2100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1940,7 +2118,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def get_private_endpoint_connection_list( @@ -1951,7 +2129,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoints associated with a hosting environment. - Description for Gets the list of private endpoints associated with a hosting environment. + 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 @@ -1964,6 +2142,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1976,6 +2156,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -1987,6 +2168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2004,7 +2186,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2018,7 +2204,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -2030,7 +2216,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2049,18 +2235,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2075,7 +2268,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -2092,6 +2285,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -2101,6 +2295,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -2108,7 +2303,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2126,7 +2325,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -2140,7 +2339,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -2165,8 +2364,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2179,6 +2379,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2203,10 +2404,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -2221,18 +2421,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2253,7 +2460,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -2266,7 +2473,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2286,7 +2493,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -2298,6 +2506,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2321,10 +2530,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -2335,7 +2543,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2352,17 +2560,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2377,11 +2592,11 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2389,7 +2604,7 @@ async def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -2406,17 +2621,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -2427,7 +2649,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -2442,17 +2664,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2470,7 +2699,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -2482,7 +2711,7 @@ async def begin_resume( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -2503,6 +2732,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2515,6 +2746,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -2526,6 +2758,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2543,7 +2776,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2554,7 +2791,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2565,6 +2802,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2574,8 +2812,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2591,10 +2828,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2606,7 +2842,7 @@ def list_app_service_plans( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -2619,6 +2855,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2631,6 +2869,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2642,6 +2881,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2659,7 +2899,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2673,7 +2917,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2685,13 +2929,14 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2699,6 +2944,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2711,6 +2958,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2723,6 +2971,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2741,7 +2990,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2755,7 +3008,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2769,17 +3022,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2797,7 +3057,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2809,7 +3069,7 @@ async def begin_suspend( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -2830,6 +3090,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2842,6 +3104,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2853,6 +3116,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2870,7 +3134,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2881,7 +3149,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2892,6 +3160,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2901,8 +3170,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2918,10 +3186,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2934,7 +3201,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -2943,7 +3210,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2952,6 +3219,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2964,6 +3233,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2976,6 +3246,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2994,7 +3265,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3008,7 +3283,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -3019,7 +3294,7 @@ def list_worker_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -3032,6 +3307,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3044,6 +3321,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -3055,6 +3333,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3072,7 +3351,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3086,7 +3369,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -3098,7 +3381,7 @@ async def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -3117,18 +3400,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3143,7 +3433,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -3160,6 +3450,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3169,6 +3460,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -3176,7 +3468,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3194,7 +3490,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -3208,7 +3504,7 @@ async def begin_create_or_update_worker_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -3232,8 +3528,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3246,6 +3543,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3270,10 +3568,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -3286,7 +3583,7 @@ async def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -3307,6 +3604,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3316,6 +3614,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -3323,7 +3622,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3342,7 +3645,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -3356,8 +3659,7 @@ def list_worker_pool_instance_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -3374,6 +3676,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3388,6 +3692,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3401,6 +3706,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3418,7 +3724,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3432,7 +3742,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -3444,7 +3754,7 @@ def list_web_worker_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -3459,6 +3769,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3472,6 +3784,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3484,6 +3797,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3501,7 +3815,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3515,7 +3833,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -3527,7 +3845,7 @@ def list_worker_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -3541,6 +3859,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3554,6 +3874,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3566,6 +3887,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3583,7 +3905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3597,7 +3923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3609,7 +3935,7 @@ def list_web_worker_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -3623,6 +3949,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3636,6 +3964,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3648,6 +3977,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3665,7 +3995,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3679,4 +4013,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_plans_operations.py index 2b1bcd9d5638..b3e2b47b1070 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -131,7 +138,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -142,6 +149,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -153,6 +162,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -163,6 +173,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -180,7 +191,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +209,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -205,7 +220,7 @@ async def get( ) -> "_models.AppServicePlan": """Get an App Service plan. - Description for 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 @@ -222,17 +237,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -247,7 +269,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -263,6 +285,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -271,6 +294,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -278,7 +302,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -296,7 +324,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -309,7 +337,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -330,8 +358,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -343,6 +372,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -367,13 +397,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -381,7 +410,7 @@ async def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -398,17 +427,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -419,7 +455,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -432,7 +468,7 @@ async def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -451,6 +487,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -459,6 +496,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -466,7 +504,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -485,7 +527,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -497,7 +539,7 @@ async def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -514,17 +556,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -539,7 +588,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -553,7 +602,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -574,6 +623,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -581,12 +632,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -601,11 +657,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -615,7 +671,7 @@ async def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -636,6 +692,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -643,12 +701,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -659,7 +722,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -673,7 +736,7 @@ async def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -694,6 +757,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -701,12 +766,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -721,7 +791,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -735,7 +805,7 @@ def list_web_apps_by_hybrid_connection( ) -> AsyncIterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -751,6 +821,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -765,6 +837,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -778,6 +851,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -795,7 +869,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -809,7 +887,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -820,7 +898,7 @@ async def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -837,17 +915,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -862,7 +947,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -874,7 +959,7 @@ def list_hybrid_connections( ) -> AsyncIterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -887,6 +972,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -899,6 +986,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -910,6 +998,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -927,7 +1016,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -941,10 +1034,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -953,7 +1046,7 @@ async def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -974,18 +1067,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -996,7 +1096,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1011,7 +1111,7 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -1019,12 +1119,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1032,6 +1133,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1044,6 +1147,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1058,6 +1162,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1078,7 +1183,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1092,7 +1201,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1103,7 +1212,7 @@ async def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -1120,17 +1229,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1145,7 +1261,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1158,14 +1274,15 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1174,6 +1291,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1186,6 +1305,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1198,6 +1318,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1216,7 +1337,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1230,7 +1355,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1241,7 +1366,7 @@ async def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -1258,17 +1383,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1283,7 +1415,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1296,7 +1428,7 @@ async def get_vnet_from_server_farm( ) -> "_models.VnetInfo": """Get a Virtual Network associated with an App Service plan. - Description for 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 @@ -1315,18 +1447,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1341,7 +1480,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1355,7 +1494,7 @@ async def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -1376,6 +1515,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1383,12 +1524,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1403,7 +1549,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1418,7 +1564,7 @@ async def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -1441,6 +1587,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1451,6 +1598,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1458,7 +1606,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1473,7 +1625,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1486,8 +1638,7 @@ async def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -1506,18 +1657,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1690,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1546,7 +1704,7 @@ async def get_route_for_vnet( ) -> List["_models.VnetRoute"]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -1567,6 +1725,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1574,12 +1734,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1594,7 +1759,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1609,7 +1774,7 @@ async def create_or_update_vnet_route( ) -> "_models.VnetRoute": """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1632,6 +1797,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1642,6 +1808,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1649,7 +1816,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1664,11 +1835,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1678,7 +1849,7 @@ async def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -1699,6 +1870,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1706,12 +1879,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1722,7 +1900,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1737,7 +1915,7 @@ async def update_vnet_route( ) -> "_models.VnetRoute": """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1760,6 +1938,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1770,6 +1949,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1777,7 +1957,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1792,11 +1976,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1805,7 +1989,7 @@ async def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -1824,18 +2008,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1846,5 +2037,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificate_orders_diagnostics_operations.py index a777166e89c0..2112d4f67120 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificate_orders_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificate_orders_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ def list_app_service_certificate_order_detector_response( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """Microsoft.CertificateRegistration to get the list of detectors for this RP. - Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + 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 @@ -69,6 +68,8 @@ def list_app_service_certificate_order_detector_response( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_certificate_order_detector_response.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + list_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors"} # type: ignore @distributed_trace_async async def get_app_service_certificate_order_detector_response( @@ -138,8 +145,7 @@ async def get_app_service_certificate_order_detector_response( ) -> "_models.DetectorResponse": """Microsoft.CertificateRegistration call to get a detector response from App Lens. - Description for Microsoft.CertificateRegistration call to get a detector response from App - Lens. + 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 @@ -147,11 +153,11 @@ async def get_app_service_certificate_order_detector_response( :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. + :param start_time: The start time for detector response. Default value is None. :type start_time: ~datetime.datetime - :param end_time: The end time for the detector response. + :param end_time: The end time for the detector response. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: The time grain for the detector response. + :param time_grain: The time grain for the detector response. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -164,12 +170,15 @@ async def get_app_service_certificate_order_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_app_service_certificate_order_detector_response_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -178,7 +187,11 @@ async def get_app_service_certificate_order_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -193,5 +206,5 @@ async def get_app_service_certificate_order_detector_response( return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore + get_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificate_registration_provider_operations.py index c87395989f6c..814bf506bdf9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificates_operations.py index 426285b61687..8cb7e201e508 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -54,10 +53,10 @@ def list( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :param filter: Return only information specified in the filter (using OData syntax). For - example: $filter=KeyVaultId eq 'KeyVaultId'. + example: $filter=KeyVaultId eq 'KeyVaultId'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -66,6 +65,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -76,6 +77,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list.metadata['url'], ) @@ -86,6 +88,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -104,7 +107,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -118,7 +125,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -128,7 +135,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -139,6 +146,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -150,6 +159,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -160,6 +170,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,7 +266,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -257,7 +279,7 @@ async def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -276,6 +298,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -284,6 +307,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -291,7 +315,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -306,11 +334,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -318,7 +346,7 @@ async def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -335,17 +363,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -356,7 +391,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -369,7 +404,7 @@ async def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -388,6 +423,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -396,6 +432,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -403,7 +440,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -418,5 +459,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_deleted_web_apps_operations.py index c412c31b88ef..232f5930e22b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -122,7 +129,7 @@ def list_by_location( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -133,6 +140,8 @@ def list_by_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace_async async def get_deleted_web_app_by_location( @@ -196,7 +211,7 @@ async def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -213,17 +228,24 @@ async def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,5 +260,5 @@ async def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_diagnostics_operations.py index ea4a2c447e05..361be9fb34ae 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list_hosting_environment_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -138,7 +145,7 @@ async def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -146,11 +153,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -163,12 +170,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -177,7 +187,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +206,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -204,7 +218,7 @@ def list_site_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -217,6 +231,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -229,6 +245,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -240,6 +257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,7 +293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -286,7 +308,7 @@ async def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -294,11 +316,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -311,12 +333,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -325,7 +350,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,7 +369,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -352,7 +381,7 @@ def list_site_diagnostic_categories( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -365,6 +394,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -377,6 +408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -388,6 +420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -405,7 +438,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -419,7 +456,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -431,7 +468,7 @@ async def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -450,18 +487,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -476,7 +520,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -489,7 +533,7 @@ def list_site_analyses( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -504,6 +548,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -517,6 +563,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -529,6 +576,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -546,7 +594,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -560,7 +612,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -573,7 +625,7 @@ async def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -594,6 +646,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -601,12 +655,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +680,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -638,7 +697,7 @@ async def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -648,11 +707,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -665,6 +724,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -672,6 +733,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -680,7 +742,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -695,7 +761,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -708,7 +774,7 @@ def list_site_detectors( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -723,6 +789,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +804,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -748,6 +817,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -765,7 +835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -779,7 +853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector( @@ -792,7 +866,7 @@ async def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -813,6 +887,8 @@ async def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -820,12 +896,17 @@ async def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -840,7 +921,7 @@ async def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -857,7 +938,7 @@ async def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -867,11 +948,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -884,6 +965,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -891,6 +974,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -899,7 +983,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +1002,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -927,7 +1015,7 @@ def list_site_detector_responses_slot( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -942,6 +1030,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -955,6 +1045,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -967,6 +1058,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -984,7 +1076,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -998,7 +1094,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1014,7 +1110,7 @@ async def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1024,11 +1120,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1041,6 +1137,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1048,6 +1146,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1056,7 +1155,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1071,7 +1174,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1084,7 +1187,7 @@ def list_site_diagnostic_categories_slot( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1099,6 +1202,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1112,6 +1217,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1124,6 +1230,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1141,7 +1248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1155,7 +1266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1168,7 +1279,7 @@ async def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1189,6 +1300,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1196,12 +1309,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1216,7 +1334,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1230,7 +1348,7 @@ def list_site_analyses_slot( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1247,6 +1365,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1261,6 +1381,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1274,6 +1395,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1291,7 +1413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1305,7 +1431,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1319,7 +1445,7 @@ async def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1342,6 +1468,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1350,12 +1478,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1370,7 +1503,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1388,7 +1521,7 @@ async def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1400,11 +1533,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1417,6 +1550,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1425,6 +1560,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1433,7 +1569,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1448,7 +1588,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1462,7 +1602,7 @@ def list_site_detectors_slot( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1479,6 +1619,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1493,6 +1635,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1506,6 +1649,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1523,7 +1667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1537,7 +1685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_slot( @@ -1551,7 +1699,7 @@ async def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1574,6 +1722,8 @@ async def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1582,12 +1732,17 @@ async def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1602,7 +1757,7 @@ async def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -1620,7 +1775,7 @@ async def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1632,11 +1787,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1649,6 +1804,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1657,6 +1814,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1665,7 +1823,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1680,5 +1842,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_domain_registration_provider_operations.py index f5659d76ab15..43883ff85fa5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_domains_operations.py index e19d118cb613..d2587acea355 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ async def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2021_01_15.models.NameIdentifier @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -99,7 +104,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -109,7 +114,7 @@ def list( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) @@ -117,6 +122,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -127,6 +134,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -136,6 +144,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -153,7 +162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -167,7 +180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -176,7 +189,7 @@ async def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -189,15 +202,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +232,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -223,7 +243,7 @@ def list_recommendations( ) -> AsyncIterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2021_01_15.models.DomainRecommendationSearchParameters @@ -234,6 +254,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -247,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -259,6 +281,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -278,7 +301,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -292,7 +319,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -302,7 +329,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -312,6 +339,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -323,6 +352,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -333,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -350,7 +381,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -364,7 +399,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -375,7 +410,7 @@ async def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -392,17 +427,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +459,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -433,6 +475,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -441,6 +484,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -448,7 +492,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -466,7 +514,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -479,7 +527,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -500,8 +548,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -513,6 +562,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -537,13 +587,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -552,7 +601,7 @@ async def delete( ) -> None: """Delete a domain. - Description for 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 @@ -572,18 +621,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -594,7 +650,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -607,7 +663,7 @@ async def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -626,6 +682,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -634,6 +691,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -641,7 +699,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -660,7 +722,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -672,7 +734,7 @@ def list_ownership_identifiers( ) -> AsyncIterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -685,6 +747,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -697,6 +761,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -708,6 +773,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -725,7 +791,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -739,7 +809,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -751,7 +821,7 @@ async def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -770,18 +840,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -796,7 +873,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -811,8 +888,8 @@ async def create_or_update_ownership_identifier( """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. + 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 @@ -833,6 +910,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -842,6 +920,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -849,7 +928,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,11 +947,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -877,7 +960,7 @@ async def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -896,18 +979,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -918,7 +1008,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -933,8 +1023,8 @@ async def update_ownership_identifier( """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. + 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 @@ -955,6 +1045,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -964,6 +1055,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -971,7 +1063,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -986,11 +1082,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -998,7 +1094,7 @@ async def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1015,17 +1111,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1036,5 +1139,5 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_global_operations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_global_operations_operations.py index bd19421db729..27955469315b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_global_operations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_global_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse @@ -52,7 +51,7 @@ async def get_deleted_web_app( ) -> "_models.DeletedSite": """Get deleted app for a subscription. - Description for Get deleted app for a subscription. + 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 @@ -67,16 +66,23 @@ async def get_deleted_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deleted_web_app_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -91,7 +97,7 @@ async def get_deleted_web_app( return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}"} # type: ignore @distributed_trace_async @@ -102,7 +108,7 @@ async def get_deleted_web_app_snapshots( ) -> List["_models.Snapshot"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + 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 @@ -117,16 +123,23 @@ async def get_deleted_web_app_snapshots( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deleted_web_app_snapshots_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_snapshots.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -141,11 +154,11 @@ async def get_deleted_web_app_snapshots( return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + get_deleted_web_app_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots"} # type: ignore @distributed_trace_async - async def get_subscription_operation_with_async_response( + async def get_subscription_operation_with_async_response( # pylint: disable=inconsistent-return-statements self, location: str, operation_id: str, @@ -153,7 +166,7 @@ async def get_subscription_operation_with_async_response( ) -> None: """Gets an operation in a subscription and given region. - Description for Gets an operation in a subscription and given region. + Gets an operation in a subscription and given region. :param location: Location name. :type location: str @@ -170,17 +183,24 @@ async def get_subscription_operation_with_async_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_subscription_operation_with_async_response_request( location=location, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_operation_with_async_response.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -191,5 +211,5 @@ async def get_subscription_operation_with_async_response( if cls: return cls(pipeline_response, None, {}) - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore + get_subscription_operation_with_async_response.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_kube_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_kube_environments_operations.py index 57950151a751..9f0580a058ec 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_kube_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_kube_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,7 +54,7 @@ def list_by_subscription( ) -> AsyncIterable["_models.KubeEnvironmentCollection"]: """Get all Kubernetes Environments for a subscription. - Description for Get all Kubernetes Environments for a subscription. + Get all Kubernetes Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KubeEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_subscription.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.KubeEnvironmentCollection"]: """Get all the Kubernetes Environments in a resource group. - Description for Get all the Kubernetes Environments in a resource group. + 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.KubeEnvironment": """Get the properties of a Kubernetes Environment. - Description for Get the properties of a Kubernetes Environment. + 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -289,7 +317,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -302,7 +330,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.KubeEnvironment"]: """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -323,8 +351,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.KubeEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -336,6 +365,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -360,12 +390,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -377,17 +406,24 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -397,11 +433,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -409,7 +445,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete a Kubernetes Environment. - Description for Delete a Kubernetes Environment. + Delete a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -427,7 +463,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -438,6 +475,7 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -458,10 +496,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -473,7 +510,7 @@ async def update( ) -> "_models.KubeEnvironment": """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -493,6 +530,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentPatchResource') @@ -501,6 +539,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -508,7 +547,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -527,5 +570,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_provider_operations.py index 13356b94b532..ee19d3f76351 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,9 +52,9 @@ def get_available_stacks( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_01_15.models.Enum10 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -115,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def get_function_app_stacks( @@ -125,9 +131,9 @@ def get_function_app_stacks( ) -> AsyncIterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions. - Description for Get available Function app frameworks and their versions. + Get available Function app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_15.models.Enum11 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -136,6 +142,8 @@ def get_function_app_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks.metadata['url'], ) @@ -154,6 +163,7 @@ def prepare_request(next_link=None): else: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + get_function_app_stacks.metadata = {'url': "/providers/Microsoft.Web/functionAppStacks"} # type: ignore @distributed_trace def get_function_app_stacks_for_location( @@ -197,11 +211,11 @@ def get_function_app_stacks_for_location( ) -> AsyncIterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions for location. - Description for Get available Function app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_15.models.Enum12 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -210,6 +224,8 @@ def get_function_app_stacks_for_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -220,6 +236,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks_for_location.metadata['url'], ) @@ -230,6 +247,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -248,7 +266,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -262,7 +284,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + get_function_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/functionAppStacks"} # type: ignore @distributed_trace def get_web_app_stacks_for_location( @@ -273,11 +295,11 @@ def get_web_app_stacks_for_location( ) -> AsyncIterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions for location. - Description for Get available Web app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_15.models.Enum13 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -286,6 +308,8 @@ def get_web_app_stacks_for_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -296,6 +320,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks_for_location.metadata['url'], ) @@ -306,6 +331,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -324,7 +350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,7 +368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + get_web_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/webAppStacks"} # type: ignore @distributed_trace def list_operations( @@ -348,8 +378,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -358,6 +388,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -367,6 +399,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -375,6 +408,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -392,7 +426,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -406,7 +444,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_web_app_stacks( @@ -416,9 +454,9 @@ def get_web_app_stacks( ) -> AsyncIterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions. - Description for Get available Web app frameworks and their versions. + Get available Web app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_15.models.Enum14 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -427,6 +465,8 @@ def get_web_app_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -436,6 +476,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks.metadata['url'], ) @@ -445,6 +486,7 @@ def prepare_request(next_link=None): else: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -463,7 +505,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -477,7 +523,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + get_web_app_stacks.metadata = {'url': "/providers/Microsoft.Web/webAppStacks"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -487,9 +533,9 @@ def get_available_stacks_on_prem( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_01_15.models.Enum15 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -498,6 +544,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -508,6 +556,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -518,6 +567,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -536,7 +586,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -550,4 +604,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_recommendations_operations.py index 6d7e38dfc258..ec94edb2c043 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,14 +54,14 @@ def list( ) -> AsyncIterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -125,16 +132,16 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -147,15 +154,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -166,19 +180,18 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -193,16 +206,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -213,7 +233,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -227,7 +247,7 @@ def list_history_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -238,7 +258,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -247,6 +267,8 @@ def list_history_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -259,6 +281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -272,6 +295,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -291,7 +315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -305,7 +333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -318,7 +346,7 @@ def list_recommended_rules_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -328,7 +356,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -337,6 +365,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -349,6 +379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -362,6 +393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -381,7 +413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,10 +431,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_hosting_environment( + async def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -407,7 +443,7 @@ async def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -426,18 +462,25 @@ async def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -448,11 +491,11 @@ async def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_hosting_environment( + async def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -461,7 +504,7 @@ async def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -480,18 +523,25 @@ async def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -502,7 +552,7 @@ async def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -517,7 +567,7 @@ async def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -526,10 +576,10 @@ async def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -542,12 +592,15 @@ async def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -555,7 +608,11 @@ async def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -570,11 +627,11 @@ async def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_hosting_environment( + async def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -584,7 +641,7 @@ async def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -605,19 +662,26 @@ async def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -628,7 +692,7 @@ async def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -642,7 +706,7 @@ def list_history_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -653,7 +717,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -662,6 +726,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -674,6 +740,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -687,6 +754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -706,7 +774,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -720,7 +792,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -733,7 +805,7 @@ def list_recommended_rules_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -743,7 +815,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -752,6 +824,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -764,6 +838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -777,6 +852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -796,7 +872,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -810,10 +890,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -821,7 +901,7 @@ async def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -838,17 +918,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -859,11 +946,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -871,7 +958,7 @@ async def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -888,17 +975,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -909,7 +1003,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -924,7 +1018,7 @@ async def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -933,10 +1027,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -949,12 +1043,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -962,7 +1059,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,11 +1078,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -990,7 +1091,7 @@ async def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1009,18 +1110,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,5 +1139,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_resource_health_metadata_operations.py index aab46dd49fcf..a71bd554b653 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,8 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -134,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -155,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -197,8 +211,7 @@ def list_by_site( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -211,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -223,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -234,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -251,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -265,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -276,7 +297,7 @@ async def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -293,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -318,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -331,8 +359,7 @@ def list_by_site_slot( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -347,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -372,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -389,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -403,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -415,7 +450,7 @@ async def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -434,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_static_sites_operations.py index 54d7b92ddf92..15d85a0da0fe 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class StaticSitesOperations: +class StaticSitesOperations: # pylint: disable=too-many-public-methods """StaticSitesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -57,7 +56,7 @@ async def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -76,6 +75,7 @@ async def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -83,6 +83,7 @@ async def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -90,7 +91,11 @@ async def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -105,7 +110,7 @@ async def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -115,7 +120,7 @@ def list( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -124,6 +129,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -134,6 +141,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -143,6 +151,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -160,7 +169,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -174,7 +187,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -184,7 +197,7 @@ def get_static_sites_by_resource_group( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -195,6 +208,8 @@ def get_static_sites_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -206,6 +221,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -216,6 +232,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -233,7 +250,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -247,7 +268,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace_async async def get_static_site( @@ -258,7 +279,7 @@ async def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -275,17 +296,24 @@ async def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,7 +328,7 @@ async def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore async def _create_or_update_static_site_initial( @@ -316,6 +344,7 @@ async def _create_or_update_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -324,6 +353,7 @@ async def _create_or_update_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_initial.metadata['url'], @@ -331,7 +361,11 @@ async def _create_or_update_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -349,7 +383,7 @@ async def _create_or_update_static_site_initial( return deserialized - _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _create_or_update_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -362,8 +396,7 @@ async def begin_create_or_update_static_site( ) -> AsyncLROPoller["_models.StaticSiteARMResource"]: """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -385,8 +418,9 @@ async def begin_create_or_update_static_site( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.StaticSiteARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -398,6 +432,7 @@ async def begin_create_or_update_static_site( resource_group_name=resource_group_name, name=name, static_site_envelope=static_site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -422,12 +457,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore - async def _delete_static_site_initial( + async def _delete_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -439,17 +473,24 @@ async def _delete_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -459,11 +500,11 @@ async def _delete_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _delete_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site( + async def begin_delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -471,7 +512,7 @@ async def begin_delete_static_site( ) -> AsyncLROPoller[None]: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -489,7 +530,8 @@ async def begin_delete_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -500,6 +542,7 @@ async def begin_delete_static_site( raw_result = await self._delete_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -520,10 +563,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async async def update_static_site( @@ -535,8 +577,7 @@ async def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -555,6 +596,7 @@ async def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -563,6 +605,7 @@ async def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -570,7 +613,11 @@ async def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -589,7 +636,7 @@ async def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -602,7 +649,7 @@ def list_static_site_users( ) -> AsyncIterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -617,6 +664,8 @@ def list_static_site_users( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -630,6 +679,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -642,6 +692,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -659,7 +710,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -673,10 +728,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace_async - async def delete_static_site_user( + async def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -686,7 +741,7 @@ async def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -707,6 +762,8 @@ async def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -714,12 +771,17 @@ async def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -730,7 +792,7 @@ async def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace_async @@ -745,7 +807,7 @@ async def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -769,6 +831,7 @@ async def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -779,6 +842,7 @@ async def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -786,7 +850,11 @@ async def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -801,7 +869,7 @@ async def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -813,7 +881,7 @@ def get_static_site_builds( ) -> AsyncIterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -826,6 +894,8 @@ def get_static_site_builds( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -838,6 +908,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -849,6 +920,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -866,7 +938,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -880,7 +956,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace_async async def get_static_site_build( @@ -892,7 +968,7 @@ async def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -911,18 +987,25 @@ async def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1020,10 @@ async def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore - async def _delete_static_site_build_initial( + async def _delete_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -953,18 +1036,25 @@ async def _delete_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_static_site_build_request_initial( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_build_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -974,11 +1064,11 @@ async def _delete_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + _delete_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site_build( + async def begin_delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -987,7 +1077,7 @@ async def begin_delete_static_site_build( ) -> AsyncLROPoller[None]: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1007,7 +1097,8 @@ async def begin_delete_static_site_build( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1019,6 +1110,7 @@ async def begin_delete_static_site_build( resource_group_name=resource_group_name, name=name, environment_name=environment_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1039,10 +1131,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + begin_delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace_async async def create_or_update_static_site_build_app_settings( @@ -1055,7 +1146,7 @@ async def create_or_update_static_site_build_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site build. - Description for Creates or updates the app settings of a static site build. + 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 @@ -1076,6 +1167,7 @@ async def create_or_update_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1085,6 +1177,7 @@ async def create_or_update_static_site_build_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_app_settings.metadata['url'], @@ -1092,7 +1185,11 @@ async def create_or_update_static_site_build_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1107,7 +1204,7 @@ async def create_or_update_static_site_build_app_settings( return deserialized - create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + create_or_update_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1121,7 +1218,7 @@ async def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -1142,6 +1239,7 @@ async def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1151,6 +1249,7 @@ async def create_or_update_static_site_build_function_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -1158,7 +1257,11 @@ async def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1173,7 +1276,7 @@ async def create_or_update_static_site_build_function_app_settings( return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings"} # type: ignore @distributed_trace @@ -1186,7 +1289,7 @@ def list_static_site_build_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -1201,6 +1304,8 @@ def list_static_site_build_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1214,6 +1319,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -1226,6 +1332,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1243,7 +1350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1257,7 +1368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions"} # type: ignore @distributed_trace_async async def list_static_site_build_app_settings( @@ -1269,7 +1380,7 @@ async def list_static_site_build_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -1288,18 +1399,25 @@ async def list_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_build_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1432,7 @@ async def list_static_site_build_app_settings( return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + list_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings"} # type: ignore @distributed_trace_async @@ -1327,7 +1445,7 @@ async def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -1346,18 +1464,25 @@ async def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1372,7 +1497,7 @@ async def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -1385,8 +1510,7 @@ def get_user_provided_function_apps_for_static_site_build( ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site build. - Description for Gets the details of the user provided function apps registered with a static - site build. + 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 @@ -1401,6 +1525,8 @@ def get_user_provided_function_apps_for_static_site_build( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1414,6 +1540,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site_build.metadata['url'], ) request = _convert_request(request) @@ -1426,6 +1553,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1443,7 +1571,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1457,7 +1589,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps"} # type: ignore @distributed_trace_async async def get_user_provided_function_app_for_static_site_build( @@ -1470,8 +1602,7 @@ async def get_user_provided_function_app_for_static_site_build( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site build. - Description for Gets the details of the user provided function app registered with a static - site build. + 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 @@ -1492,6 +1623,8 @@ async def get_user_provided_function_app_for_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_user_provided_function_app_for_static_site_build_request( resource_group_name=resource_group_name, @@ -1499,12 +1632,17 @@ async def get_user_provided_function_app_for_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1519,7 +1657,7 @@ async def get_user_provided_function_app_for_static_site_build( return deserialized - get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore async def _register_user_provided_function_app_with_static_site_build_initial( @@ -1538,6 +1676,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -1548,6 +1687,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -1556,7 +1696,11 @@ async def _register_user_provided_function_app_with_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1574,7 +1718,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( return deserialized - _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async @@ -1590,7 +1734,7 @@ async def begin_register_user_provided_function_app_with_static_site_build( ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site build. - Description for Register a user provided function app with a static site build. + 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 @@ -1622,8 +1766,9 @@ async def begin_register_user_provided_function_app_with_static_site_build( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1638,6 +1783,7 @@ async def begin_register_user_provided_function_app_with_static_site_build( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1662,13 +1808,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async - async def detach_user_provided_function_app_from_static_site_build( + async def detach_user_provided_function_app_from_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1678,7 +1823,7 @@ async def detach_user_provided_function_app_from_static_site_build( ) -> None: """Detach the user provided function app from the static site build. - Description for Detach the user provided function app from the static site build. + 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 @@ -1699,6 +1844,8 @@ async def detach_user_provided_function_app_from_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_detach_user_provided_function_app_from_static_site_build_request( resource_group_name=resource_group_name, @@ -1706,12 +1853,17 @@ async def detach_user_provided_function_app_from_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1722,10 +1874,10 @@ async def detach_user_provided_function_app_from_static_site_build( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - async def _create_zip_deployment_for_static_site_build_initial( + async def _create_zip_deployment_for_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1739,6 +1891,7 @@ async def _create_zip_deployment_for_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -1748,6 +1901,7 @@ async def _create_zip_deployment_for_static_site_build_initial( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_build_initial.metadata['url'], @@ -1755,7 +1909,11 @@ async def _create_zip_deployment_for_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1765,11 +1923,11 @@ async def _create_zip_deployment_for_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace_async - async def begin_create_zip_deployment_for_static_site_build( + async def begin_create_zip_deployment_for_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1779,7 +1937,7 @@ async def begin_create_zip_deployment_for_static_site_build( ) -> AsyncLROPoller[None]: """Deploys zipped content to a specific environment of a static site. - Description for Deploys zipped content to a specific environment of a static site. + 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 @@ -1803,8 +1961,9 @@ async def begin_create_zip_deployment_for_static_site_build( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1817,6 +1976,7 @@ async def begin_create_zip_deployment_for_static_site_build( name=name, environment_name=environment_name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1838,10 +1998,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace_async async def create_or_update_static_site_app_settings( @@ -1853,7 +2012,7 @@ async def create_or_update_static_site_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site. - Description for Creates or updates the app settings of a static site. + 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 @@ -1872,6 +2031,7 @@ async def create_or_update_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1880,6 +2040,7 @@ async def create_or_update_static_site_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_app_settings.metadata['url'], @@ -1887,7 +2048,11 @@ async def create_or_update_static_site_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1902,7 +2067,7 @@ async def create_or_update_static_site_app_settings( return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + create_or_update_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1915,7 +2080,7 @@ async def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -1934,6 +2099,7 @@ async def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1942,6 +2108,7 @@ async def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -1949,7 +2116,11 @@ async def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1964,7 +2135,7 @@ async def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace_async @@ -1977,7 +2148,7 @@ async def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -1997,6 +2168,7 @@ async def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -2005,6 +2177,7 @@ async def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -2012,7 +2185,11 @@ async def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2027,7 +2204,7 @@ async def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -2039,7 +2216,7 @@ def list_static_site_custom_domains( ) -> AsyncIterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -2052,6 +2229,8 @@ def list_static_site_custom_domains( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2064,6 +2243,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -2075,6 +2255,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2092,7 +2273,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2106,7 +2291,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace_async async def get_static_site_custom_domain( @@ -2118,7 +2303,7 @@ async def get_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Gets an existing custom domain for a particular static site. - Description for Gets an existing custom domain for a particular static site. + 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 @@ -2137,18 +2322,25 @@ async def get_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2163,7 +2355,7 @@ async def get_static_site_custom_domain( return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + get_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore async def _create_or_update_static_site_custom_domain_initial( @@ -2180,6 +2372,7 @@ async def _create_or_update_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -2189,6 +2382,7 @@ async def _create_or_update_static_site_custom_domain_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_custom_domain_initial.metadata['url'], @@ -2196,7 +2390,11 @@ async def _create_or_update_static_site_custom_domain_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2214,7 +2412,7 @@ async def _create_or_update_static_site_custom_domain_initial( return deserialized - _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _create_or_update_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async @@ -2228,8 +2426,7 @@ async def begin_create_or_update_static_site_custom_domain( ) -> AsyncLROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -2255,8 +2452,9 @@ async def begin_create_or_update_static_site_custom_domain( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.StaticSiteCustomDomainOverviewARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2269,6 +2467,7 @@ async def begin_create_or_update_static_site_custom_domain( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2293,12 +2492,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - async def _delete_static_site_custom_domain_initial( + async def _delete_static_site_custom_domain_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2311,18 +2509,25 @@ async def _delete_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_static_site_custom_domain_request_initial( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_custom_domain_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2332,11 +2537,11 @@ async def _delete_static_site_custom_domain_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _delete_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site_custom_domain( + async def begin_delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2345,7 +2550,7 @@ async def begin_delete_static_site_custom_domain( ) -> AsyncLROPoller[None]: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2365,7 +2570,8 @@ async def begin_delete_static_site_custom_domain( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2377,6 +2583,7 @@ async def begin_delete_static_site_custom_domain( resource_group_name=resource_group_name, name=name, domain_name=domain_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2397,12 +2604,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - async def _validate_custom_domain_can_be_added_to_static_site_initial( + async def _validate_custom_domain_can_be_added_to_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2416,6 +2622,7 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -2425,6 +2632,7 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'], @@ -2432,7 +2640,11 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2442,11 +2654,11 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace_async - async def begin_validate_custom_domain_can_be_added_to_static_site( + async def begin_validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2456,7 +2668,7 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( ) -> AsyncLROPoller[None]: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -2480,8 +2692,9 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2494,6 +2707,7 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2515,12 +2729,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore - async def _detach_static_site_initial( + async def _detach_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2532,17 +2745,24 @@ async def _detach_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_detach_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._detach_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2552,11 +2772,11 @@ async def _detach_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + _detach_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace_async - async def begin_detach_static_site( + async def begin_detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2564,7 +2784,7 @@ async def begin_detach_static_site( ) -> AsyncLROPoller[None]: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2582,7 +2802,8 @@ async def begin_detach_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2593,6 +2814,7 @@ async def begin_detach_static_site( raw_result = await self._detach_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2613,10 +2835,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + begin_detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace def list_static_site_functions( @@ -2627,7 +2848,7 @@ def list_static_site_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -2640,6 +2861,8 @@ def list_static_site_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2652,6 +2875,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -2663,6 +2887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2680,7 +2905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2694,7 +2923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace_async async def list_static_site_app_settings( @@ -2705,7 +2934,7 @@ async def list_static_site_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2722,17 +2951,24 @@ async def list_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2747,7 +2983,7 @@ async def list_static_site_app_settings( return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + list_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings"} # type: ignore @distributed_trace_async @@ -2759,7 +2995,7 @@ async def list_static_site_configured_roles( ) -> "_models.StringList": """Lists the roles configured for the static site. - Description for Lists the roles configured for the static site. + 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 @@ -2776,17 +3012,24 @@ async def list_static_site_configured_roles( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_configured_roles_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_configured_roles.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2801,7 +3044,7 @@ async def list_static_site_configured_roles( return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + list_static_site_configured_roles.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles"} # type: ignore @distributed_trace_async @@ -2813,7 +3056,7 @@ async def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2830,17 +3073,24 @@ async def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2855,7 +3105,7 @@ async def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -2867,7 +3117,7 @@ async def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -2884,17 +3134,24 @@ async def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2909,7 +3166,7 @@ async def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace @@ -2921,7 +3178,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a static site. - Description for Gets the list of private endpoint connections associated with a static site. + 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 @@ -2934,6 +3191,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2946,6 +3205,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -2957,6 +3217,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2974,7 +3235,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2988,7 +3253,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -3000,7 +3265,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3019,18 +3284,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3045,7 +3317,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -3062,6 +3334,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -3071,6 +3344,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -3078,7 +3352,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3096,7 +3374,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -3110,7 +3388,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -3135,8 +3413,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3149,6 +3428,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3173,10 +3453,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -3191,18 +3470,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3223,7 +3509,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -3236,7 +3522,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3256,7 +3542,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -3268,6 +3555,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3291,10 +3579,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -3305,7 +3592,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3322,17 +3609,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,11 +3641,11 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources"} # type: ignore @distributed_trace_async - async def reset_static_site_api_key( + async def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3360,7 +3654,7 @@ async def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -3380,6 +3674,7 @@ async def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -3388,6 +3683,7 @@ async def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -3395,7 +3691,11 @@ async def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3406,7 +3706,7 @@ async def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore @distributed_trace @@ -3418,8 +3718,7 @@ def get_user_provided_function_apps_for_static_site( ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site. - Description for Gets the details of the user provided function apps registered with a static - site. + 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 @@ -3432,6 +3731,8 @@ def get_user_provided_function_apps_for_static_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3444,6 +3745,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site.metadata['url'], ) request = _convert_request(request) @@ -3455,6 +3757,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3472,7 +3775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3486,7 +3793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps"} # type: ignore @distributed_trace_async async def get_user_provided_function_app_for_static_site( @@ -3498,8 +3805,7 @@ async def get_user_provided_function_app_for_static_site( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site. - Description for Gets the details of the user provided function app registered with a static - site. + 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 @@ -3518,18 +3824,25 @@ async def get_user_provided_function_app_for_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_user_provided_function_app_for_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3544,7 +3857,7 @@ async def get_user_provided_function_app_for_static_site( return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore async def _register_user_provided_function_app_with_static_site_initial( @@ -3562,6 +3875,7 @@ async def _register_user_provided_function_app_with_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -3571,6 +3885,7 @@ async def _register_user_provided_function_app_with_static_site_initial( name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -3579,7 +3894,11 @@ async def _register_user_provided_function_app_with_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3597,7 +3916,7 @@ async def _register_user_provided_function_app_with_static_site_initial( return deserialized - _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async @@ -3612,7 +3931,7 @@ async def begin_register_user_provided_function_app_with_static_site( ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site. - Description for Register a user provided function app with a static site. + 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 @@ -3642,8 +3961,9 @@ async def begin_register_user_provided_function_app_with_static_site( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3657,6 +3977,7 @@ async def begin_register_user_provided_function_app_with_static_site( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3681,13 +4002,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async - async def detach_user_provided_function_app_from_static_site( + async def detach_user_provided_function_app_from_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3696,7 +4016,7 @@ async def detach_user_provided_function_app_from_static_site( ) -> None: """Detach the user provided function app from the static site. - Description for Detach the user provided function app from the static site. + 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 @@ -3715,18 +4035,25 @@ async def detach_user_provided_function_app_from_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_detach_user_provided_function_app_from_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3737,10 +4064,10 @@ async def detach_user_provided_function_app_from_static_site( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - async def _create_zip_deployment_for_static_site_initial( + async def _create_zip_deployment_for_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3753,6 +4080,7 @@ async def _create_zip_deployment_for_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -3761,6 +4089,7 @@ async def _create_zip_deployment_for_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_initial.metadata['url'], @@ -3768,7 +4097,11 @@ async def _create_zip_deployment_for_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3778,11 +4111,11 @@ async def _create_zip_deployment_for_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore @distributed_trace_async - async def begin_create_zip_deployment_for_static_site( + async def begin_create_zip_deployment_for_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3791,7 +4124,7 @@ async def begin_create_zip_deployment_for_static_site( ) -> AsyncLROPoller[None]: """Deploys zipped content to a static site. - Description for Deploys zipped content to a static site. + 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 @@ -3813,8 +4146,9 @@ async def begin_create_zip_deployment_for_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -3826,6 +4160,7 @@ async def begin_create_zip_deployment_for_static_site( resource_group_name=resource_group_name, name=name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3847,7 +4182,6 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_top_level_domains_operations.py index 2eb249446c15..f1e4f56659c3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -122,7 +129,7 @@ async def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -137,16 +144,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -161,7 +175,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -173,7 +187,7 @@ def list_agreements( ) -> AsyncIterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -186,6 +200,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -200,6 +215,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -213,6 +229,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -232,7 +249,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -246,4 +267,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_web_apps_operations.py index 6e0c5ded9518..84cbccf611fb 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -137,6 +144,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -148,6 +157,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -159,6 +169,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> "_models.Site": """Gets the details of a web, mobile, or API app. - Description for 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,7 +266,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -260,6 +282,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -268,6 +291,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -275,7 +299,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -293,7 +321,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -307,8 +335,8 @@ async def begin_create_or_update( """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. + 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 @@ -329,8 +357,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -342,6 +371,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -366,13 +396,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -382,16 +411,16 @@ async def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -404,11 +433,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -416,7 +448,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -427,7 +463,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -441,8 +477,8 @@ async def update( """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. + 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 @@ -462,6 +498,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -470,6 +507,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -477,7 +515,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -496,7 +538,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -509,13 +551,13 @@ async def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -528,18 +570,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -554,11 +603,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -567,7 +616,7 @@ async def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -586,6 +635,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -594,6 +644,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -601,7 +652,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +667,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -625,7 +680,7 @@ async def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -645,6 +700,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -653,6 +709,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -660,7 +717,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -675,7 +736,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -687,7 +748,7 @@ def list_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -700,6 +761,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -712,6 +775,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -723,6 +787,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -740,7 +805,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -754,7 +823,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def get_backup_status( @@ -766,7 +835,7 @@ async def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -785,18 +854,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -811,11 +887,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -824,7 +900,7 @@ async def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -843,18 +919,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -865,7 +948,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -881,9 +964,9 @@ async def list_backup_status_secrets( 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. + 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 @@ -904,6 +987,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -913,6 +997,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -920,7 +1005,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -935,10 +1024,10 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - async def _restore_initial( + async def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -952,6 +1041,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -961,6 +1051,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -968,7 +1059,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -978,11 +1073,11 @@ async def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore( + async def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -992,7 +1087,7 @@ async def begin_restore( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -1014,8 +1109,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1028,6 +1124,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1049,10 +1146,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_basic_publishing_credentials_policies( @@ -1063,8 +1159,7 @@ def list_basic_publishing_credentials_policies( ) -> AsyncIterable["_models.PublishingCredentialsPoliciesCollection"]: """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. + 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 @@ -1077,6 +1172,8 @@ def list_basic_publishing_credentials_policies( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PublishingCredentialsPoliciesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublishingCredentialsPoliciesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1089,6 +1186,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) @@ -1100,6 +1198,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1117,7 +1216,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1131,7 +1234,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + list_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async async def get_ftp_allowed( @@ -1142,7 +1245,7 @@ async def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -1159,17 +1262,24 @@ async def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1184,7 +1294,7 @@ async def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1197,7 +1307,7 @@ async def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -1217,6 +1327,7 @@ async def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1225,6 +1336,7 @@ async def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -1232,7 +1344,11 @@ async def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1247,7 +1363,7 @@ async def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1259,7 +1375,7 @@ async def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -1276,17 +1392,24 @@ async def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1301,7 +1424,7 @@ async def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -1314,7 +1437,7 @@ async def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -1334,6 +1457,7 @@ async def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1342,6 +1466,7 @@ async def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -1349,7 +1474,11 @@ async def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1364,7 +1493,7 @@ async def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -1376,7 +1505,7 @@ def list_configurations( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -1389,6 +1518,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1401,6 +1532,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1412,6 +1544,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1429,7 +1562,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1443,7 +1580,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1455,7 +1592,7 @@ async def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -1474,6 +1611,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1482,6 +1620,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1489,7 +1628,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1504,7 +1647,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1516,7 +1659,7 @@ async def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -1533,17 +1676,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1558,7 +1708,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1571,7 +1721,7 @@ async def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -1590,6 +1740,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1598,6 +1749,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1605,7 +1757,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1620,7 +1776,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1632,7 +1788,7 @@ async def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -1649,17 +1805,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1674,7 +1837,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1687,8 +1850,7 @@ async def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -1707,6 +1869,7 @@ async def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -1715,6 +1878,7 @@ async def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -1722,7 +1886,11 @@ async def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1737,7 +1905,7 @@ async def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -1749,7 +1917,7 @@ async def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -1766,17 +1934,24 @@ async def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1791,7 +1966,7 @@ async def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -1804,7 +1979,7 @@ async def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -1824,6 +1999,7 @@ async def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -1832,6 +2008,7 @@ async def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -1839,7 +2016,11 @@ async def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1854,7 +2035,7 @@ async def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -1866,7 +2047,7 @@ async def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -1883,17 +2064,24 @@ async def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1908,7 +2096,7 @@ async def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -1921,7 +2109,7 @@ async def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -1940,6 +2128,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -1948,6 +2137,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -1955,7 +2145,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1970,11 +2164,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1982,7 +2176,7 @@ async def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -1999,17 +2193,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2020,7 +2221,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -2032,7 +2233,7 @@ async def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -2049,17 +2250,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2074,7 +2282,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -2086,7 +2294,7 @@ def get_app_settings_key_vault_references( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -2099,6 +2307,8 @@ def get_app_settings_key_vault_references( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2111,6 +2321,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -2122,6 +2333,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2139,7 +2351,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2153,7 +2369,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async async def get_app_setting_key_vault_reference( @@ -2165,7 +2381,7 @@ async def get_app_setting_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2184,18 +2400,25 @@ async def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2210,7 +2433,7 @@ async def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -2222,7 +2445,7 @@ def get_site_connection_string_key_vault_references( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -2235,6 +2458,8 @@ def get_site_connection_string_key_vault_references( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2247,6 +2472,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -2258,6 +2484,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2275,7 +2502,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2289,7 +2520,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace_async async def get_site_connection_string_key_vault_reference( @@ -2301,7 +2532,7 @@ async def get_site_connection_string_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2320,18 +2551,25 @@ async def get_site_connection_string_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_connection_string_key_vault_reference_request( resource_group_name=resource_group_name, name=name, connection_string_key=connection_string_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2346,7 +2584,7 @@ async def get_site_connection_string_key_vault_reference( return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace_async @@ -2359,7 +2597,7 @@ async def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -2378,6 +2616,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -2386,6 +2625,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -2393,7 +2633,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2408,7 +2652,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -2420,7 +2664,7 @@ async def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -2437,17 +2681,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2462,7 +2713,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -2474,7 +2725,7 @@ async def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -2491,17 +2742,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2516,7 +2774,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2529,7 +2787,7 @@ async def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -2549,6 +2807,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -2557,6 +2816,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -2564,7 +2824,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2579,7 +2843,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2592,7 +2856,7 @@ async def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -2611,6 +2875,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -2619,6 +2884,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -2626,7 +2892,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2641,7 +2911,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -2653,7 +2923,7 @@ async def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -2670,17 +2940,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2695,7 +2972,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -2710,17 +2987,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2734,7 +3018,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -2746,7 +3030,7 @@ async def begin_list_publishing_credentials( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -2764,7 +3048,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2775,6 +3060,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2798,10 +3084,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2813,7 +3098,7 @@ async def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -2832,6 +3117,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2840,6 +3126,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2847,7 +3134,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2862,7 +3153,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2874,7 +3165,7 @@ async def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -2891,17 +3182,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2916,7 +3214,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2928,8 +3226,7 @@ async def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -2946,17 +3243,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2971,7 +3275,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -2985,8 +3289,8 @@ async def update_slot_configuration_names( """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. + 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 @@ -3005,6 +3309,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -3013,6 +3318,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -3020,7 +3326,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3035,7 +3345,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -3048,8 +3358,8 @@ async def get_configuration( """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. + 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 @@ -3066,17 +3376,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3091,7 +3408,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -3104,7 +3421,7 @@ async def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -3123,6 +3440,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -3131,6 +3449,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -3138,7 +3457,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3153,7 +3476,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -3166,7 +3489,7 @@ async def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -3185,6 +3508,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -3193,6 +3517,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -3200,7 +3525,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3215,7 +3544,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -3228,8 +3557,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -3242,6 +3571,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3254,6 +3585,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -3265,6 +3597,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3282,7 +3615,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3296,7 +3633,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -3308,7 +3645,7 @@ async def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -3327,18 +3664,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3353,11 +3697,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3366,7 +3710,7 @@ async def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -3385,18 +3729,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3407,7 +3758,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -3419,7 +3770,7 @@ async def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -3436,17 +3787,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3462,7 +3820,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -3474,7 +3832,7 @@ async def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -3491,17 +3849,24 @@ async def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3517,7 +3882,7 @@ async def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -3529,7 +3894,7 @@ def list_continuous_web_jobs( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -3542,6 +3907,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3554,6 +3921,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -3565,6 +3933,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3582,7 +3951,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3596,7 +3969,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -3608,7 +3981,7 @@ async def get_continuous_web_job( ) -> "_models.ContinuousWebJob": """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3627,18 +4000,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3653,11 +4033,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3666,7 +4046,7 @@ async def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3685,18 +4065,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3707,11 +4094,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3720,7 +4107,7 @@ async def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -3739,18 +4126,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3761,11 +4155,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3774,7 +4168,7 @@ async def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -3793,18 +4187,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3815,7 +4216,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3827,7 +4228,7 @@ def list_deployments( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -3840,6 +4241,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3852,6 +4255,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3863,6 +4267,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3880,7 +4285,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3894,7 +4303,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3906,7 +4315,7 @@ async def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -3925,18 +4334,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3951,7 +4367,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -3965,7 +4381,7 @@ async def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -3986,6 +4402,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -3995,6 +4412,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -4002,7 +4420,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4017,11 +4439,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4030,7 +4452,7 @@ async def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -4049,18 +4471,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4071,7 +4500,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -4084,7 +4513,7 @@ async def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -4104,18 +4533,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4130,7 +4566,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -4144,8 +4580,8 @@ async def discover_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. - 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. + 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 @@ -4165,6 +4601,7 @@ async def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -4173,6 +4610,7 @@ async def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -4180,7 +4618,11 @@ async def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4195,7 +4637,7 @@ async def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -4207,7 +4649,7 @@ def list_domain_ownership_identifiers( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -4220,6 +4662,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4232,6 +4676,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -4243,6 +4688,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4260,7 +4706,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4274,7 +4724,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -4286,7 +4736,7 @@ async def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -4305,18 +4755,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4331,7 +4788,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4345,8 +4802,7 @@ async def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4367,6 +4823,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4376,6 +4833,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -4383,7 +4841,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4398,11 +4860,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4411,7 +4873,7 @@ async def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -4430,18 +4892,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4452,7 +4921,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4466,8 +4935,7 @@ async def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4488,6 +4956,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4497,6 +4966,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -4504,7 +4974,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4519,7 +4993,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4531,7 +5005,7 @@ async def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -4548,17 +5022,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4573,7 +5054,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -4589,6 +5070,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -4597,6 +5079,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -4604,7 +5087,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4618,7 +5105,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -4631,7 +5118,7 @@ async def begin_create_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -4652,8 +5139,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -4665,6 +5153,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4689,10 +5178,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -4703,7 +5191,7 @@ async def get_ms_deploy_log( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -4720,17 +5208,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4745,7 +5240,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -4757,7 +5252,7 @@ def list_functions( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -4770,6 +5265,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4782,6 +5279,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -4793,6 +5291,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4810,7 +5309,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4824,7 +5327,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -4835,7 +5338,7 @@ async def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -4852,17 +5355,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4877,7 +5387,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -4890,7 +5400,7 @@ async def get_function( ) -> "_models.FunctionEnvelope": """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -4909,18 +5419,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4935,7 +5452,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -4952,6 +5469,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -4961,6 +5479,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -4968,7 +5487,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4982,7 +5505,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -4996,7 +5519,7 @@ async def begin_create_function( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -5019,8 +5542,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -5033,6 +5557,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5057,13 +5582,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5072,7 +5596,7 @@ async def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -5091,18 +5615,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5113,7 +5644,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -5128,7 +5659,7 @@ async def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -5151,6 +5682,7 @@ async def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5161,6 +5693,7 @@ async def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -5168,7 +5701,11 @@ async def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5187,11 +5724,11 @@ async def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret( + async def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5201,7 +5738,7 @@ async def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -5222,6 +5759,8 @@ async def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -5229,12 +5768,17 @@ async def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5245,7 +5789,7 @@ async def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -5258,7 +5802,7 @@ async def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -5277,18 +5821,25 @@ async def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5303,7 +5854,7 @@ async def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -5316,7 +5867,7 @@ async def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -5335,18 +5886,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5361,7 +5919,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -5373,7 +5931,7 @@ async def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -5390,17 +5948,24 @@ async def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5415,11 +5980,11 @@ async def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status( + async def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5427,7 +5992,7 @@ async def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -5444,17 +6009,24 @@ async def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5465,11 +6037,11 @@ async def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions( + async def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5477,7 +6049,7 @@ async def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -5494,17 +6066,24 @@ async def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5515,7 +6094,7 @@ async def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace_async @@ -5530,7 +6109,7 @@ async def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -5553,6 +6132,7 @@ async def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5563,6 +6143,7 @@ async def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -5570,7 +6151,11 @@ async def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5589,11 +6174,11 @@ async def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret( + async def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5603,7 +6188,7 @@ async def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -5624,6 +6209,8 @@ async def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -5631,12 +6218,17 @@ async def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5647,7 +6239,7 @@ async def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -5659,7 +6251,7 @@ def list_host_name_bindings( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -5672,6 +6264,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5684,6 +6278,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -5695,6 +6290,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5712,7 +6308,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5726,7 +6326,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -5738,7 +6338,7 @@ async def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -5757,18 +6357,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5783,7 +6390,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5797,7 +6404,7 @@ async def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -5819,6 +6426,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -5828,6 +6436,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -5835,7 +6444,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5850,11 +6463,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5863,7 +6476,7 @@ async def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -5882,18 +6495,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5904,7 +6524,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5918,7 +6538,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -5939,6 +6559,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -5946,12 +6568,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5966,7 +6593,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -5981,7 +6608,7 @@ async def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -6004,6 +6631,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -6014,6 +6642,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -6021,7 +6650,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6036,11 +6669,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6050,7 +6683,7 @@ async def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -6071,6 +6704,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -6078,12 +6713,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6094,7 +6734,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6109,7 +6749,7 @@ async def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -6132,6 +6772,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -6142,6 +6783,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -6149,7 +6791,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6164,7 +6810,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6176,7 +6822,7 @@ async def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -6193,17 +6839,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6218,7 +6871,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -6230,8 +6883,7 @@ async def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -6248,17 +6900,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6273,7 +6932,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -6286,7 +6945,7 @@ async def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -6305,18 +6964,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6331,7 +6997,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6345,8 +7011,7 @@ async def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6367,6 +7032,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6376,6 +7042,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -6383,7 +7050,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6398,11 +7069,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6411,7 +7082,7 @@ async def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -6430,18 +7101,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6452,7 +7130,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6466,8 +7144,7 @@ async def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6488,6 +7165,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6497,6 +7175,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -6504,7 +7183,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6519,7 +7202,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -6531,7 +7214,7 @@ def list_instance_identifiers( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -6544,6 +7227,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6556,6 +7241,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -6567,6 +7253,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6584,7 +7271,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6598,7 +7289,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_info( @@ -6610,7 +7301,7 @@ async def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -6629,18 +7320,25 @@ async def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6655,7 +7353,7 @@ async def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -6668,7 +7366,7 @@ async def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -6687,18 +7385,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6713,7 +7418,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -6730,6 +7435,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -6739,6 +7445,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -6746,7 +7453,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -6760,7 +7471,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -6774,7 +7485,7 @@ async def begin_create_instance_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -6797,8 +7508,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -6811,6 +7523,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6835,10 +7548,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -6850,7 +7562,7 @@ async def get_instance_ms_deploy_log( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -6869,18 +7581,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6895,7 +7614,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -6909,8 +7628,8 @@ def list_instance_processes( """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. + 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 @@ -6926,6 +7645,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6939,6 +7660,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -6951,6 +7673,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6968,7 +7691,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6982,7 +7709,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -6995,8 +7722,7 @@ async def get_instance_process( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7018,6 +7744,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -7025,12 +7753,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7045,11 +7778,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7060,8 +7793,8 @@ async def delete_instance_process( """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. + 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 @@ -7083,6 +7816,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -7090,12 +7825,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -7106,7 +7846,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -7120,8 +7860,7 @@ async def get_instance_process_dump( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -7143,6 +7882,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -7150,12 +7891,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7170,7 +7916,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -7185,8 +7931,8 @@ def list_instance_process_modules( """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. + 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 @@ -7204,6 +7950,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7218,6 +7966,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -7231,6 +7980,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7248,7 +7998,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7262,7 +8016,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -7276,8 +8030,7 @@ async def get_instance_process_module( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7301,6 +8054,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -7309,12 +8064,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7329,7 +8089,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -7343,8 +8103,7 @@ def list_instance_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -7362,6 +8121,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7376,6 +8137,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -7389,6 +8151,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7406,7 +8169,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7420,7 +8187,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable( @@ -7431,7 +8198,7 @@ async def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -7448,17 +8215,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7473,7 +8247,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -7485,7 +8259,7 @@ def list_site_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -7498,6 +8272,8 @@ def list_site_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7510,6 +8286,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -7521,6 +8298,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7538,7 +8316,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7552,7 +8334,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers( @@ -7563,7 +8345,7 @@ async def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -7580,17 +8362,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7605,7 +8394,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore async def _migrate_storage_initial( @@ -7622,6 +8411,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -7630,6 +8420,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -7638,7 +8429,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7652,7 +8447,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -7666,7 +8461,7 @@ async def begin_migrate_storage( ) -> AsyncLROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -7690,8 +8485,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -7704,6 +8500,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7728,10 +8525,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -7746,6 +8542,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -7754,6 +8551,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -7761,7 +8559,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7775,7 +8577,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -7788,7 +8590,7 @@ async def begin_migrate_my_sql( ) -> AsyncLROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -7809,8 +8611,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -7822,6 +8625,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7846,10 +8650,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -7861,8 +8664,8 @@ async def get_migrate_my_sql_status( """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. + 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 @@ -7879,17 +8682,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7904,7 +8714,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -7916,7 +8726,7 @@ async def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -7933,17 +8743,24 @@ async def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7958,7 +8775,7 @@ async def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -7974,9 +8791,9 @@ async def create_or_update_swift_virtual_network_connection_with_check( 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 + 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. @@ -7996,6 +8813,7 @@ async def create_or_update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -8004,6 +8822,7 @@ async def create_or_update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check.metadata['url'], @@ -8011,7 +8830,11 @@ async def create_or_update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8026,11 +8849,11 @@ async def create_or_update_swift_virtual_network_connection_with_check( return deserialized - create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network( + async def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8038,7 +8861,7 @@ async def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -8055,17 +8878,24 @@ async def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8076,7 +8906,7 @@ async def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -8092,9 +8922,9 @@ async def update_swift_virtual_network_connection_with_check( 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 + 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. @@ -8114,6 +8944,7 @@ async def update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -8122,6 +8953,7 @@ async def update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_with_check.metadata['url'], @@ -8129,7 +8961,11 @@ async def update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8144,7 +8980,7 @@ async def update_swift_virtual_network_connection_with_check( return deserialized - update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -8157,7 +8993,7 @@ async def list_network_features( ) -> "_models.NetworkFeatures": """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -8176,18 +9012,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8202,7 +9045,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -8215,8 +9058,7 @@ async def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8235,18 +9077,25 @@ async def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8265,7 +9114,7 @@ async def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8280,17 +9129,17 @@ async def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -8303,11 +9152,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8316,7 +9168,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8331,7 +9187,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_initial( @@ -8349,11 +9205,14 @@ async def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8362,7 +9221,11 @@ async def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8380,7 +9243,7 @@ async def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -8395,17 +9258,17 @@ async def begin_start_web_site_network_trace_operation( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -8421,7 +9284,8 @@ async def begin_start_web_site_network_trace_operation( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_01_15.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -8435,6 +9299,7 @@ async def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -8458,13 +9323,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace( + async def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8472,7 +9336,7 @@ async def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -8489,17 +9353,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8510,7 +9381,7 @@ async def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -8523,8 +9394,7 @@ async def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8543,18 +9413,25 @@ async def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8569,7 +9446,7 @@ async def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -8582,8 +9459,7 @@ async def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8602,18 +9478,25 @@ async def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8632,7 +9515,7 @@ async def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8645,8 +9528,7 @@ async def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8665,18 +9547,25 @@ async def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8691,11 +9580,11 @@ async def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8703,8 +9592,7 @@ async def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -8721,17 +9609,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8742,7 +9637,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -8755,7 +9650,7 @@ def list_perf_mon_counters( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -8763,7 +9658,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -8772,6 +9667,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8784,6 +9681,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -8796,6 +9694,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -8814,7 +9713,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8828,7 +9731,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -8839,7 +9742,7 @@ async def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -8856,17 +9759,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8881,7 +9791,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -8893,7 +9803,7 @@ async def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -8910,17 +9820,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8935,7 +9852,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -8948,7 +9865,7 @@ async def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -8967,18 +9884,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8993,7 +9917,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9007,7 +9931,7 @@ async def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -9028,6 +9952,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -9037,6 +9962,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -9044,7 +9970,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9059,11 +9989,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9072,7 +10002,7 @@ async def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -9091,18 +10021,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9113,7 +10050,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9127,7 +10064,7 @@ async def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -9148,6 +10085,7 @@ async def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -9157,6 +10095,7 @@ async def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -9164,7 +10103,11 @@ async def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9179,7 +10122,7 @@ async def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9192,8 +10135,8 @@ async def get_private_access( """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. + 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 @@ -9210,17 +10153,24 @@ async def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9235,7 +10185,7 @@ async def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -9249,8 +10199,8 @@ async def put_private_access_vnet( """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. + 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 @@ -9269,6 +10219,7 @@ async def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -9277,6 +10228,7 @@ async def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -9284,7 +10236,11 @@ async def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9299,7 +10255,7 @@ async def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -9311,7 +10267,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -9324,6 +10280,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9336,6 +10294,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -9347,6 +10306,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9364,7 +10324,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9378,7 +10342,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -9390,7 +10354,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9409,18 +10373,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9435,7 +10406,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -9452,6 +10423,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -9461,6 +10433,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -9468,7 +10441,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9486,7 +10463,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -9500,7 +10477,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -9525,8 +10502,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -9539,6 +10517,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -9563,10 +10542,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -9581,18 +10559,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -9613,7 +10598,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -9626,7 +10611,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9646,7 +10631,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -9658,6 +10644,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -9681,10 +10668,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -9695,7 +10681,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9712,17 +10698,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9737,7 +10730,7 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -9750,8 +10743,8 @@ def list_processes( """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. + 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 @@ -9764,6 +10757,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9776,6 +10771,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -9787,6 +10783,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9804,7 +10801,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9818,7 +10819,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -9830,8 +10831,7 @@ async def get_process( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -9850,18 +10850,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9876,11 +10883,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9890,8 +10897,8 @@ async def delete_process( """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. + 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 @@ -9910,18 +10917,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -9932,7 +10946,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -9945,8 +10959,7 @@ async def get_process_dump( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -9965,18 +10978,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9991,7 +11011,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -10005,8 +11025,8 @@ def list_process_modules( """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. + 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 @@ -10021,6 +11041,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10034,6 +11056,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -10046,6 +11069,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10063,7 +11087,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10077,7 +11105,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -10090,8 +11118,7 @@ async def get_process_module( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -10112,6 +11139,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -10119,12 +11148,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10139,7 +11173,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -10152,8 +11186,7 @@ def list_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -10168,6 +11201,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10181,6 +11216,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -10193,6 +11229,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10210,7 +11247,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10224,7 +11265,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -10235,7 +11276,7 @@ def list_public_certificates( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -10248,6 +11289,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10260,6 +11303,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -10271,6 +11315,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10288,7 +11333,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10302,7 +11351,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -10314,7 +11363,7 @@ async def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -10333,18 +11382,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10359,7 +11415,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -10373,7 +11429,7 @@ async def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -10395,6 +11451,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -10404,6 +11461,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -10411,7 +11469,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10426,11 +11488,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10439,7 +11501,7 @@ async def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -10458,18 +11520,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -10480,7 +11549,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -10493,7 +11562,7 @@ async def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -10514,6 +11583,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -10522,6 +11592,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -10529,7 +11600,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10544,11 +11619,11 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10557,8 +11632,8 @@ async def reset_production_slot_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. + 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 @@ -10575,17 +11650,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10596,11 +11678,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10610,17 +11692,18 @@ async def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -10633,11 +11716,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -10645,7 +11731,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10656,10 +11746,10 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - async def _restore_from_backup_blob_initial( + async def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10672,6 +11762,7 @@ async def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -10680,6 +11771,7 @@ async def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -10687,7 +11779,11 @@ async def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10697,11 +11793,11 @@ async def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob( + async def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10710,7 +11806,7 @@ async def begin_restore_from_backup_blob( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -10730,8 +11826,9 @@ async def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10743,6 +11840,7 @@ async def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10764,12 +11862,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_initial( + async def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10782,6 +11879,7 @@ async def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -10790,6 +11888,7 @@ async def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -10797,7 +11896,11 @@ async def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10807,11 +11910,11 @@ async def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app( + async def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10820,7 +11923,7 @@ async def begin_restore_from_deleted_app( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -10840,8 +11943,9 @@ async def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10853,6 +11957,7 @@ async def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10874,12 +11979,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_initial( + async def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10892,6 +11996,7 @@ async def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -10900,6 +12005,7 @@ async def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -10907,7 +12013,11 @@ async def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10917,11 +12027,11 @@ async def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot( + async def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10930,7 +12040,7 @@ async def begin_restore_snapshot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -10951,8 +12061,9 @@ async def begin_restore_snapshot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10964,6 +12075,7 @@ async def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10985,10 +12097,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -10999,7 +12110,7 @@ def list_site_extensions( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -11012,6 +12123,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11024,6 +12137,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -11035,6 +12149,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11052,7 +12167,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11066,7 +12185,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -11078,7 +12197,7 @@ async def get_site_extension( ) -> "_models.SiteExtensionInfo": """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -11097,18 +12216,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11123,7 +12249,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -11139,18 +12265,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -11168,7 +12301,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -11181,7 +12314,7 @@ async def begin_install_site_extension( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -11203,7 +12336,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -11215,6 +12349,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -11238,13 +12373,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11253,7 +12387,7 @@ async def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -11272,18 +12406,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -11294,7 +12435,7 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -11306,7 +12447,7 @@ def list_slots( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -11318,6 +12459,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11330,6 +12473,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -11341,6 +12485,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11358,7 +12503,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11372,7 +12521,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -11384,7 +12533,7 @@ async def get_slot( ) -> "_models.Site": """Gets the details of a web, mobile, or API app. - Description for 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 @@ -11403,18 +12552,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11429,7 +12585,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -11446,6 +12602,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -11455,6 +12612,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -11462,7 +12620,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11480,7 +12642,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11495,8 +12657,8 @@ async def begin_create_or_update_slot( """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. + 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 @@ -11520,8 +12682,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -11534,6 +12697,7 @@ async def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11558,13 +12722,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11575,7 +12738,7 @@ async def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -11584,10 +12747,10 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -11600,12 +12763,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -11613,7 +12779,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -11624,7 +12794,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11639,8 +12809,8 @@ async def update_slot( """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. + 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 @@ -11663,6 +12833,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -11672,6 +12843,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -11679,7 +12851,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11698,7 +12874,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11712,7 +12888,7 @@ async def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -11720,7 +12896,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -11733,19 +12909,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11760,11 +12943,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11774,7 +12957,7 @@ async def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -11796,6 +12979,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -11805,6 +12989,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -11812,7 +12997,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11823,7 +13012,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -11837,7 +13026,7 @@ async def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -11860,6 +13049,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -11869,6 +13059,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -11876,7 +13067,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11891,7 +13086,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -11904,7 +13099,7 @@ def list_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -11920,6 +13115,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11933,6 +13130,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -11945,6 +13143,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11962,7 +13161,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11976,7 +13179,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def get_backup_status_slot( @@ -11989,7 +13192,7 @@ async def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -12011,6 +13214,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -12018,12 +13223,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12038,11 +13248,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12052,7 +13262,7 @@ async def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -12074,6 +13284,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -12081,12 +13293,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12097,7 +13314,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -12114,9 +13331,9 @@ async def list_backup_status_secrets_slot( 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. + 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 @@ -12139,6 +13356,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12149,6 +13367,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -12156,7 +13375,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12171,10 +13394,10 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - async def _restore_slot_initial( + async def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12189,6 +13412,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -12199,6 +13423,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -12206,7 +13431,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -12216,11 +13445,11 @@ async def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore_slot( + async def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12231,7 +13460,7 @@ async def begin_restore_slot( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -12256,8 +13485,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -12271,6 +13501,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -12292,10 +13523,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_basic_publishing_credentials_policies_slot( @@ -12307,8 +13537,7 @@ def list_basic_publishing_credentials_policies_slot( ) -> AsyncIterable["_models.PublishingCredentialsPoliciesCollection"]: """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. + 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 @@ -12323,6 +13552,8 @@ def list_basic_publishing_credentials_policies_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PublishingCredentialsPoliciesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublishingCredentialsPoliciesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12336,6 +13567,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_basic_publishing_credentials_policies_slot.metadata['url'], ) request = _convert_request(request) @@ -12348,6 +13580,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12365,7 +13598,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12379,7 +13616,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + list_basic_publishing_credentials_policies_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async async def get_ftp_allowed_slot( @@ -12391,7 +13628,7 @@ async def get_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -12410,18 +13647,25 @@ async def get_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ftp_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12436,7 +13680,7 @@ async def get_ftp_allowed_slot( return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -12450,7 +13694,7 @@ async def update_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -12472,6 +13716,7 @@ async def update_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -12481,6 +13726,7 @@ async def update_ftp_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed_slot.metadata['url'], @@ -12488,7 +13734,11 @@ async def update_ftp_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12503,7 +13753,7 @@ async def update_ftp_allowed_slot( return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -12516,7 +13766,7 @@ async def get_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -12535,18 +13785,25 @@ async def get_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_scm_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12561,7 +13818,7 @@ async def get_scm_allowed_slot( return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -12575,7 +13832,7 @@ async def update_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -12597,6 +13854,7 @@ async def update_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -12606,6 +13864,7 @@ async def update_scm_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed_slot.metadata['url'], @@ -12613,7 +13872,11 @@ async def update_scm_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12628,7 +13891,7 @@ async def update_scm_allowed_slot( return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -12641,7 +13904,7 @@ def list_configurations_slot( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -12657,6 +13920,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12670,6 +13935,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -12682,6 +13948,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12699,7 +13966,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12713,7 +13984,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -12726,7 +13997,7 @@ async def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -12748,6 +14019,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -12757,6 +14029,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -12764,7 +14037,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12779,7 +14056,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -12792,7 +14069,7 @@ async def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -12812,18 +14089,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12838,7 +14122,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -12852,7 +14136,7 @@ async def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -12873,6 +14157,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -12882,6 +14167,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -12889,7 +14175,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12904,7 +14194,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -12917,7 +14207,7 @@ async def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -12937,18 +14227,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12963,7 +14260,7 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -12977,8 +14274,7 @@ async def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -12999,6 +14295,7 @@ async def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -13008,6 +14305,7 @@ async def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -13015,7 +14313,11 @@ async def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13030,7 +14332,7 @@ async def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -13043,7 +14345,7 @@ async def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -13063,18 +14365,25 @@ async def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13089,7 +14398,7 @@ async def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -13103,7 +14412,7 @@ async def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -13126,6 +14435,7 @@ async def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -13135,6 +14445,7 @@ async def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -13142,7 +14453,11 @@ async def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13157,7 +14472,7 @@ async def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -13170,7 +14485,7 @@ async def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -13190,18 +14505,25 @@ async def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13216,7 +14538,7 @@ async def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -13230,7 +14552,7 @@ async def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -13252,6 +14574,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -13261,6 +14584,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -13268,7 +14592,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13283,11 +14611,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13296,7 +14624,7 @@ async def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -13316,18 +14644,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13338,7 +14673,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -13351,7 +14686,7 @@ async def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -13371,18 +14706,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13397,7 +14739,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -13410,7 +14752,7 @@ def get_app_settings_key_vault_references_slot( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -13425,6 +14767,8 @@ def get_app_settings_key_vault_references_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13438,6 +14782,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -13450,6 +14795,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13467,7 +14813,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13481,7 +14831,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async async def get_app_setting_key_vault_reference_slot( @@ -13494,7 +14844,7 @@ async def get_app_setting_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -13515,6 +14865,8 @@ async def get_app_setting_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_app_setting_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -13522,12 +14874,17 @@ async def get_app_setting_key_vault_reference_slot( app_setting_key=app_setting_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13542,7 +14899,7 @@ async def get_app_setting_key_vault_reference_slot( return deserialized - get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -13555,7 +14912,7 @@ def get_site_connection_string_key_vault_references_slot( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -13570,6 +14927,8 @@ def get_site_connection_string_key_vault_references_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13583,6 +14942,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -13595,6 +14955,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13612,7 +14973,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13626,7 +14991,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace_async async def get_site_connection_string_key_vault_reference_slot( @@ -13639,7 +15004,7 @@ async def get_site_connection_string_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -13660,6 +15025,8 @@ async def get_site_connection_string_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_connection_string_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -13667,12 +15034,17 @@ async def get_site_connection_string_key_vault_reference_slot( connection_string_key=connection_string_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13687,7 +15059,7 @@ async def get_site_connection_string_key_vault_reference_slot( return deserialized - get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace_async @@ -13701,7 +15073,7 @@ async def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -13723,6 +15095,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -13732,6 +15105,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -13739,7 +15113,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13754,7 +15132,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -13767,7 +15145,7 @@ async def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -13787,18 +15165,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13813,7 +15198,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -13826,7 +15211,7 @@ async def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -13846,18 +15231,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13872,7 +15264,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -13886,7 +15278,7 @@ async def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -13909,6 +15301,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -13918,6 +15311,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -13925,7 +15319,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13940,7 +15338,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -13954,7 +15352,7 @@ async def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -13976,6 +15374,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -13985,6 +15384,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -13992,7 +15392,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14007,7 +15411,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -14020,7 +15424,7 @@ async def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -14040,18 +15444,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14066,7 +15477,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -14082,18 +15493,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14107,7 +15525,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -14120,7 +15538,7 @@ async def begin_list_publishing_credentials_slot( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -14141,7 +15559,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -14153,6 +15572,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -14176,10 +15596,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -14192,7 +15611,7 @@ async def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -14213,6 +15632,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -14222,6 +15642,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -14229,7 +15650,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14244,7 +15669,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -14257,7 +15682,7 @@ async def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -14276,18 +15701,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14302,7 +15734,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -14316,8 +15748,8 @@ async def get_configuration_slot( """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. + 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 @@ -14337,18 +15769,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14363,7 +15802,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -14377,7 +15816,7 @@ async def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -14399,6 +15838,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14408,6 +15848,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -14415,7 +15856,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14430,7 +15875,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -14444,7 +15889,7 @@ async def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -14466,6 +15911,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14475,6 +15921,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -14482,7 +15929,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14497,7 +15948,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -14511,8 +15962,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -14528,6 +15979,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14541,6 +15994,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -14553,6 +16007,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14570,7 +16025,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14584,7 +16043,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -14597,7 +16056,7 @@ async def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -14619,6 +16078,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -14626,12 +16087,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14646,11 +16112,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14660,7 +16126,7 @@ async def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -14682,6 +16148,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -14689,12 +16157,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -14705,7 +16178,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -14718,7 +16191,7 @@ async def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -14737,18 +16210,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14764,7 +16244,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -14777,7 +16257,7 @@ async def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -14796,18 +16276,25 @@ async def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14823,7 +16310,7 @@ async def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -14836,7 +16323,7 @@ def list_continuous_web_jobs_slot( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -14852,6 +16339,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14865,6 +16354,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -14877,6 +16367,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14894,7 +16385,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14908,7 +16403,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -14921,7 +16416,7 @@ async def get_continuous_web_job_slot( ) -> "_models.ContinuousWebJob": """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -14943,6 +16438,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -14950,12 +16447,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14970,11 +16472,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14984,7 +16486,7 @@ async def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -15006,6 +16508,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15013,12 +16517,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15029,11 +16538,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15043,7 +16552,7 @@ async def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -15065,6 +16574,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15072,12 +16583,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15088,11 +16604,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15102,7 +16618,7 @@ async def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -15124,6 +16640,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15131,12 +16649,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15147,7 +16670,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -15160,7 +16683,7 @@ def list_deployments_slot( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -15176,6 +16699,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15189,6 +16714,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -15201,6 +16727,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15218,7 +16745,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15232,7 +16763,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -15245,7 +16776,7 @@ async def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -15267,6 +16798,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -15274,12 +16807,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15294,7 +16832,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -15309,7 +16847,7 @@ async def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -15333,6 +16871,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -15343,6 +16882,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -15350,7 +16890,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15365,11 +16909,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15379,7 +16923,7 @@ async def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -15401,6 +16945,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -15408,12 +16954,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15424,7 +16975,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -15438,7 +16989,7 @@ async def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -15461,6 +17012,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -15468,12 +17021,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15488,7 +17046,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -15503,8 +17061,8 @@ async def discover_backup_slot( """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. + 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 @@ -15527,6 +17085,7 @@ async def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -15536,6 +17095,7 @@ async def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -15543,7 +17103,11 @@ async def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15558,7 +17122,7 @@ async def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -15571,7 +17135,7 @@ def list_domain_ownership_identifiers_slot( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -15587,6 +17151,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15600,6 +17166,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -15612,6 +17179,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15629,7 +17197,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15643,7 +17215,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -15656,7 +17228,7 @@ async def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -15678,6 +17250,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -15685,12 +17259,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15705,7 +17284,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15720,8 +17299,7 @@ async def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -15745,6 +17323,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15755,6 +17334,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -15762,7 +17342,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15777,11 +17361,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15791,7 +17375,7 @@ async def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -15813,6 +17397,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -15820,12 +17406,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15836,7 +17427,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15851,8 +17442,7 @@ async def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -15876,6 +17466,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15886,6 +17477,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -15893,7 +17485,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15908,7 +17504,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15921,7 +17517,7 @@ async def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -15940,18 +17536,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15966,7 +17569,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -15983,6 +17586,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -15992,6 +17596,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -15999,7 +17604,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -16013,7 +17622,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -16027,7 +17636,7 @@ async def begin_create_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -16050,8 +17659,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -16064,6 +17674,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16088,10 +17699,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -16103,7 +17713,7 @@ async def get_ms_deploy_log_slot( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -16122,18 +17732,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16148,7 +17765,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -16161,7 +17778,7 @@ def list_instance_functions_slot( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -16176,6 +17793,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16189,6 +17808,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -16201,6 +17821,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16218,7 +17839,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16232,7 +17857,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -16244,7 +17869,7 @@ async def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -16263,18 +17888,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16289,7 +17921,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -16303,7 +17935,7 @@ async def get_instance_function_slot( ) -> "_models.FunctionEnvelope": """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -16324,6 +17956,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -16331,12 +17965,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16351,7 +17990,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -16369,6 +18008,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -16379,6 +18019,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -16386,7 +18027,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -16400,7 +18045,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -16415,7 +18060,7 @@ async def begin_create_instance_function_slot( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -16440,8 +18085,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -16455,6 +18101,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16479,13 +18126,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16495,7 +18141,7 @@ async def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -16516,6 +18162,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -16523,12 +18171,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16539,7 +18192,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -16555,7 +18208,7 @@ async def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -16580,6 +18233,7 @@ async def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -16591,6 +18245,7 @@ async def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -16598,7 +18253,11 @@ async def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -16617,11 +18276,11 @@ async def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret_slot( + async def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16632,7 +18291,7 @@ async def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -16655,6 +18314,8 @@ async def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -16663,12 +18324,17 @@ async def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16679,7 +18345,7 @@ async def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -16693,7 +18359,7 @@ async def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -16714,6 +18380,8 @@ async def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -16721,12 +18389,17 @@ async def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16741,7 +18414,7 @@ async def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -16755,7 +18428,7 @@ async def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -16776,6 +18449,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -16783,12 +18458,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16803,7 +18483,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -16816,7 +18496,7 @@ async def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -16835,18 +18515,25 @@ async def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16861,11 +18548,11 @@ async def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status_slot( + async def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16874,7 +18561,7 @@ async def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -16893,18 +18580,25 @@ async def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16915,11 +18609,11 @@ async def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions_slot( + async def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16928,7 +18622,7 @@ async def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -16947,18 +18641,25 @@ async def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16969,7 +18670,7 @@ async def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace_async @@ -16985,7 +18686,7 @@ async def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -17010,6 +18711,7 @@ async def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -17021,6 +18723,7 @@ async def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -17028,7 +18731,11 @@ async def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -17047,11 +18754,11 @@ async def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret_slot( + async def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17062,7 +18769,7 @@ async def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -17085,6 +18792,8 @@ async def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -17093,12 +18802,17 @@ async def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -17109,7 +18823,7 @@ async def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -17122,7 +18836,7 @@ def list_host_name_bindings_slot( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -17138,6 +18852,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17151,6 +18867,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -17163,6 +18880,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17180,7 +18898,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17194,7 +18916,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -17207,7 +18929,7 @@ async def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -17229,6 +18951,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -17236,12 +18960,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17256,7 +18985,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -17271,7 +19000,7 @@ async def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -17296,6 +19025,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -17306,6 +19036,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -17313,7 +19044,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17328,11 +19063,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17342,7 +19077,7 @@ async def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -17364,6 +19099,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -17371,12 +19108,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -17387,7 +19129,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -17402,7 +19144,7 @@ async def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -17425,6 +19167,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -17433,12 +19177,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17453,7 +19202,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17469,7 +19218,7 @@ async def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -17494,6 +19243,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -17505,6 +19255,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -17512,7 +19263,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17527,11 +19282,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17542,7 +19297,7 @@ async def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -17565,6 +19320,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -17573,12 +19330,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17589,7 +19351,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17605,7 +19367,7 @@ async def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -17630,6 +19392,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -17641,6 +19404,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -17648,7 +19412,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17663,7 +19431,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17676,7 +19444,7 @@ async def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -17695,18 +19463,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17721,7 +19496,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -17734,8 +19509,7 @@ async def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -17755,18 +19529,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17781,7 +19562,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -17795,7 +19576,7 @@ async def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -17817,6 +19598,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -17824,12 +19607,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17844,7 +19632,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -17859,8 +19647,7 @@ async def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -17884,6 +19671,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -17894,6 +19682,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -17901,7 +19690,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17916,11 +19709,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17930,7 +19723,7 @@ async def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -17952,6 +19745,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -17959,12 +19754,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17975,7 +19775,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -17990,8 +19790,7 @@ async def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -18015,6 +19814,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -18025,6 +19825,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -18032,7 +19833,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18047,7 +19852,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -18060,7 +19865,7 @@ def list_instance_identifiers_slot( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -18076,6 +19881,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18089,6 +19896,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -18101,6 +19909,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18118,7 +19927,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18132,7 +19945,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_info_slot( @@ -18145,7 +19958,7 @@ async def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -18167,6 +19980,8 @@ async def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -18174,12 +19989,17 @@ async def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18194,7 +20014,7 @@ async def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -18208,7 +20028,7 @@ async def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -18229,6 +20049,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -18236,12 +20058,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18256,7 +20083,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -18274,6 +20101,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -18284,6 +20112,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -18291,7 +20120,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -18305,7 +20138,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -18320,7 +20153,7 @@ async def begin_create_instance_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -18345,8 +20178,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -18360,6 +20194,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18384,10 +20219,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -18400,7 +20234,7 @@ async def get_instance_ms_deploy_log_slot( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -18421,6 +20255,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -18428,12 +20264,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18448,7 +20289,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -18463,8 +20304,8 @@ def list_instance_processes_slot( """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. + 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 @@ -18483,6 +20324,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18497,6 +20340,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -18510,6 +20354,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18527,7 +20372,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18541,7 +20390,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -18555,8 +20404,7 @@ async def get_instance_process_slot( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -18581,6 +20429,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -18589,12 +20439,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18609,11 +20464,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18625,8 +20480,8 @@ async def delete_instance_process_slot( """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. + 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 @@ -18651,6 +20506,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -18659,12 +20516,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18675,7 +20537,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -18690,8 +20552,7 @@ async def get_instance_process_dump_slot( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -18716,6 +20577,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -18724,12 +20587,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18744,7 +20612,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -18760,8 +20628,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -18782,6 +20650,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18797,6 +20667,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -18811,6 +20682,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18828,7 +20700,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18842,7 +20718,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -18857,8 +20733,7 @@ async def get_instance_process_module_slot( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -18885,6 +20760,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -18894,12 +20771,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18914,7 +20796,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -18929,8 +20811,7 @@ def list_instance_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -18951,6 +20832,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18966,6 +20849,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -18980,6 +20864,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18997,7 +20882,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19011,7 +20900,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable_slot( @@ -19023,7 +20912,7 @@ async def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -19043,18 +20932,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19069,7 +20965,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -19082,7 +20978,7 @@ def list_site_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -19098,6 +20994,8 @@ def list_site_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19111,6 +21009,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -19123,6 +21022,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19140,7 +21040,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19154,7 +21058,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers_slot( @@ -19166,7 +21070,7 @@ async def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -19185,18 +21089,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19211,7 +21122,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace_async @@ -19225,8 +21136,8 @@ async def get_migrate_my_sql_status_slot( """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. + 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 @@ -19245,18 +21156,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19271,7 +21189,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -19284,7 +21202,7 @@ async def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -19304,18 +21222,25 @@ async def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19330,7 +21255,7 @@ async def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -19347,9 +21272,9 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( 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 + 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. @@ -19372,6 +21297,7 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -19381,6 +21307,7 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check_slot.metadata['url'], @@ -19388,7 +21315,11 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19403,11 +21334,11 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( return deserialized - create_or_update_swift_virtual_network_connection_with_check_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network_slot( + async def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19416,7 +21347,7 @@ async def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -19436,18 +21367,25 @@ async def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19458,7 +21396,7 @@ async def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -19475,9 +21413,9 @@ async def update_swift_virtual_network_connection_with_check_slot( 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 + 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. @@ -19500,6 +21438,7 @@ async def update_swift_virtual_network_connection_with_check_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -19509,6 +21448,7 @@ async def update_swift_virtual_network_connection_with_check_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_with_check_slot.metadata['url'], @@ -19516,7 +21456,11 @@ async def update_swift_virtual_network_connection_with_check_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19531,7 +21475,7 @@ async def update_swift_virtual_network_connection_with_check_slot( return deserialized - update_swift_virtual_network_connection_with_check_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_with_check_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -19545,7 +21489,7 @@ async def list_network_features_slot( ) -> "_models.NetworkFeatures": """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -19567,6 +21511,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -19574,12 +21520,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19594,7 +21545,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -19608,8 +21559,7 @@ async def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19631,6 +21581,8 @@ async def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -19638,12 +21590,17 @@ async def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19662,7 +21619,7 @@ async def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -19678,7 +21635,7 @@ async def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -19686,11 +21643,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -19703,12 +21660,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -19717,7 +21677,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19732,7 +21696,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_slot_initial( @@ -19751,12 +21715,15 @@ async def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -19765,7 +21732,11 @@ async def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19783,7 +21754,7 @@ async def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -19799,7 +21770,7 @@ async def begin_start_web_site_network_trace_operation_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -19807,11 +21778,11 @@ async def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -19827,7 +21798,8 @@ async def begin_start_web_site_network_trace_operation_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_01_15.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -19842,6 +21814,7 @@ async def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -19865,13 +21838,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace_slot( + async def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19880,7 +21852,7 @@ async def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -19899,18 +21871,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19921,7 +21900,7 @@ async def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -19935,8 +21914,7 @@ async def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19958,6 +21936,8 @@ async def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -19965,12 +21945,17 @@ async def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19985,7 +21970,7 @@ async def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -19999,8 +21984,7 @@ async def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -20022,6 +22006,8 @@ async def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -20029,12 +22015,17 @@ async def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20053,7 +22044,7 @@ async def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -20067,8 +22058,7 @@ async def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -20090,6 +22080,8 @@ async def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -20097,12 +22089,17 @@ async def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20117,11 +22114,11 @@ async def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20130,8 +22127,7 @@ async def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -20151,18 +22147,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20173,7 +22176,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -20187,7 +22190,7 @@ def list_perf_mon_counters_slot( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -20197,7 +22200,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -20206,6 +22209,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20219,6 +22224,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -20232,6 +22238,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -20250,7 +22257,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20264,7 +22275,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -20276,7 +22287,7 @@ async def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -20295,18 +22306,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20321,7 +22339,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -20334,7 +22352,7 @@ async def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -20354,18 +22372,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20380,7 +22405,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -20394,7 +22419,7 @@ async def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -20416,6 +22441,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -20423,12 +22450,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20443,7 +22475,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20458,7 +22490,7 @@ async def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -20482,6 +22514,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -20492,6 +22525,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -20499,7 +22533,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20514,11 +22552,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20528,7 +22566,7 @@ async def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -20550,6 +22588,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -20557,12 +22597,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20573,7 +22618,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20588,7 +22633,7 @@ async def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -20612,6 +22657,7 @@ async def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -20622,6 +22668,7 @@ async def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -20629,7 +22676,11 @@ async def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20644,7 +22695,7 @@ async def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20658,8 +22709,8 @@ async def get_private_access_slot( """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. + 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 @@ -20678,18 +22729,25 @@ async def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20704,7 +22762,7 @@ async def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -20719,8 +22777,8 @@ async def put_private_access_vnet_slot( """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. + 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 @@ -20741,6 +22799,7 @@ async def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -20750,6 +22809,7 @@ async def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -20757,7 +22817,11 @@ async def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20772,7 +22836,7 @@ async def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -20785,7 +22849,7 @@ def get_private_endpoint_connection_list_slot( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -20800,6 +22864,8 @@ def get_private_endpoint_connection_list_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20813,6 +22879,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list_slot.metadata['url'], ) request = _convert_request(request) @@ -20825,6 +22892,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20842,7 +22910,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20856,7 +22928,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection_slot( @@ -20869,7 +22941,7 @@ async def get_private_endpoint_connection_slot( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20890,6 +22962,8 @@ async def get_private_endpoint_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_endpoint_connection_slot_request( resource_group_name=resource_group_name, @@ -20897,12 +22971,17 @@ async def get_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20917,7 +22996,7 @@ async def get_private_endpoint_connection_slot( return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_slot_initial( @@ -20935,6 +23014,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -20945,6 +23025,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'], @@ -20952,7 +23033,11 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20970,7 +23055,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( return deserialized - _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -20985,7 +23070,7 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -21012,8 +23097,9 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -21027,6 +23113,7 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21051,10 +23138,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_slot_initial( self, @@ -21070,6 +23156,8 @@ async def _delete_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_private_endpoint_connection_slot_request_initial( resource_group_name=resource_group_name, @@ -21077,12 +23165,17 @@ async def _delete_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -21103,7 +23196,7 @@ async def _delete_private_endpoint_connection_slot_initial( return deserialized - _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -21117,7 +23210,7 @@ async def begin_delete_private_endpoint_connection_slot( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -21139,7 +23232,8 @@ async def begin_delete_private_endpoint_connection_slot( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -21152,6 +23246,7 @@ async def begin_delete_private_endpoint_connection_slot( name=name, private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -21175,10 +23270,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources_slot( @@ -21190,7 +23284,7 @@ async def get_private_link_resources_slot( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -21209,18 +23303,25 @@ async def get_private_link_resources_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_link_resources_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21235,7 +23336,7 @@ async def get_private_link_resources_slot( return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + get_private_link_resources_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources"} # type: ignore @distributed_trace @@ -21249,8 +23350,8 @@ def list_processes_slot( """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. + 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 @@ -21266,6 +23367,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21279,6 +23382,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -21291,6 +23395,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21308,7 +23413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21322,7 +23431,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -21335,8 +23444,7 @@ async def get_process_slot( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21358,6 +23466,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -21365,12 +23475,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21385,11 +23500,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21400,8 +23515,8 @@ async def delete_process_slot( """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. + 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 @@ -21423,6 +23538,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -21430,12 +23547,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21446,7 +23568,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -21460,8 +23582,7 @@ async def get_process_dump_slot( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -21483,6 +23604,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -21490,12 +23613,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21510,7 +23638,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -21525,8 +23653,8 @@ def list_process_modules_slot( """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. + 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 @@ -21544,6 +23672,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21558,6 +23688,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -21571,6 +23702,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21588,7 +23720,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21602,7 +23738,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -21616,8 +23752,7 @@ async def get_process_module_slot( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21641,6 +23776,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -21649,12 +23786,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21669,7 +23811,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -21683,8 +23825,7 @@ def list_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -21702,6 +23843,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21716,6 +23859,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -21729,6 +23873,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21746,7 +23891,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21760,7 +23909,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -21772,7 +23921,7 @@ def list_public_certificates_slot( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -21788,6 +23937,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21801,6 +23952,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -21813,6 +23965,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21830,7 +23983,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21844,7 +24001,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -21857,7 +24014,7 @@ async def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -21879,6 +24036,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -21886,12 +24045,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21906,7 +24070,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -21921,7 +24085,7 @@ async def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -21946,6 +24110,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -21956,6 +24121,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -21963,7 +24129,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21978,11 +24148,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21992,7 +24162,7 @@ async def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -22014,6 +24184,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -22021,12 +24193,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22037,7 +24214,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -22051,7 +24228,7 @@ async def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -22075,6 +24252,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -22084,6 +24262,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -22091,7 +24270,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22106,11 +24289,11 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22120,8 +24303,8 @@ async def reset_slot_configuration_slot( """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. + 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 @@ -22141,18 +24324,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22163,11 +24353,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22178,7 +24368,7 @@ async def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -22188,10 +24378,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -22204,12 +24395,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -22217,7 +24411,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22228,10 +24426,10 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - async def _restore_from_backup_blob_slot_initial( + async def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22245,6 +24443,7 @@ async def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -22254,6 +24453,7 @@ async def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -22261,7 +24461,11 @@ async def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22271,11 +24475,11 @@ async def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob_slot( + async def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22285,7 +24489,7 @@ async def begin_restore_from_backup_blob_slot( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -22308,8 +24512,9 @@ async def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22322,6 +24527,7 @@ async def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22343,12 +24549,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_slot_initial( + async def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22362,6 +24567,7 @@ async def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -22371,6 +24577,7 @@ async def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -22378,7 +24585,11 @@ async def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22388,11 +24599,11 @@ async def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app_slot( + async def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22402,7 +24613,7 @@ async def begin_restore_from_deleted_app_slot( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -22424,8 +24635,9 @@ async def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22438,6 +24650,7 @@ async def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22459,12 +24672,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_slot_initial( + async def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22478,6 +24690,7 @@ async def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -22487,6 +24700,7 @@ async def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -22494,7 +24708,11 @@ async def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22504,11 +24722,11 @@ async def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot_slot( + async def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22518,7 +24736,7 @@ async def begin_restore_snapshot_slot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -22541,8 +24759,9 @@ async def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22555,6 +24774,7 @@ async def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22576,10 +24796,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -22591,7 +24810,7 @@ def list_site_extensions_slot( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -22607,6 +24826,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22620,6 +24841,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -22632,6 +24854,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22649,7 +24872,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22663,7 +24890,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -22676,7 +24903,7 @@ async def get_site_extension_slot( ) -> "_models.SiteExtensionInfo": """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -22698,6 +24925,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -22705,12 +24934,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22725,7 +24959,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -22742,6 +24976,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -22749,12 +24985,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -22772,7 +25013,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -22786,7 +25027,7 @@ async def begin_install_site_extension_slot( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -22811,7 +25052,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -22824,6 +25066,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -22847,13 +25090,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22863,7 +25105,7 @@ async def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -22885,6 +25127,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -22892,12 +25136,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -22908,7 +25157,7 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -22922,7 +25171,7 @@ def list_slot_differences_slot( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -22940,6 +25189,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -22956,6 +25206,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -22971,6 +25222,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -22990,7 +25242,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23004,9 +25260,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23020,6 +25276,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -23029,6 +25286,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -23036,7 +25294,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23046,11 +25308,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23060,7 +25322,7 @@ async def begin_swap_slot( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -23083,8 +25345,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -23097,6 +25360,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23118,10 +25382,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -23133,7 +25396,7 @@ def list_snapshots_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -23147,6 +25410,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23160,6 +25425,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -23172,6 +25438,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23189,7 +25456,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23203,7 +25474,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -23215,7 +25486,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -23229,6 +25500,8 @@ def list_snapshots_from_dr_secondary_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23242,6 +25515,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -23254,6 +25528,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23271,7 +25546,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23285,7 +25564,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -23297,7 +25576,7 @@ async def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -23317,18 +25596,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23350,7 +25636,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -23367,6 +25653,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23376,6 +25663,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -23383,7 +25671,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23404,7 +25696,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23418,7 +25710,7 @@ async def begin_create_or_update_source_control_slot( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -23443,8 +25735,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -23457,6 +25750,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23481,13 +25775,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23497,7 +25790,7 @@ async def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -23506,7 +25799,7 @@ async def delete_source_control_slot( :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: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -23519,19 +25812,26 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23542,7 +25842,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23556,7 +25856,7 @@ async def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -23578,6 +25878,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23587,6 +25888,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -23594,7 +25896,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23616,11 +25922,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23629,7 +25935,7 @@ async def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -23649,18 +25955,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23671,7 +25984,7 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore async def _start_network_trace_slot_initial( @@ -23690,12 +26003,15 @@ async def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23704,7 +26020,11 @@ async def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23722,7 +26042,7 @@ async def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -23738,7 +26058,7 @@ async def begin_start_network_trace_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -23746,11 +26066,11 @@ async def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23766,7 +26086,8 @@ async def begin_start_network_trace_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_01_15.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -23781,6 +26102,7 @@ async def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23804,13 +26126,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23819,7 +26140,7 @@ async def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -23839,18 +26160,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23861,11 +26189,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace_slot( + async def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23874,7 +26202,7 @@ async def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -23893,18 +26221,25 @@ async def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -23915,11 +26250,11 @@ async def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23928,7 +26263,7 @@ async def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -23947,18 +26282,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23969,11 +26311,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23982,7 +26324,7 @@ async def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -24001,18 +26343,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -24023,7 +26372,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -24036,7 +26385,7 @@ def list_triggered_web_jobs_slot( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -24052,6 +26401,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24065,6 +26416,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -24077,6 +26429,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24094,7 +26447,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24108,7 +26465,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -24121,7 +26478,7 @@ async def get_triggered_web_job_slot( ) -> "_models.TriggeredWebJob": """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -24143,6 +26500,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24150,12 +26509,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24170,11 +26534,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24184,7 +26548,7 @@ async def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -24206,6 +26570,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24213,12 +26579,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24229,7 +26600,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -24243,7 +26614,7 @@ def list_triggered_web_job_history_slot( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -24261,6 +26632,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24275,6 +26648,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -24288,6 +26662,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24305,7 +26680,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24319,7 +26698,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -24333,8 +26712,7 @@ async def get_triggered_web_job_history_slot( ) -> "_models.TriggeredJobHistory": """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -24358,6 +26736,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -24366,12 +26746,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24386,11 +26771,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24400,7 +26785,7 @@ async def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -24422,6 +26807,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24429,12 +26816,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24445,7 +26837,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -24459,7 +26851,7 @@ def list_usages_slot( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -24471,7 +26863,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -24480,6 +26872,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24493,6 +26887,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -24506,6 +26901,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24524,7 +26920,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24538,7 +26938,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -24550,7 +26950,7 @@ async def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -24570,18 +26970,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24596,7 +27003,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -24610,7 +27017,7 @@ async def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -24632,6 +27039,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -24639,12 +27048,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24659,7 +27073,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24675,8 +27089,8 @@ async def create_or_update_vnet_connection_slot( """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). + 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 @@ -24700,6 +27114,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -24710,6 +27125,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -24717,7 +27133,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24732,11 +27152,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24746,8 +27166,7 @@ async def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -24769,6 +27188,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -24776,12 +27197,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24792,7 +27218,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24808,8 +27234,8 @@ async def update_vnet_connection_slot( """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). + 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 @@ -24833,6 +27259,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -24843,6 +27270,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -24850,7 +27278,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24865,7 +27297,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24880,7 +27312,7 @@ async def get_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Gets an app's Virtual Network gateway. - Description for 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 @@ -24904,6 +27336,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -24912,12 +27346,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24932,7 +27371,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -24948,7 +27387,7 @@ async def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -24974,6 +27413,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -24985,6 +27425,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -24992,7 +27433,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25007,7 +27452,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25023,7 +27468,7 @@ async def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -25049,6 +27494,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25060,6 +27506,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -25067,7 +27514,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25082,7 +27533,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -25095,7 +27546,7 @@ def list_web_jobs_slot( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -25110,6 +27561,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25123,6 +27576,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -25135,6 +27589,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25152,7 +27607,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25166,7 +27625,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -25179,7 +27638,7 @@ async def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -25201,6 +27660,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -25208,12 +27669,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25228,7 +27694,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -25241,7 +27707,7 @@ def list_slot_differences_from_production( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -25256,6 +27722,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -25271,6 +27738,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -25285,6 +27753,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -25304,7 +27773,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25318,9 +27791,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25333,6 +27806,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -25341,6 +27815,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -25348,7 +27823,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25358,11 +27837,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25371,7 +27850,7 @@ async def begin_swap_slot_with_production( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -25391,8 +27870,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25404,6 +27884,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25425,10 +27906,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -25439,7 +27919,7 @@ def list_snapshots( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -25451,6 +27931,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25463,6 +27945,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -25474,6 +27957,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25491,7 +27975,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25505,7 +27993,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -25516,7 +28004,7 @@ def list_snapshots_from_dr_secondary( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -25528,6 +28016,8 @@ def list_snapshots_from_dr_secondary( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25540,6 +28030,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -25551,6 +28042,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25568,7 +28060,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25582,7 +28078,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control( @@ -25593,7 +28089,7 @@ async def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -25610,17 +28106,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25642,7 +28145,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -25658,6 +28161,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -25666,6 +28170,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -25673,7 +28178,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25694,7 +28203,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -25707,7 +28216,7 @@ async def begin_create_or_update_source_control( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -25729,8 +28238,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_01_15.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -25742,6 +28252,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25766,13 +28277,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25781,13 +28291,13 @@ async def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 additional_flags: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -25800,18 +28310,25 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25822,7 +28339,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -25835,7 +28352,7 @@ async def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -25854,6 +28371,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -25862,6 +28380,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -25869,7 +28388,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25891,11 +28414,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25903,7 +28426,7 @@ async def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -25920,17 +28443,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25941,7 +28471,7 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore async def _start_network_trace_initial( @@ -25959,11 +28489,14 @@ async def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -25972,7 +28505,11 @@ async def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25990,7 +28527,7 @@ async def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -26005,17 +28542,17 @@ async def begin_start_network_trace( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -26031,7 +28568,8 @@ async def begin_start_network_trace( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_01_15.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -26045,6 +28583,7 @@ async def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -26068,13 +28607,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26082,7 +28620,7 @@ async def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -26099,17 +28637,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26120,11 +28665,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace( + async def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26132,7 +28677,7 @@ async def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -26149,17 +28694,24 @@ async def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -26170,11 +28722,11 @@ async def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26182,7 +28734,7 @@ async def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -26199,17 +28751,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26220,11 +28779,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26232,7 +28791,7 @@ async def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -26249,17 +28808,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -26270,7 +28836,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -26282,7 +28848,7 @@ def list_triggered_web_jobs( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -26295,6 +28861,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26307,6 +28875,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -26318,6 +28887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26335,7 +28905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26349,7 +28923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -26361,7 +28935,7 @@ async def get_triggered_web_job( ) -> "_models.TriggeredWebJob": """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -26380,18 +28954,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26406,11 +28987,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26419,7 +29000,7 @@ async def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -26438,18 +29019,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -26460,7 +29048,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -26473,7 +29061,7 @@ def list_triggered_web_job_history( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -26488,6 +29076,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26501,6 +29091,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -26513,6 +29104,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26530,7 +29122,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26544,7 +29140,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -26557,8 +29153,7 @@ async def get_triggered_web_job_history( ) -> "_models.TriggeredJobHistory": """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -26579,6 +29174,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -26586,12 +29183,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26606,11 +29208,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26619,7 +29221,7 @@ async def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -26638,18 +29240,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26660,7 +29269,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -26673,7 +29282,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -26682,7 +29291,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -26691,6 +29300,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26703,6 +29314,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -26715,6 +29327,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -26733,7 +29346,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26747,7 +29364,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -26758,7 +29375,7 @@ async def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -26775,17 +29392,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26800,7 +29424,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -26813,7 +29437,7 @@ async def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -26832,18 +29456,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26858,7 +29489,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -26873,8 +29504,8 @@ async def create_or_update_vnet_connection( """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). + 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 @@ -26895,6 +29526,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -26904,6 +29536,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -26911,7 +29544,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26926,11 +29563,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26939,8 +29576,7 @@ async def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -26959,18 +29595,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26981,7 +29624,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -26996,8 +29639,8 @@ async def update_vnet_connection( """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). + 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 @@ -27018,6 +29661,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -27027,6 +29671,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -27034,7 +29679,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27049,7 +29698,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -27063,7 +29712,7 @@ async def get_vnet_connection_gateway( ) -> "_models.VnetGateway": """Gets an app's Virtual Network gateway. - Description for 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 @@ -27084,6 +29733,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -27091,12 +29742,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27111,7 +29767,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -27126,7 +29782,7 @@ async def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -27149,6 +29805,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -27159,6 +29816,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -27166,7 +29824,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27181,7 +29843,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -27196,7 +29858,7 @@ async def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -27219,6 +29881,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -27229,6 +29892,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -27236,7 +29900,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27251,7 +29919,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -27263,7 +29931,7 @@ def list_web_jobs( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -27275,6 +29943,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27287,6 +29957,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -27298,6 +29969,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27315,7 +29987,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27329,7 +30005,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -27341,7 +30017,7 @@ async def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -27360,18 +30036,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27386,5 +30069,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_web_site_management_client_operations.py index ad2ee18fc98e..b950f7865d35 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -33,7 +32,7 @@ async def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -68,7 +74,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -79,7 +85,7 @@ async def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2021_01_15.models.User @@ -94,11 +100,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -106,7 +114,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +133,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -131,7 +143,7 @@ def list_source_controls( ) -> AsyncIterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -140,6 +152,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -149,6 +163,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -157,6 +172,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -174,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -188,7 +208,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -198,7 +218,7 @@ async def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -213,15 +233,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -236,7 +263,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -248,7 +275,7 @@ async def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -265,12 +292,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -278,7 +307,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -293,7 +326,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -305,11 +338,11 @@ def list_billing_meters( ) -> AsyncIterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -318,6 +351,8 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -328,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -339,6 +375,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -358,7 +395,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -372,7 +413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace_async async def check_name_availability( @@ -384,13 +425,13 @@ async def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2021_01_15.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -403,6 +444,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -410,6 +452,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -417,7 +460,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -432,7 +479,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace_async @@ -442,7 +489,7 @@ async def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -455,15 +502,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -478,7 +532,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -492,18 +546,18 @@ def list_geo_regions( ) -> AsyncIterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2021_01_15.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -511,6 +565,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -521,6 +577,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -534,6 +591,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -555,7 +613,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -569,7 +631,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -579,7 +641,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> AsyncIterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2021_01_15.models.NameIdentifier @@ -590,6 +652,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -603,6 +666,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -615,6 +679,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -634,7 +699,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -648,7 +717,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -657,7 +726,7 @@ def list_premier_add_on_offers( ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -666,6 +735,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_01_15.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -676,6 +747,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -685,6 +757,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -702,7 +775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -716,7 +793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -725,7 +802,7 @@ async def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -738,15 +815,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -761,7 +845,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -773,8 +857,8 @@ async def verify_hosting_environment_vnet( """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. + 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.v2021_01_15.models.VnetParameters @@ -789,12 +873,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -802,7 +888,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -817,11 +907,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -829,7 +919,7 @@ async def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -846,6 +936,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -853,6 +944,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -860,7 +952,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -871,7 +967,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -883,7 +979,7 @@ async def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -900,6 +996,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -907,6 +1004,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -914,7 +1012,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -929,11 +1031,11 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -941,7 +1043,7 @@ async def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -958,6 +1060,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -965,6 +1068,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -972,7 +1076,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -983,5 +1091,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/models/_models_py3.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/models/_models_py3.py index 679b8415ad61..7f280f1e90ff 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/models/_models_py3.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/models/_models_py3.py @@ -4217,7 +4217,8 @@ class Certificate(Resource): :vartype server_farm_id: str :ivar canonical_name: CNAME of the certificate to be issued via free certificate. :vartype canonical_name: str - :ivar domain_validation_method: Method of domain validation for free cert. + :ivar domain_validation_method: Method of domain validation for free cert. Possible values + include: 'CNameValidationValue', 'HttpTokenValidationValue'. :vartype domain_validation_method: str """ @@ -4309,7 +4310,8 @@ def __init__( :paramtype server_farm_id: str :keyword canonical_name: CNAME of the certificate to be issued via free certificate. :paramtype canonical_name: str - :keyword domain_validation_method: Method of domain validation for free cert. + :keyword domain_validation_method: Method of domain validation for free cert. Possible values + include: 'CNameValidationValue', 'HttpTokenValidationValue'. :paramtype domain_validation_method: str """ super(Certificate, self).__init__(kind=kind, location=location, tags=tags, **kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_certificate_orders_operations.py index 56bbd1ac5e6a..d7683b2bbce0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,33 +68,33 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -105,30 +106,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -297,31 +301,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -333,10 +338,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -344,21 +350,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -373,12 +379,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -386,23 +392,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -416,10 +422,11 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -427,21 +434,21 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -456,12 +463,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -469,23 +476,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -501,35 +508,35 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -545,35 +552,35 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -586,31 +593,32 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -624,35 +632,35 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -668,35 +676,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -709,31 +717,32 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -744,31 +753,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -779,35 +789,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -836,7 +847,7 @@ def list( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -845,6 +856,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -855,6 +868,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -864,6 +878,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -881,7 +896,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -895,17 +914,17 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -921,12 +940,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -934,7 +955,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -945,7 +970,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -956,7 +981,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -967,6 +992,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -978,6 +1005,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -988,6 +1016,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1005,7 +1034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1019,7 +1052,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1030,7 +1063,7 @@ def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -1047,17 +1080,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1072,7 +1112,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1088,6 +1128,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1096,6 +1137,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1103,7 +1145,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1121,7 +1167,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1134,7 +1180,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -1157,8 +1203,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1170,6 +1217,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1194,13 +1242,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1208,7 +1255,7 @@ def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -1225,17 +1272,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1246,7 +1300,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1259,7 +1313,7 @@ def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -1279,6 +1333,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1287,6 +1342,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1294,7 +1350,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1313,7 +1373,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1325,7 +1385,7 @@ def list_certificates( ) -> Iterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -1338,6 +1398,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1350,6 +1412,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1361,6 +1424,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1378,7 +1442,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,7 +1460,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1404,7 +1472,7 @@ def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -1423,18 +1491,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1449,7 +1524,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1466,6 +1541,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1475,6 +1551,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1482,7 +1559,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1500,7 +1581,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1514,7 +1595,7 @@ def begin_create_or_update_certificate( ) -> LROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1538,8 +1619,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1552,6 +1634,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1576,13 +1659,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1591,7 +1673,7 @@ def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -1610,18 +1692,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1632,7 +1721,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1646,7 +1735,7 @@ def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1668,6 +1757,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1677,6 +1767,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1684,7 +1775,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1703,11 +1798,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1716,7 +1811,7 @@ def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -1736,6 +1831,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1744,6 +1840,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1751,7 +1848,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1762,11 +1863,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1775,7 +1876,7 @@ def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1795,6 +1896,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1803,6 +1905,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1810,7 +1913,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1821,11 +1928,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1833,7 +1940,7 @@ def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1850,17 +1957,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1871,11 +1985,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1884,7 +1998,7 @@ def resend_request_emails( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1903,6 +2017,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1911,6 +2026,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1918,7 +2034,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1929,7 +2049,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1942,7 +2062,7 @@ def retrieve_site_seal( ) -> "_models.SiteSeal": """Verify domain ownership for this certificate order. - Description for 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 @@ -1961,6 +2081,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1969,6 +2090,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1976,7 +2098,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1991,11 +2117,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -2003,7 +2129,7 @@ def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -2020,17 +2146,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2041,7 +2174,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2053,7 +2186,7 @@ def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -2070,17 +2203,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2095,7 +2235,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2107,7 +2247,7 @@ def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -2124,17 +2264,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2149,5 +2296,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_environments_operations.py index 0c1526a38616..0236c04bd3c9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,33 +183,34 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -296,31 +301,32 @@ def build_get_vip_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -334,35 +340,35 @@ def build_change_vnet_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -375,31 +381,32 @@ def build_get_ase_v3_networking_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -413,35 +420,35 @@ def build_update_ase_networking_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -454,31 +461,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -490,10 +498,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -501,21 +510,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -526,31 +535,32 @@ def build_get_inbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -561,31 +571,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -596,31 +607,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -634,35 +646,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -678,35 +690,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -720,10 +732,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -731,21 +744,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -756,31 +769,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -791,31 +805,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -826,31 +841,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -861,31 +877,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -896,31 +913,32 @@ def build_get_outbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -931,31 +949,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -967,10 +986,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -978,21 +998,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1027,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1020,23 +1040,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1050,10 +1070,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1061,21 +1082,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1086,31 +1107,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1121,31 +1143,32 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1156,31 +1179,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1191,31 +1215,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1228,33 +1253,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1265,31 +1291,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1302,33 +1329,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1339,31 +1367,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1375,10 +1404,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1386,21 +1416,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1415,12 +1445,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1428,23 +1458,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1461,12 +1491,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1474,23 +1504,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1505,10 +1535,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1517,21 +1548,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1543,10 +1574,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1554,21 +1586,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1580,10 +1612,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1591,21 +1624,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1617,10 +1650,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1628,25 +1662,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1675,7 +1709,7 @@ def list( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -1684,6 +1718,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1694,6 +1730,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1703,6 +1740,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1720,7 +1758,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1734,7 +1776,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1744,7 +1786,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -1755,6 +1797,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1766,6 +1810,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1776,6 +1821,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1793,7 +1839,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1807,7 +1857,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1818,7 +1868,7 @@ def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -1835,17 +1885,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1860,7 +1917,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1876,6 +1933,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1884,6 +1942,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1891,7 +1950,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1912,7 +1975,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1925,7 +1988,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -1948,8 +2011,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1961,6 +2025,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1985,12 +2050,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2003,18 +2067,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -2024,11 +2095,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2037,7 +2108,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -2058,7 +2129,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2070,6 +2142,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2090,10 +2163,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -2105,7 +2177,7 @@ def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -2125,6 +2197,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -2133,6 +2206,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -2140,7 +2214,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -2162,7 +2240,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -2174,7 +2252,7 @@ def list_capacities( ) -> Iterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -2187,6 +2265,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2199,6 +2279,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -2210,6 +2291,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2227,7 +2309,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2241,7 +2327,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def get_vip_info( @@ -2252,7 +2338,7 @@ def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -2269,17 +2355,24 @@ def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2294,7 +2387,7 @@ def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore def _change_vnet_initial( @@ -2310,6 +2403,7 @@ def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -2318,6 +2412,7 @@ def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -2325,7 +2420,11 @@ def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2343,7 +2442,7 @@ def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2356,7 +2455,7 @@ def begin_change_vnet( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -2379,6 +2478,7 @@ def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -2394,6 +2494,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -2408,6 +2509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -2427,7 +2529,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2438,7 +2544,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2450,6 +2556,7 @@ def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2460,8 +2567,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -2477,10 +2583,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2492,7 +2597,7 @@ def get_ase_v3_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Get networking configuration of an App Service Environment. - Description for Get networking configuration of an App Service Environment. + 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 @@ -2509,17 +2614,24 @@ def get_ase_v3_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ase_v3_networking_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ase_v3_networking_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2534,7 +2646,7 @@ def get_ase_v3_networking_configuration( return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + get_ase_v3_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace @@ -2547,7 +2659,7 @@ def update_ase_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Update networking configuration of an App Service Environment. - Description for Update networking configuration of an App Service Environment. + 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 @@ -2567,6 +2679,7 @@ def update_ase_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') @@ -2575,6 +2688,7 @@ def update_ase_networking_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ase_networking_configuration.metadata['url'], @@ -2582,7 +2696,11 @@ def update_ase_networking_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2597,7 +2715,7 @@ def update_ase_networking_configuration( return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + update_ase_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace @@ -2609,7 +2727,7 @@ def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -2626,17 +2744,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2651,7 +2776,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2664,7 +2789,7 @@ def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -2683,18 +2808,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2709,7 +2841,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2721,8 +2853,7 @@ def get_inbound_network_dependencies_endpoints( ) -> Iterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -2735,6 +2866,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2747,6 +2880,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2758,6 +2892,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2775,7 +2910,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2789,7 +2928,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2800,7 +2939,7 @@ def list_multi_role_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -2812,6 +2951,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2824,6 +2965,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2835,6 +2977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2852,7 +2995,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2866,7 +3013,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2877,7 +3024,7 @@ def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -2894,17 +3041,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2919,7 +3073,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2935,6 +3089,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2943,6 +3098,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2950,7 +3106,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2968,7 +3128,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2981,7 +3141,7 @@ def begin_create_or_update_multi_role_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -3002,8 +3162,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3015,6 +3176,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3039,10 +3201,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -3054,7 +3215,7 @@ def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -3073,6 +3234,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -3081,6 +3243,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -3088,7 +3251,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3107,7 +3274,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -3121,8 +3288,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -3137,6 +3304,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3150,6 +3319,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3162,6 +3332,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3179,7 +3350,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3193,7 +3368,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -3204,7 +3379,7 @@ def list_multi_role_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -3217,6 +3392,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3229,6 +3406,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3240,6 +3418,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3257,7 +3436,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3271,7 +3454,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -3282,7 +3465,7 @@ def list_multi_role_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -3293,6 +3476,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3305,6 +3490,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3316,6 +3502,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3333,7 +3520,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,7 +3538,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -3358,7 +3549,7 @@ def list_multi_role_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -3369,6 +3560,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3381,6 +3574,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3392,6 +3586,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3409,7 +3604,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3423,7 +3622,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3434,7 +3633,7 @@ def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -3451,17 +3650,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3476,7 +3682,7 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -3488,8 +3694,7 @@ def get_outbound_network_dependencies_endpoints( ) -> Iterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -3502,6 +3707,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3514,6 +3721,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -3525,6 +3733,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3542,7 +3751,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3556,7 +3769,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def get_private_endpoint_connection_list( @@ -3567,7 +3780,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoints associated with a hosting environment. - Description for Gets the list of private endpoints associated with a hosting environment. + 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 @@ -3580,6 +3793,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3592,6 +3807,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -3603,6 +3819,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3620,7 +3837,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3634,7 +3855,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -3646,7 +3867,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3665,18 +3886,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3691,7 +3919,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -3708,6 +3936,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -3717,6 +3946,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -3724,7 +3954,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3742,7 +3976,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -3756,7 +3990,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -3781,8 +4015,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3795,6 +4030,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3819,10 +4055,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -3837,18 +4072,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3869,7 +4111,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -3882,7 +4124,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3902,7 +4144,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -3914,6 +4157,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3937,10 +4181,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -3951,7 +4194,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3968,17 +4211,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3993,11 +4243,11 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4005,7 +4255,7 @@ def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -4022,17 +4272,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -4043,7 +4300,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -4058,17 +4315,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4086,7 +4350,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -4098,7 +4362,7 @@ def begin_resume( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -4119,6 +4383,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4131,6 +4397,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -4142,6 +4409,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4159,7 +4427,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4170,7 +4442,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4181,6 +4453,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4190,8 +4463,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4207,10 +4479,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -4222,7 +4493,7 @@ def list_app_service_plans( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -4235,6 +4506,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4247,6 +4520,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -4258,6 +4532,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4275,7 +4550,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4289,7 +4568,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -4301,19 +4580,22 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4326,6 +4608,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -4338,6 +4621,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -4356,7 +4640,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4370,7 +4658,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -4384,17 +4672,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4412,7 +4707,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4424,7 +4719,7 @@ def begin_suspend( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -4445,6 +4740,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4457,6 +4754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -4468,6 +4766,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4485,7 +4784,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4496,7 +4799,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4507,6 +4810,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4516,8 +4820,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4533,10 +4836,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4549,7 +4851,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -4558,7 +4860,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -4567,6 +4869,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4579,6 +4883,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -4591,6 +4896,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -4609,7 +4915,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4623,7 +4933,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -4634,7 +4944,7 @@ def list_worker_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -4646,6 +4956,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4658,6 +4970,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -4669,6 +4982,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4686,7 +5000,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4700,7 +5018,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -4712,7 +5030,7 @@ def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -4731,18 +5049,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4757,7 +5082,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -4774,6 +5099,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4783,6 +5109,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -4790,7 +5117,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4808,7 +5139,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4822,7 +5153,7 @@ def begin_create_or_update_worker_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -4845,8 +5176,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4859,6 +5191,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4883,10 +5216,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4899,7 +5231,7 @@ def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -4920,6 +5252,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4929,6 +5262,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4936,7 +5270,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4955,7 +5293,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4969,8 +5307,7 @@ def list_worker_pool_instance_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -4987,6 +5324,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5001,6 +5340,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -5014,6 +5354,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5031,7 +5372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5045,7 +5390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -5057,7 +5402,7 @@ def list_web_worker_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -5072,6 +5417,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5085,6 +5432,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -5097,6 +5445,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5114,7 +5463,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5128,7 +5481,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -5140,7 +5493,7 @@ def list_worker_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -5153,6 +5506,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5166,6 +5521,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -5178,6 +5534,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5195,7 +5552,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5209,7 +5570,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -5221,7 +5582,7 @@ def list_web_worker_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -5234,6 +5595,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5247,6 +5610,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -5259,6 +5623,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5276,7 +5641,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5290,4 +5659,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_plans_operations.py index 334730074b00..d7c9ab7fd37c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,31 +185,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +303,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -310,21 +316,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -337,10 +343,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -349,21 +356,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -376,10 +383,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -388,21 +396,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -415,10 +423,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -427,21 +436,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -452,31 +461,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -487,31 +497,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -524,33 +535,34 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -565,37 +577,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,31 +619,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -643,33 +657,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -680,31 +695,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -716,10 +732,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -727,21 +744,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -754,10 +771,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -766,21 +784,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -796,12 +814,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -810,23 +828,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -840,10 +858,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -851,21 +870,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -878,10 +897,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -890,21 +910,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -920,12 +940,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -934,23 +954,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -965,10 +985,11 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -977,21 +998,21 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1028,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1021,23 +1042,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1051,10 +1072,11 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1062,25 +1084,25 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1110,7 +1132,7 @@ def list( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -1123,6 +1145,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1133,6 +1157,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1143,6 +1168,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1161,7 +1187,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1175,7 +1205,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1185,7 +1215,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -1196,6 +1226,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1207,6 +1239,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1217,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1234,7 +1268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1248,7 +1286,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1259,7 +1297,7 @@ def get( ) -> "_models.AppServicePlan": """Get an App Service plan. - Description for 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 @@ -1276,17 +1314,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1301,7 +1346,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1317,6 +1362,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1325,6 +1371,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1332,7 +1379,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1350,7 +1401,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1363,7 +1414,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -1384,8 +1435,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1397,6 +1449,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1421,13 +1474,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1435,7 +1487,7 @@ def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -1452,17 +1504,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1473,7 +1532,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1486,7 +1545,7 @@ def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -1505,6 +1564,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1513,6 +1573,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1520,7 +1581,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1539,7 +1604,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1551,7 +1616,7 @@ def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -1568,17 +1633,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1593,7 +1665,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1607,7 +1679,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -1628,6 +1700,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1635,12 +1709,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1655,11 +1734,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1669,7 +1748,7 @@ def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -1690,6 +1769,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1697,12 +1778,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1713,7 +1799,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1727,7 +1813,7 @@ def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -1748,6 +1834,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1755,12 +1843,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1775,7 +1868,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1789,7 +1882,7 @@ def list_web_apps_by_hybrid_connection( ) -> Iterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -1804,6 +1897,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1818,6 +1913,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1831,6 +1927,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1848,7 +1945,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1862,7 +1963,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1873,7 +1974,7 @@ def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -1890,17 +1991,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1915,7 +2023,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1927,7 +2035,7 @@ def list_hybrid_connections( ) -> Iterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -1940,6 +2048,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1952,6 +2062,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -1963,6 +2074,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1980,7 +2092,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1994,10 +2110,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2006,7 +2122,7 @@ def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -2027,18 +2143,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2049,7 +2172,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2064,7 +2187,7 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -2072,18 +2195,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2096,6 +2222,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2110,6 +2237,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2130,7 +2258,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2144,7 +2276,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2155,7 +2287,7 @@ def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -2172,17 +2304,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2197,7 +2336,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2210,14 +2349,15 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2226,6 +2366,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2238,6 +2380,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2250,6 +2393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2268,7 +2412,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2282,7 +2430,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2293,7 +2441,7 @@ def list_vnets( ) -> List["_models.VnetInfo"]: """Get all Virtual Networks associated with an App Service plan. - Description for Get all Virtual Networks associated with an App Service plan. + 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 @@ -2310,17 +2458,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2335,7 +2490,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2348,7 +2503,7 @@ def get_vnet_from_server_farm( ) -> "_models.VnetInfo": """Get a Virtual Network associated with an App Service plan. - Description for 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 @@ -2367,18 +2522,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2393,7 +2555,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2407,7 +2569,7 @@ def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -2428,6 +2590,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2435,12 +2599,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2455,7 +2624,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2470,7 +2639,7 @@ def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -2493,6 +2662,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2503,6 +2673,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2510,7 +2681,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2525,7 +2700,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2538,8 +2713,7 @@ def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -2558,18 +2732,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2584,7 +2765,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2598,7 +2779,7 @@ def get_route_for_vnet( ) -> List["_models.VnetRoute"]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -2619,6 +2800,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2626,12 +2809,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2646,7 +2834,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2661,7 +2849,7 @@ def create_or_update_vnet_route( ) -> "_models.VnetRoute": """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2684,6 +2872,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2694,6 +2883,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2701,7 +2891,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2716,11 +2910,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2730,7 +2924,7 @@ def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -2751,6 +2945,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2758,12 +2954,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2774,7 +2975,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2789,7 +2990,7 @@ def update_vnet_route( ) -> "_models.VnetRoute": """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2812,6 +3013,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2822,6 +3024,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -2829,7 +3032,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2844,11 +3051,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2857,7 +3064,7 @@ def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -2876,18 +3083,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2898,5 +3112,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificate_orders_diagnostics_operations.py index 8d218835536d..eca8ab2c899a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificate_orders_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificate_orders_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_app_service_certificate_order_detector_response_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_app_service_certificate_order_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -84,27 +86,27 @@ def build_get_app_service_certificate_order_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,7 +141,7 @@ def list_app_service_certificate_order_detector_response( ) -> Iterable["_models.DetectorResponseCollection"]: """Microsoft.CertificateRegistration to get the list of detectors for this RP. - Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + 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 @@ -152,6 +154,8 @@ def list_app_service_certificate_order_detector_response( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_certificate_order_detector_response.metadata['url'], ) request = _convert_request(request) @@ -175,6 +180,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -192,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -206,7 +216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + list_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors"} # type: ignore @distributed_trace def get_app_service_certificate_order_detector_response( @@ -221,8 +231,7 @@ def get_app_service_certificate_order_detector_response( ) -> "_models.DetectorResponse": """Microsoft.CertificateRegistration call to get a detector response from App Lens. - Description for Microsoft.CertificateRegistration call to get a detector response from App - Lens. + 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 @@ -230,11 +239,11 @@ def get_app_service_certificate_order_detector_response( :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. + :param start_time: The start time for detector response. Default value is None. :type start_time: ~datetime.datetime - :param end_time: The end time for the detector response. + :param end_time: The end time for the detector response. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: The time grain for the detector response. + :param time_grain: The time grain for the detector response. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -247,12 +256,15 @@ def get_app_service_certificate_order_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_app_service_certificate_order_detector_response_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -261,7 +273,11 @@ def get_app_service_certificate_order_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -276,5 +292,5 @@ def get_app_service_certificate_order_detector_response( return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore + get_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificate_registration_provider_operations.py index 02302cb7fb0b..1b1ee75a3347 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificates_operations.py index 4fd312f83f4f..a5f6f732691b 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,30 +68,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -101,31 +103,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,35 +142,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,31 +183,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -218,35 +222,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -282,10 +286,10 @@ def list( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :param filter: Return only information specified in the filter (using OData syntax). For - example: $filter=KeyVaultId eq 'KeyVaultId'. + example: $filter=KeyVaultId eq 'KeyVaultId'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -293,6 +297,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -303,6 +309,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list.metadata['url'], ) @@ -313,6 +320,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -331,7 +339,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -345,7 +357,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -355,7 +367,7 @@ def list_by_resource_group( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -365,6 +377,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -376,6 +390,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -386,6 +401,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -403,7 +419,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +437,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -428,7 +448,7 @@ def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -445,17 +465,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -470,7 +497,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -483,7 +510,7 @@ def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -502,6 +529,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -510,6 +538,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -517,7 +546,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -532,11 +565,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -544,7 +577,7 @@ def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -561,17 +594,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -582,7 +622,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -595,7 +635,7 @@ def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -614,6 +654,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -622,6 +663,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -629,7 +671,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -644,5 +690,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_deleted_web_apps_operations.py index 4eef11955aa5..d1a8f925353f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_get_deleted_web_app_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -153,7 +156,7 @@ def list( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -162,6 +165,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -172,6 +177,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -181,6 +187,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -198,7 +205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -222,7 +233,7 @@ def list_by_location( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -233,6 +244,8 @@ def list_by_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -244,6 +257,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -254,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -271,7 +286,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -285,7 +304,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace def get_deleted_web_app_by_location( @@ -296,7 +315,7 @@ def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -313,17 +332,24 @@ def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,5 +364,5 @@ def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_diagnostics_operations.py index 54e3258643cb..b2249788c2a5 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -967,7 +989,7 @@ def list_hosting_environment_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1049,7 +1079,7 @@ def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -1057,11 +1087,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1074,12 +1104,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1088,7 +1121,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1103,7 +1140,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1115,7 +1152,7 @@ def list_site_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1128,6 +1165,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1140,6 +1179,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1151,6 +1191,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1168,7 +1209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1182,7 +1227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1197,7 +1242,7 @@ def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1205,11 +1250,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1222,12 +1267,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1236,7 +1284,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1303,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1263,7 +1315,7 @@ def list_site_diagnostic_categories( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1276,6 +1328,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1288,6 +1342,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1299,6 +1354,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1316,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1330,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1342,7 +1402,7 @@ def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1361,18 +1421,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1454,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1400,7 +1467,7 @@ def list_site_analyses( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1415,6 +1482,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1428,6 +1497,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1440,6 +1510,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1457,7 +1528,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,7 +1546,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1484,7 +1559,7 @@ def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1505,6 +1580,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1512,12 +1589,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1614,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1549,7 +1631,7 @@ def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1559,11 +1641,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1576,6 +1658,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1583,6 +1667,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1591,7 +1676,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1695,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1619,7 +1708,7 @@ def list_site_detectors( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1634,6 +1723,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1647,6 +1738,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1751,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1769,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1787,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1703,7 +1800,7 @@ def get_site_detector( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1724,6 +1821,8 @@ def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -1731,12 +1830,17 @@ def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1751,7 +1855,7 @@ def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1768,7 +1872,7 @@ def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1778,11 +1882,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1795,6 +1899,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1802,6 +1908,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1810,7 +1917,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1825,7 +1936,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1838,7 +1949,7 @@ def list_site_detector_responses_slot( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1853,6 +1964,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1866,6 +1979,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1878,6 +1992,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1895,7 +2010,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1909,7 +2028,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1925,7 +2044,7 @@ def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1935,11 +2054,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1952,6 +2071,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1959,6 +2080,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1967,7 +2089,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1982,7 +2108,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1995,7 +2121,7 @@ def list_site_diagnostic_categories_slot( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -2010,6 +2136,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2023,6 +2151,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2164,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2182,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2200,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2079,7 +2213,7 @@ def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -2100,6 +2234,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2107,12 +2243,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2127,7 +2268,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2141,7 +2282,7 @@ def list_site_analyses_slot( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -2158,6 +2299,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2172,6 +2315,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2185,6 +2329,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2202,7 +2347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2216,7 +2365,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2230,7 +2379,7 @@ def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -2253,6 +2402,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2261,12 +2412,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2281,7 +2437,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2299,7 +2455,7 @@ def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2311,11 +2467,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2328,6 +2484,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2336,6 +2494,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2344,7 +2503,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2359,7 +2522,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2373,7 +2536,7 @@ def list_site_detectors_slot( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2390,6 +2553,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2404,6 +2569,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2417,6 +2583,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2434,7 +2601,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2448,7 +2619,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2462,7 +2633,7 @@ def get_site_detector_slot( ) -> "_models.DetectorDefinition": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2485,6 +2656,8 @@ def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2493,12 +2666,17 @@ def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2513,7 +2691,7 @@ def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2531,7 +2709,7 @@ def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2543,11 +2721,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2560,6 +2738,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2568,6 +2748,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2576,7 +2757,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2591,5 +2776,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_domain_registration_provider_operations.py index 9410bbc5ad4d..20f5e7bb73ea 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_domains_operations.py index 011a1cd8a8d9..4ef03a456147 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,33 +295,34 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,35 +336,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -372,31 +377,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -408,10 +414,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -419,21 +426,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -448,12 +455,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -461,23 +468,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -491,10 +498,11 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -502,21 +510,21 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -531,12 +539,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -544,23 +552,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -573,31 +581,32 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,7 +640,7 @@ def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2021_01_15.models.NameIdentifier @@ -646,12 +655,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -659,7 +670,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +689,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -684,13 +699,15 @@ def list( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -701,6 +718,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -710,6 +728,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -727,7 +746,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -741,7 +764,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -750,7 +773,7 @@ def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -763,15 +786,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -786,7 +816,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -797,7 +827,7 @@ def list_recommendations( ) -> Iterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2021_01_15.models.DomainRecommendationSearchParameters @@ -808,6 +838,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -821,6 +852,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -833,6 +865,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -852,7 +885,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -866,7 +903,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -876,7 +913,7 @@ def list_by_resource_group( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -885,6 +922,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -896,6 +935,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -906,6 +946,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -923,7 +964,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,7 +982,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -948,7 +993,7 @@ def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -965,17 +1010,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -990,7 +1042,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -1006,6 +1058,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -1014,6 +1067,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1021,7 +1075,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1039,7 +1097,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1052,7 +1110,7 @@ def begin_create_or_update( ) -> LROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -1072,8 +1130,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1085,6 +1144,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1109,13 +1169,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1124,7 +1183,7 @@ def delete( ) -> None: """Delete a domain. - Description for 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 @@ -1144,18 +1203,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1166,7 +1232,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1179,7 +1245,7 @@ def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -1198,6 +1264,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1206,6 +1273,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1213,7 +1281,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1232,7 +1304,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1244,7 +1316,7 @@ def list_ownership_identifiers( ) -> Iterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -1257,6 +1329,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1269,6 +1343,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1280,6 +1355,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1297,7 +1373,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1311,7 +1391,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1323,7 +1403,7 @@ def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -1342,18 +1422,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1368,7 +1455,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1383,8 +1470,8 @@ def create_or_update_ownership_identifier( """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. + 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 @@ -1405,6 +1492,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1414,6 +1502,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1421,7 +1510,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1436,11 +1529,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1449,7 +1542,7 @@ def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -1468,18 +1561,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1490,7 +1590,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1505,8 +1605,8 @@ def update_ownership_identifier( """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. + 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 @@ -1527,6 +1627,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1536,6 +1637,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1543,7 +1645,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1558,11 +1664,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1570,7 +1676,7 @@ def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1587,17 +1693,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1608,5 +1721,5 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_global_operations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_global_operations_operations.py index aa833ab3d11b..3ea365af7ba0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_global_operations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_global_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, List, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse @@ -15,7 +16,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,30 +30,31 @@ def build_get_deleted_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}") path_format_arguments = { "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_deleted_web_app_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_subscription_operation_with_async_response_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,7 +158,7 @@ def get_deleted_web_app( ) -> "_models.DeletedSite": """Get deleted app for a subscription. - Description for Get deleted app for a subscription. + 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 @@ -170,16 +173,23 @@ def get_deleted_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deleted_web_app_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +204,7 @@ def get_deleted_web_app( return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}"} # type: ignore @distributed_trace @@ -205,7 +215,7 @@ def get_deleted_web_app_snapshots( ) -> List["_models.Snapshot"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + 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 @@ -220,16 +230,23 @@ def get_deleted_web_app_snapshots( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deleted_web_app_snapshots_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_snapshots.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,11 +261,11 @@ def get_deleted_web_app_snapshots( return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + get_deleted_web_app_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots"} # type: ignore @distributed_trace - def get_subscription_operation_with_async_response( + def get_subscription_operation_with_async_response( # pylint: disable=inconsistent-return-statements self, location: str, operation_id: str, @@ -256,7 +273,7 @@ def get_subscription_operation_with_async_response( ) -> None: """Gets an operation in a subscription and given region. - Description for Gets an operation in a subscription and given region. + Gets an operation in a subscription and given region. :param location: Location name. :type location: str @@ -273,17 +290,24 @@ def get_subscription_operation_with_async_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_subscription_operation_with_async_response_request( location=location, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_operation_with_async_response.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -294,5 +318,5 @@ def get_subscription_operation_with_async_response( if cls: return cls(pipeline_response, None, {}) - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore + get_subscription_operation_with_async_response.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_kube_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_kube_environments_operations.py index 6c89a00f83e8..bd417c0109a9 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_kube_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_kube_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_by_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -178,31 +181,32 @@ def build_delete_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -216,35 +220,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -279,7 +283,7 @@ def list_by_subscription( ) -> Iterable["_models.KubeEnvironmentCollection"]: """Get all Kubernetes Environments for a subscription. - Description for Get all Kubernetes Environments for a subscription. + Get all Kubernetes Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KubeEnvironmentCollection or the result of @@ -288,6 +292,8 @@ def list_by_subscription( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -298,6 +304,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_subscription.metadata['url'], ) request = _convert_request(request) @@ -307,6 +314,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -324,7 +332,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,7 +350,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -348,7 +360,7 @@ def list_by_resource_group( ) -> Iterable["_models.KubeEnvironmentCollection"]: """Get all the Kubernetes Environments in a resource group. - Description for Get all the Kubernetes Environments in a resource group. + 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 @@ -359,6 +371,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -370,6 +384,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -380,6 +395,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -397,7 +413,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -411,7 +431,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def get( @@ -422,7 +442,7 @@ def get( ) -> "_models.KubeEnvironment": """Get the properties of a Kubernetes Environment. - Description for Get the properties of a Kubernetes Environment. + 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 @@ -439,17 +459,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -464,7 +491,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -480,6 +507,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') @@ -488,6 +516,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -495,7 +524,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -513,7 +546,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace @@ -526,7 +559,7 @@ def begin_create_or_update( ) -> LROPoller["_models.KubeEnvironment"]: """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -547,8 +580,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.KubeEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -560,6 +594,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -584,12 +619,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -601,17 +635,24 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -621,11 +662,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -633,7 +674,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete a Kubernetes Environment. - Description for Delete a Kubernetes Environment. + Delete a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -651,7 +692,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -662,6 +704,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -682,10 +725,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -697,7 +739,7 @@ def update( ) -> "_models.KubeEnvironment": """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -717,6 +759,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentPatchResource') @@ -725,6 +768,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -732,7 +776,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -751,5 +799,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_provider_operations.py index 14d7841caf1a..9e0e010743b0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum10"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -60,26 +61,27 @@ def build_get_function_app_stacks_request( stack_os_type: Optional[Union[str, "_models.Enum11"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/functionAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/functionAppStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -90,31 +92,32 @@ def build_get_function_app_stacks_for_location_request( stack_os_type: Optional[Union[str, "_models.Enum12"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/locations/{location}/functionAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/locations/{location}/functionAppStacks") path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -125,31 +128,32 @@ def build_get_web_app_stacks_for_location_request( stack_os_type: Optional[Union[str, "_models.Enum13"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/locations/{location}/webAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/locations/{location}/webAppStacks") path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -157,24 +161,25 @@ def build_get_web_app_stacks_for_location_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -184,26 +189,27 @@ def build_get_web_app_stacks_request( stack_os_type: Optional[Union[str, "_models.Enum14"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/webAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/webAppStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -214,31 +220,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum15"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -272,9 +279,9 @@ def get_available_stacks( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_01_15.models.Enum10 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -283,6 +290,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -292,6 +301,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -301,6 +311,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -319,7 +330,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -333,7 +348,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def get_function_app_stacks( @@ -343,9 +358,9 @@ def get_function_app_stacks( ) -> Iterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions. - Description for Get available Function app frameworks and their versions. + Get available Function app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_15.models.Enum11 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -354,6 +369,8 @@ def get_function_app_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -363,6 +380,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks.metadata['url'], ) @@ -372,6 +390,7 @@ def prepare_request(next_link=None): else: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -390,7 +409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -404,7 +427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + get_function_app_stacks.metadata = {'url': "/providers/Microsoft.Web/functionAppStacks"} # type: ignore @distributed_trace def get_function_app_stacks_for_location( @@ -415,11 +438,11 @@ def get_function_app_stacks_for_location( ) -> Iterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions for location. - Description for Get available Function app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_15.models.Enum12 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -428,6 +451,8 @@ def get_function_app_stacks_for_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -438,6 +463,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks_for_location.metadata['url'], ) @@ -448,6 +474,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -466,7 +493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -480,7 +511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + get_function_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/functionAppStacks"} # type: ignore @distributed_trace def get_web_app_stacks_for_location( @@ -491,11 +522,11 @@ def get_web_app_stacks_for_location( ) -> Iterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions for location. - Description for Get available Web app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_15.models.Enum13 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -503,6 +534,8 @@ def get_web_app_stacks_for_location( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -513,6 +546,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks_for_location.metadata['url'], ) @@ -523,6 +557,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -541,7 +576,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -555,7 +594,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + get_web_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/webAppStacks"} # type: ignore @distributed_trace def list_operations( @@ -565,8 +604,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -574,6 +613,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -583,6 +624,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -591,6 +633,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -608,7 +651,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -622,7 +669,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_web_app_stacks( @@ -632,9 +679,9 @@ def get_web_app_stacks( ) -> Iterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions. - Description for Get available Web app frameworks and their versions. + Get available Web app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_01_15.models.Enum14 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -642,6 +689,8 @@ def get_web_app_stacks( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -651,6 +700,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks.metadata['url'], ) @@ -660,6 +710,7 @@ def prepare_request(next_link=None): else: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -678,7 +729,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -692,7 +747,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + get_web_app_stacks.metadata = {'url': "/providers/Microsoft.Web/webAppStacks"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -702,9 +757,9 @@ def get_available_stacks_on_prem( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_01_15.models.Enum15 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -713,6 +768,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -723,6 +780,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -733,6 +791,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -751,7 +810,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -765,4 +828,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_recommendations_operations.py index c761e8c6038a..471ff84e8b04 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,29 +69,30 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -100,30 +102,31 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,36 @@ def build_list_history_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +183,36 @@ def build_list_recommended_rules_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,32 +225,33 @@ def build_disable_all_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,32 +264,33 @@ def build_reset_all_filters_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +305,11 @@ def build_get_rule_details_by_hosting_environment_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), @@ -309,25 +317,25 @@ def build_get_rule_details_by_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -341,10 +349,11 @@ def build_disable_recommendation_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -352,22 +361,22 @@ def build_disable_recommendation_for_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -381,35 +390,36 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -423,35 +433,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -462,31 +473,32 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -497,31 +509,32 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,10 +549,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -547,25 +561,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -577,10 +591,11 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -588,21 +603,21 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -637,14 +652,14 @@ def list( ) -> Iterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -653,6 +668,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -663,6 +680,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -674,6 +692,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -693,7 +712,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -707,16 +730,16 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -729,15 +752,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -748,19 +778,18 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -775,16 +804,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -795,7 +831,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -809,7 +845,7 @@ def list_history_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -820,7 +856,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -829,6 +865,8 @@ def list_history_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -841,6 +879,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -854,6 +893,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -873,7 +913,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -887,7 +931,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -900,7 +944,7 @@ def list_recommended_rules_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -910,7 +954,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -919,6 +963,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -931,6 +977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -944,6 +991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -963,7 +1011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,10 +1029,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_hosting_environment( + def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -989,7 +1041,7 @@ def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1008,18 +1060,25 @@ def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1030,11 +1089,11 @@ def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_hosting_environment( + def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1043,7 +1102,7 @@ def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1062,18 +1121,25 @@ def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1084,7 +1150,7 @@ def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1099,7 +1165,7 @@ def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1108,10 +1174,10 @@ def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1124,12 +1190,15 @@ def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -1137,7 +1206,11 @@ def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1152,11 +1225,11 @@ def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_hosting_environment( + def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1166,7 +1239,7 @@ def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1187,19 +1260,26 @@ def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,7 +1290,7 @@ def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -1224,7 +1304,7 @@ def list_history_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -1235,7 +1315,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1244,6 +1324,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1256,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -1269,6 +1352,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -1288,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1302,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -1315,7 +1403,7 @@ def list_recommended_rules_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -1325,7 +1413,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1334,6 +1422,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1346,6 +1436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -1359,6 +1450,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -1378,7 +1470,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,10 +1488,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1403,7 +1499,7 @@ def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1420,17 +1516,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1441,11 +1544,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1453,7 +1556,7 @@ def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1470,17 +1573,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1491,7 +1601,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1506,7 +1616,7 @@ def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1515,10 +1625,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1531,12 +1641,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -1544,7 +1657,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1559,11 +1676,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1572,7 +1689,7 @@ def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1591,18 +1708,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,5 +1737,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_resource_health_metadata_operations.py index e6230eb44313..1fe492bc1803 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -262,7 +268,7 @@ def list( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -331,8 +345,7 @@ def list_by_resource_group( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -343,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -354,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -364,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -381,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -406,8 +427,7 @@ def list_by_site( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -420,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -432,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -443,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -460,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -474,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -485,7 +513,7 @@ def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -502,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -527,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -540,8 +575,7 @@ def list_by_site_slot( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -556,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -581,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -598,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -624,7 +666,7 @@ def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -643,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_static_sites_operations.py index a2d8844b1f4f..4098d61079ba 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -37,34 +37,34 @@ def build_preview_workflow_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -75,29 +75,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -107,30 +108,31 @@ def build_get_static_sites_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,31 +143,32 @@ def build_get_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +182,35 @@ def build_create_or_update_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -220,31 +223,32 @@ def build_delete_static_site_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,35 +262,35 @@ def build_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -300,10 +304,11 @@ def build_list_static_site_users_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -311,21 +316,21 @@ def build_list_static_site_users_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -338,10 +343,11 @@ def build_delete_static_site_user_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -350,21 +356,21 @@ def build_delete_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -380,12 +386,12 @@ def build_update_static_site_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -394,23 +400,23 @@ def build_update_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -423,31 +429,32 @@ def build_get_static_site_builds_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -459,10 +466,11 @@ def build_get_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -470,21 +478,21 @@ def build_get_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -496,10 +504,11 @@ def build_delete_static_site_build_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -507,21 +516,21 @@ def build_delete_static_site_build_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,12 +545,12 @@ def build_create_or_update_static_site_build_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -549,23 +558,23 @@ def build_create_or_update_static_site_build_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -582,12 +591,12 @@ def build_create_or_update_static_site_build_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -595,23 +604,23 @@ def build_create_or_update_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -625,10 +634,11 @@ def build_list_static_site_build_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -636,21 +646,21 @@ def build_list_static_site_build_functions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -662,10 +672,11 @@ def build_list_static_site_build_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -673,21 +684,21 @@ def build_list_static_site_build_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -699,10 +710,11 @@ def build_list_static_site_build_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -710,21 +722,21 @@ def build_list_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -736,10 +748,11 @@ def build_get_user_provided_function_apps_for_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -747,21 +760,21 @@ def build_get_user_provided_function_apps_for_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -774,10 +787,11 @@ def build_get_user_provided_function_app_for_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -786,21 +800,21 @@ def build_get_user_provided_function_app_for_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -817,12 +831,12 @@ def build_register_user_provided_function_app_with_static_site_build_request_ini is_forced: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -831,25 +845,25 @@ def build_register_user_provided_function_app_with_static_site_build_request_ini "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if is_forced is not None: - query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -864,10 +878,11 @@ def build_detach_user_provided_function_app_from_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -876,21 +891,21 @@ def build_detach_user_provided_function_app_from_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -905,12 +920,12 @@ def build_create_zip_deployment_for_static_site_build_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -918,23 +933,23 @@ def build_create_zip_deployment_for_static_site_build_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -950,35 +965,35 @@ def build_create_or_update_static_site_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -994,35 +1009,35 @@ def build_create_or_update_static_site_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1038,35 +1053,35 @@ def build_create_user_roles_invitation_link_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1079,31 +1094,32 @@ def build_list_static_site_custom_domains_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1115,10 +1131,11 @@ def build_get_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1126,21 +1143,21 @@ def build_get_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1155,12 +1172,12 @@ def build_create_or_update_static_site_custom_domain_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1168,23 +1185,23 @@ def build_create_or_update_static_site_custom_domain_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1198,10 +1215,11 @@ def build_delete_static_site_custom_domain_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1209,21 +1227,21 @@ def build_delete_static_site_custom_domain_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1238,12 +1256,12 @@ def build_validate_custom_domain_can_be_added_to_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1251,23 +1269,23 @@ def build_validate_custom_domain_can_be_added_to_static_site_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1280,31 +1298,32 @@ def build_detach_static_site_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1315,31 +1334,32 @@ def build_list_static_site_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1350,31 +1370,32 @@ def build_list_static_site_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1385,31 +1406,32 @@ def build_list_static_site_configured_roles_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1420,31 +1442,32 @@ def build_list_static_site_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1455,31 +1478,32 @@ def build_list_static_site_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1490,31 +1514,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1526,10 +1551,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1537,21 +1563,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1566,12 +1592,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1579,23 +1605,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1609,10 +1635,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1620,21 +1647,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1645,31 +1672,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1683,35 +1711,35 @@ def build_reset_static_site_api_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1724,31 +1752,32 @@ def build_get_user_provided_function_apps_for_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1760,10 +1789,11 @@ def build_get_user_provided_function_app_for_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1771,21 +1801,21 @@ def build_get_user_provided_function_app_for_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1801,12 +1831,12 @@ def build_register_user_provided_function_app_with_static_site_request_initial( is_forced: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1814,25 +1844,25 @@ def build_register_user_provided_function_app_with_static_site_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if is_forced is not None: - query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1846,10 +1876,11 @@ def build_detach_user_provided_function_app_from_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1857,21 +1888,21 @@ def build_detach_user_provided_function_app_from_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1885,41 +1916,41 @@ def build_create_zip_deployment_for_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs ) -class StaticSitesOperations(object): +class StaticSitesOperations(object): # pylint: disable=too-many-public-methods """StaticSitesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1950,7 +1981,7 @@ def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -1969,6 +2000,7 @@ def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -1976,6 +2008,7 @@ def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -1983,7 +2016,11 @@ def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1998,7 +2035,7 @@ def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -2008,7 +2045,7 @@ def list( ) -> Iterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -2016,6 +2053,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2026,6 +2065,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2075,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2093,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2111,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -2076,7 +2121,7 @@ def get_static_sites_by_resource_group( ) -> Iterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -2086,6 +2131,8 @@ def get_static_sites_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2097,6 +2144,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -2107,6 +2155,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2124,7 +2173,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2138,7 +2191,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_site( @@ -2149,7 +2202,7 @@ def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -2166,17 +2219,24 @@ def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2191,7 +2251,7 @@ def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore def _create_or_update_static_site_initial( @@ -2207,6 +2267,7 @@ def _create_or_update_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -2215,6 +2276,7 @@ def _create_or_update_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_initial.metadata['url'], @@ -2222,7 +2284,11 @@ def _create_or_update_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2240,7 +2306,7 @@ def _create_or_update_static_site_initial( return deserialized - _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _create_or_update_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -2253,8 +2319,7 @@ def begin_create_or_update_static_site( ) -> LROPoller["_models.StaticSiteARMResource"]: """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -2275,8 +2340,9 @@ def begin_create_or_update_static_site( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.StaticSiteARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2288,6 +2354,7 @@ def begin_create_or_update_static_site( resource_group_name=resource_group_name, name=name, static_site_envelope=static_site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2312,12 +2379,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore - def _delete_static_site_initial( + def _delete_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2329,17 +2395,24 @@ def _delete_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2349,11 +2422,11 @@ def _delete_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _delete_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace - def begin_delete_static_site( + def begin_delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2361,7 +2434,7 @@ def begin_delete_static_site( ) -> LROPoller[None]: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2379,7 +2452,8 @@ def begin_delete_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2390,6 +2464,7 @@ def begin_delete_static_site( raw_result = self._delete_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2410,10 +2485,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace def update_static_site( @@ -2425,8 +2499,7 @@ def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -2445,6 +2518,7 @@ def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -2453,6 +2527,7 @@ def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -2460,7 +2535,11 @@ def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2479,7 +2558,7 @@ def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -2492,7 +2571,7 @@ def list_static_site_users( ) -> Iterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -2507,6 +2586,8 @@ def list_static_site_users( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2520,6 +2601,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -2532,6 +2614,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2549,7 +2632,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2563,10 +2650,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace - def delete_static_site_user( + def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2576,7 +2663,7 @@ def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -2597,6 +2684,8 @@ def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -2604,12 +2693,17 @@ def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2620,7 +2714,7 @@ def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -2635,7 +2729,7 @@ def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -2659,6 +2753,7 @@ def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -2669,6 +2764,7 @@ def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -2676,7 +2772,11 @@ def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2691,7 +2791,7 @@ def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -2703,7 +2803,7 @@ def get_static_site_builds( ) -> Iterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -2716,6 +2816,8 @@ def get_static_site_builds( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2728,6 +2830,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -2739,6 +2842,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2756,7 +2860,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2770,7 +2878,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace def get_static_site_build( @@ -2782,7 +2890,7 @@ def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -2801,18 +2909,25 @@ def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2827,10 +2942,10 @@ def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore - def _delete_static_site_build_initial( + def _delete_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2843,18 +2958,25 @@ def _delete_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_static_site_build_request_initial( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_build_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2864,11 +2986,11 @@ def _delete_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + _delete_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace - def begin_delete_static_site_build( + def begin_delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2877,7 +2999,7 @@ def begin_delete_static_site_build( ) -> LROPoller[None]: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2897,7 +3019,8 @@ def begin_delete_static_site_build( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2909,6 +3032,7 @@ def begin_delete_static_site_build( resource_group_name=resource_group_name, name=name, environment_name=environment_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2929,10 +3053,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + begin_delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace def create_or_update_static_site_build_app_settings( @@ -2945,7 +3068,7 @@ def create_or_update_static_site_build_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site build. - Description for Creates or updates the app settings of a static site build. + 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 @@ -2966,6 +3089,7 @@ def create_or_update_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -2975,6 +3099,7 @@ def create_or_update_static_site_build_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_app_settings.metadata['url'], @@ -2982,7 +3107,11 @@ def create_or_update_static_site_build_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2997,7 +3126,7 @@ def create_or_update_static_site_build_app_settings( return deserialized - create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + create_or_update_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings"} # type: ignore @distributed_trace @@ -3011,7 +3140,7 @@ def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -3032,6 +3161,7 @@ def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3041,6 +3171,7 @@ def create_or_update_static_site_build_function_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -3048,7 +3179,11 @@ def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3063,7 +3198,7 @@ def create_or_update_static_site_build_function_app_settings( return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings"} # type: ignore @distributed_trace @@ -3076,7 +3211,7 @@ def list_static_site_build_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -3091,6 +3226,8 @@ def list_static_site_build_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3104,6 +3241,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -3116,6 +3254,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3133,7 +3272,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3147,7 +3290,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions"} # type: ignore @distributed_trace def list_static_site_build_app_settings( @@ -3159,7 +3302,7 @@ def list_static_site_build_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -3178,18 +3321,25 @@ def list_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_build_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3204,7 +3354,7 @@ def list_static_site_build_app_settings( return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + list_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings"} # type: ignore @distributed_trace @@ -3217,7 +3367,7 @@ def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -3236,18 +3386,25 @@ def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3262,7 +3419,7 @@ def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -3275,8 +3432,7 @@ def get_user_provided_function_apps_for_static_site_build( ) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site build. - Description for Gets the details of the user provided function apps registered with a static - site build. + 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 @@ -3291,6 +3447,8 @@ def get_user_provided_function_apps_for_static_site_build( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3304,6 +3462,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site_build.metadata['url'], ) request = _convert_request(request) @@ -3316,6 +3475,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3333,7 +3493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,7 +3511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps"} # type: ignore @distributed_trace def get_user_provided_function_app_for_static_site_build( @@ -3360,8 +3524,7 @@ def get_user_provided_function_app_for_static_site_build( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site build. - Description for Gets the details of the user provided function app registered with a static - site build. + 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 @@ -3382,6 +3545,8 @@ def get_user_provided_function_app_for_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_user_provided_function_app_for_static_site_build_request( resource_group_name=resource_group_name, @@ -3389,12 +3554,17 @@ def get_user_provided_function_app_for_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3409,7 +3579,7 @@ def get_user_provided_function_app_for_static_site_build( return deserialized - get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore def _register_user_provided_function_app_with_static_site_build_initial( @@ -3428,6 +3598,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -3438,6 +3609,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -3446,7 +3618,11 @@ def _register_user_provided_function_app_with_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3464,7 +3640,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( return deserialized - _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace @@ -3480,7 +3656,7 @@ def begin_register_user_provided_function_app_with_static_site_build( ) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site build. - Description for Register a user provided function app with a static site build. + 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 @@ -3512,8 +3688,9 @@ def begin_register_user_provided_function_app_with_static_site_build( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3528,6 +3705,7 @@ def begin_register_user_provided_function_app_with_static_site_build( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3552,13 +3730,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace - def detach_user_provided_function_app_from_static_site_build( + def detach_user_provided_function_app_from_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3568,7 +3745,7 @@ def detach_user_provided_function_app_from_static_site_build( ) -> None: """Detach the user provided function app from the static site build. - Description for Detach the user provided function app from the static site build. + 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 @@ -3589,6 +3766,8 @@ def detach_user_provided_function_app_from_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_detach_user_provided_function_app_from_static_site_build_request( resource_group_name=resource_group_name, @@ -3596,12 +3775,17 @@ def detach_user_provided_function_app_from_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3612,10 +3796,10 @@ def detach_user_provided_function_app_from_static_site_build( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - def _create_zip_deployment_for_static_site_build_initial( + def _create_zip_deployment_for_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3629,6 +3813,7 @@ def _create_zip_deployment_for_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -3638,6 +3823,7 @@ def _create_zip_deployment_for_static_site_build_initial( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_build_initial.metadata['url'], @@ -3645,7 +3831,11 @@ def _create_zip_deployment_for_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3655,11 +3845,11 @@ def _create_zip_deployment_for_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace - def begin_create_zip_deployment_for_static_site_build( + def begin_create_zip_deployment_for_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3669,7 +3859,7 @@ def begin_create_zip_deployment_for_static_site_build( ) -> LROPoller[None]: """Deploys zipped content to a specific environment of a static site. - Description for Deploys zipped content to a specific environment of a static site. + 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 @@ -3693,8 +3883,9 @@ def begin_create_zip_deployment_for_static_site_build( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -3707,6 +3898,7 @@ def begin_create_zip_deployment_for_static_site_build( name=name, environment_name=environment_name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3728,10 +3920,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace def create_or_update_static_site_app_settings( @@ -3743,7 +3934,7 @@ def create_or_update_static_site_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site. - Description for Creates or updates the app settings of a static site. + 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 @@ -3762,6 +3953,7 @@ def create_or_update_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3770,6 +3962,7 @@ def create_or_update_static_site_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_app_settings.metadata['url'], @@ -3777,7 +3970,11 @@ def create_or_update_static_site_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3792,7 +3989,7 @@ def create_or_update_static_site_app_settings( return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + create_or_update_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -3805,7 +4002,7 @@ def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -3824,6 +4021,7 @@ def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3832,6 +4030,7 @@ def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -3839,7 +4038,11 @@ def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3854,7 +4057,7 @@ def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace @@ -3867,7 +4070,7 @@ def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -3887,6 +4090,7 @@ def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -3895,6 +4099,7 @@ def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -3902,7 +4107,11 @@ def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3917,7 +4126,7 @@ def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -3929,7 +4138,7 @@ def list_static_site_custom_domains( ) -> Iterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -3942,6 +4151,8 @@ def list_static_site_custom_domains( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3954,6 +4165,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -3965,6 +4177,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3982,7 +4195,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3996,7 +4213,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace def get_static_site_custom_domain( @@ -4008,7 +4225,7 @@ def get_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Gets an existing custom domain for a particular static site. - Description for Gets an existing custom domain for a particular static site. + 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 @@ -4027,18 +4244,25 @@ def get_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4053,7 +4277,7 @@ def get_static_site_custom_domain( return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + get_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore def _create_or_update_static_site_custom_domain_initial( @@ -4070,6 +4294,7 @@ def _create_or_update_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -4079,6 +4304,7 @@ def _create_or_update_static_site_custom_domain_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_custom_domain_initial.metadata['url'], @@ -4086,7 +4312,11 @@ def _create_or_update_static_site_custom_domain_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4104,7 +4334,7 @@ def _create_or_update_static_site_custom_domain_initial( return deserialized - _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _create_or_update_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace @@ -4118,8 +4348,7 @@ def begin_create_or_update_static_site_custom_domain( ) -> LROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -4145,8 +4374,9 @@ def begin_create_or_update_static_site_custom_domain( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.StaticSiteCustomDomainOverviewARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4159,6 +4389,7 @@ def begin_create_or_update_static_site_custom_domain( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4183,12 +4414,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - def _delete_static_site_custom_domain_initial( + def _delete_static_site_custom_domain_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4201,18 +4431,25 @@ def _delete_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_static_site_custom_domain_request_initial( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_custom_domain_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4222,11 +4459,11 @@ def _delete_static_site_custom_domain_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _delete_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def begin_delete_static_site_custom_domain( + def begin_delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4235,7 +4472,7 @@ def begin_delete_static_site_custom_domain( ) -> LROPoller[None]: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4255,7 +4492,8 @@ def begin_delete_static_site_custom_domain( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4267,6 +4505,7 @@ def begin_delete_static_site_custom_domain( resource_group_name=resource_group_name, name=name, domain_name=domain_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4287,12 +4526,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - def _validate_custom_domain_can_be_added_to_static_site_initial( + def _validate_custom_domain_can_be_added_to_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4306,6 +4544,7 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -4315,6 +4554,7 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'], @@ -4322,7 +4562,11 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4332,11 +4576,11 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace - def begin_validate_custom_domain_can_be_added_to_static_site( + def begin_validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4346,7 +4590,7 @@ def begin_validate_custom_domain_can_be_added_to_static_site( ) -> LROPoller[None]: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -4370,8 +4614,9 @@ def begin_validate_custom_domain_can_be_added_to_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4384,6 +4629,7 @@ def begin_validate_custom_domain_can_be_added_to_static_site( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4405,12 +4651,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore - def _detach_static_site_initial( + def _detach_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4422,17 +4667,24 @@ def _detach_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_detach_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._detach_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4442,11 +4694,11 @@ def _detach_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + _detach_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace - def begin_detach_static_site( + def begin_detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4454,7 +4706,7 @@ def begin_detach_static_site( ) -> LROPoller[None]: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4472,7 +4724,8 @@ def begin_detach_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4483,6 +4736,7 @@ def begin_detach_static_site( raw_result = self._detach_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4503,10 +4757,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + begin_detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace def list_static_site_functions( @@ -4517,7 +4770,7 @@ def list_static_site_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -4530,6 +4783,8 @@ def list_static_site_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4542,6 +4797,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -4553,6 +4809,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4570,7 +4827,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4584,7 +4845,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace def list_static_site_app_settings( @@ -4595,7 +4856,7 @@ def list_static_site_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -4612,17 +4873,24 @@ def list_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4637,7 +4905,7 @@ def list_static_site_app_settings( return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + list_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings"} # type: ignore @distributed_trace @@ -4649,7 +4917,7 @@ def list_static_site_configured_roles( ) -> "_models.StringList": """Lists the roles configured for the static site. - Description for Lists the roles configured for the static site. + 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 @@ -4666,17 +4934,24 @@ def list_static_site_configured_roles( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_configured_roles_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_configured_roles.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4691,7 +4966,7 @@ def list_static_site_configured_roles( return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + list_static_site_configured_roles.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles"} # type: ignore @distributed_trace @@ -4703,7 +4978,7 @@ def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -4720,17 +4995,24 @@ def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4745,7 +5027,7 @@ def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -4757,7 +5039,7 @@ def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -4774,17 +5056,24 @@ def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4799,7 +5088,7 @@ def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace @@ -4811,7 +5100,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a static site. - Description for Gets the list of private endpoint connections associated with a static site. + 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 @@ -4824,6 +5113,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4836,6 +5127,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -4847,6 +5139,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4864,7 +5157,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4878,7 +5175,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -4890,7 +5187,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4909,18 +5206,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4935,7 +5239,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -4952,6 +5256,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -4961,6 +5266,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -4968,7 +5274,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4986,7 +5296,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -5000,7 +5310,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -5025,8 +5335,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -5039,6 +5350,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5063,10 +5375,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -5081,18 +5392,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -5113,7 +5431,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -5126,7 +5444,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -5146,7 +5464,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -5158,6 +5477,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -5181,10 +5501,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -5195,7 +5514,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -5212,17 +5531,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5237,11 +5563,11 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources"} # type: ignore @distributed_trace - def reset_static_site_api_key( + def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5250,7 +5576,7 @@ def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -5270,6 +5596,7 @@ def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -5278,6 +5605,7 @@ def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -5285,7 +5613,11 @@ def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5296,7 +5628,7 @@ def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore @distributed_trace @@ -5308,8 +5640,7 @@ def get_user_provided_function_apps_for_static_site( ) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site. - Description for Gets the details of the user provided function apps registered with a static - site. + 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 @@ -5322,6 +5653,8 @@ def get_user_provided_function_apps_for_static_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5334,6 +5667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site.metadata['url'], ) request = _convert_request(request) @@ -5345,6 +5679,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5362,7 +5697,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5376,7 +5715,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps"} # type: ignore @distributed_trace def get_user_provided_function_app_for_static_site( @@ -5388,8 +5727,7 @@ def get_user_provided_function_app_for_static_site( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site. - Description for Gets the details of the user provided function app registered with a static - site. + 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 @@ -5408,18 +5746,25 @@ def get_user_provided_function_app_for_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_user_provided_function_app_for_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5434,7 +5779,7 @@ def get_user_provided_function_app_for_static_site( return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore def _register_user_provided_function_app_with_static_site_initial( @@ -5452,6 +5797,7 @@ def _register_user_provided_function_app_with_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -5461,6 +5807,7 @@ def _register_user_provided_function_app_with_static_site_initial( name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -5469,7 +5816,11 @@ def _register_user_provided_function_app_with_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5487,7 +5838,7 @@ def _register_user_provided_function_app_with_static_site_initial( return deserialized - _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace @@ -5502,7 +5853,7 @@ def begin_register_user_provided_function_app_with_static_site( ) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site. - Description for Register a user provided function app with a static site. + 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 @@ -5532,8 +5883,9 @@ def begin_register_user_provided_function_app_with_static_site( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -5547,6 +5899,7 @@ def begin_register_user_provided_function_app_with_static_site( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5571,13 +5924,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace - def detach_user_provided_function_app_from_static_site( + def detach_user_provided_function_app_from_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5586,7 +5938,7 @@ def detach_user_provided_function_app_from_static_site( ) -> None: """Detach the user provided function app from the static site. - Description for Detach the user provided function app from the static site. + 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 @@ -5605,18 +5957,25 @@ def detach_user_provided_function_app_from_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_detach_user_provided_function_app_from_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5627,10 +5986,10 @@ def detach_user_provided_function_app_from_static_site( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - def _create_zip_deployment_for_static_site_initial( + def _create_zip_deployment_for_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5643,6 +6002,7 @@ def _create_zip_deployment_for_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -5651,6 +6011,7 @@ def _create_zip_deployment_for_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_initial.metadata['url'], @@ -5658,7 +6019,11 @@ def _create_zip_deployment_for_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5668,11 +6033,11 @@ def _create_zip_deployment_for_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore @distributed_trace - def begin_create_zip_deployment_for_static_site( + def begin_create_zip_deployment_for_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5681,7 +6046,7 @@ def begin_create_zip_deployment_for_static_site( ) -> LROPoller[None]: """Deploys zipped content to a static site. - Description for Deploys zipped content to a static site. + 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 @@ -5703,8 +6068,9 @@ def begin_create_zip_deployment_for_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -5716,6 +6082,7 @@ def begin_create_zip_deployment_for_static_site( resource_group_name=resource_group_name, name=name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5737,7 +6104,6 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_top_level_domains_operations.py index 409d469a6cd4..22b8ec6f6f91 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -161,7 +163,7 @@ def list( ) -> Iterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -220,7 +230,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -230,7 +240,7 @@ def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -245,16 +255,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,7 +286,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -281,7 +298,7 @@ def list_agreements( ) -> Iterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -294,6 +311,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -308,6 +326,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -321,6 +340,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -340,7 +360,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,4 +378,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_web_apps_operations.py index 7e74db329b49..e959b589310d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,35 +188,36 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,35 +231,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -270,33 +274,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -310,35 +315,35 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -354,35 +359,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -395,31 +400,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -431,10 +437,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -442,21 +449,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -468,10 +475,11 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -479,21 +487,21 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -508,12 +516,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -521,23 +529,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -554,12 +562,12 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -567,23 +575,23 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -596,31 +604,32 @@ def build_list_basic_publishing_credentials_policies_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,31 +640,32 @@ def build_get_ftp_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -669,35 +679,35 @@ def build_update_ftp_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -710,31 +720,32 @@ def build_get_scm_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -748,35 +759,35 @@ def build_update_scm_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -789,31 +800,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -827,35 +839,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -868,31 +880,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -906,35 +919,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -947,31 +960,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -985,35 +999,35 @@ def build_update_auth_settings_v2_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1026,31 +1040,32 @@ def build_get_auth_settings_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1064,35 +1079,35 @@ def build_update_azure_storage_accounts_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1105,31 +1120,32 @@ def build_list_azure_storage_accounts_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1143,35 +1159,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1184,31 +1200,32 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1219,31 +1236,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1254,31 +1272,32 @@ def build_get_app_settings_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1290,10 +1309,11 @@ def build_get_app_setting_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1301,21 +1321,21 @@ def build_get_app_setting_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1326,31 +1346,32 @@ def build_get_site_connection_string_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1362,10 +1383,11 @@ def build_get_site_connection_string_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1373,21 +1395,21 @@ def build_get_site_connection_string_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1401,35 +1423,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1442,31 +1464,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1477,31 +1500,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1515,35 +1539,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1559,35 +1583,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1600,31 +1624,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1635,31 +1660,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1673,35 +1699,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1714,31 +1740,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1749,31 +1776,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1787,35 +1815,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1828,31 +1856,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1866,35 +1895,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1910,35 +1939,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1951,31 +1980,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1987,10 +2017,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1998,21 +2029,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2024,10 +2055,11 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2035,21 +2067,21 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2060,31 +2092,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2095,31 +2128,32 @@ def build_get_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2130,31 +2164,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2166,10 +2201,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2177,21 +2213,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2203,10 +2239,11 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2214,21 +2251,21 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2240,10 +2277,11 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2251,21 +2289,21 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2277,10 +2315,11 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2288,21 +2327,21 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2313,31 +2352,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2349,10 +2389,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2360,21 +2401,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2389,12 +2430,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2402,23 +2443,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2432,10 +2473,11 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2443,21 +2485,21 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2469,10 +2511,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2480,21 +2523,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2508,35 +2551,35 @@ def build_discover_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2549,31 +2592,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2585,10 +2629,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2596,21 +2641,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2625,12 +2670,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2638,23 +2683,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2668,10 +2713,11 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2679,21 +2725,21 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2708,12 +2754,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2721,23 +2767,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2750,31 +2796,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2788,35 +2835,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2829,31 +2876,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2864,31 +2912,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2899,31 +2948,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2935,10 +2985,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2946,21 +2997,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2975,12 +3026,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2988,23 +3039,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3018,10 +3069,11 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3029,21 +3081,21 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3059,12 +3111,12 @@ def build_create_or_update_function_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3073,23 +3125,23 @@ def build_create_or_update_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3104,10 +3156,11 @@ def build_delete_function_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3116,21 +3169,21 @@ def build_delete_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3142,10 +3195,11 @@ def build_list_function_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3153,21 +3207,21 @@ def build_list_function_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3179,10 +3233,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3190,21 +3245,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3215,31 +3270,32 @@ def build_list_host_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3250,31 +3306,32 @@ def build_list_sync_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3285,31 +3342,32 @@ def build_sync_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3325,12 +3383,12 @@ def build_create_or_update_host_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3339,23 +3397,23 @@ def build_create_or_update_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3370,10 +3428,11 @@ def build_delete_host_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3382,21 +3441,21 @@ def build_delete_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3407,31 +3466,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3443,10 +3503,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3454,21 +3515,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3483,12 +3544,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3496,23 +3557,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3526,10 +3587,11 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3537,21 +3599,21 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3564,10 +3626,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3576,21 +3639,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3606,12 +3669,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3620,23 +3683,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3651,10 +3714,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3663,21 +3727,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3693,12 +3757,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3707,23 +3771,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3736,31 +3800,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3771,31 +3836,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3807,10 +3873,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3818,21 +3885,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3847,12 +3914,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3860,23 +3927,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3890,10 +3957,11 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3901,21 +3969,21 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3930,12 +3998,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3943,23 +4011,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3972,31 +4040,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4008,10 +4077,11 @@ def build_get_instance_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4019,21 +4089,21 @@ def build_get_instance_info_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4045,10 +4115,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4056,21 +4127,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4085,12 +4156,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4098,23 +4169,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4128,10 +4199,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4139,21 +4211,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4165,10 +4237,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4176,21 +4249,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4203,10 +4276,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4215,21 +4289,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4242,10 +4316,11 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4254,21 +4329,21 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4281,10 +4356,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4293,21 +4369,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4320,10 +4396,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4332,21 +4409,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4360,10 +4437,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4373,21 +4451,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4400,10 +4478,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4412,21 +4491,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4437,31 +4516,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4472,31 +4552,32 @@ def build_list_site_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4507,31 +4588,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4546,36 +4628,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4591,35 +4673,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4632,31 +4714,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4667,31 +4750,32 @@ def build_get_swift_virtual_network_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4705,35 +4789,35 @@ def build_create_or_update_swift_virtual_network_connection_with_check_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4746,31 +4830,32 @@ def build_delete_swift_virtual_network_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4784,35 +4869,35 @@ def build_update_swift_virtual_network_connection_with_check_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4826,10 +4911,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4837,21 +4923,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4863,10 +4949,11 @@ def build_get_network_trace_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4874,21 +4961,21 @@ def build_get_network_trace_operation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4903,37 +4990,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4948,37 +5036,38 @@ def build_start_web_site_network_trace_operation_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4989,31 +5078,32 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5025,10 +5115,11 @@ def build_get_network_traces_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5036,21 +5127,21 @@ def build_get_network_traces_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5062,10 +5153,11 @@ def build_get_network_trace_operation_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5073,21 +5165,21 @@ def build_get_network_trace_operation_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5099,10 +5191,11 @@ def build_get_network_traces_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5110,21 +5203,21 @@ def build_get_network_traces_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5135,31 +5228,32 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5172,33 +5266,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5209,31 +5304,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5244,31 +5340,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5280,10 +5377,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5291,21 +5389,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5320,12 +5418,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5333,23 +5431,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5363,10 +5461,11 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5374,21 +5473,21 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5403,12 +5502,12 @@ def build_update_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5416,23 +5515,23 @@ def build_update_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5445,31 +5544,32 @@ def build_get_private_access_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5483,35 +5583,35 @@ def build_put_private_access_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5524,31 +5624,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5560,10 +5661,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5571,21 +5673,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5600,12 +5702,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5613,23 +5715,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5643,10 +5745,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5654,21 +5757,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5679,31 +5782,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5714,31 +5818,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5750,10 +5855,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5761,21 +5867,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5787,10 +5893,11 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5798,21 +5905,21 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5824,10 +5931,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5835,21 +5943,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5861,10 +5969,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5872,21 +5981,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5899,10 +6008,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5911,21 +6021,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5937,10 +6047,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5948,21 +6059,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5973,31 +6084,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6009,10 +6121,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6020,21 +6133,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6049,12 +6162,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6062,23 +6175,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6092,10 +6205,11 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6103,21 +6217,21 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6131,35 +6245,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6172,31 +6286,32 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6210,35 +6325,36 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6252,35 +6368,35 @@ def build_restore_from_backup_blob_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6296,35 +6412,35 @@ def build_restore_from_deleted_app_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6340,35 +6456,35 @@ def build_restore_snapshot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6381,31 +6497,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6417,10 +6534,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6428,21 +6546,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6454,10 +6572,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6465,21 +6584,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6491,10 +6610,11 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6502,21 +6622,21 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6527,31 +6647,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6563,10 +6684,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6574,21 +6696,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6603,12 +6725,12 @@ def build_create_or_update_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6616,23 +6738,23 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6649,10 +6771,11 @@ def build_delete_slot_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6660,25 +6783,25 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6693,12 +6816,12 @@ def build_update_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6706,23 +6829,23 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6738,10 +6861,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6749,23 +6873,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6780,12 +6904,12 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6793,23 +6917,23 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6826,12 +6950,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6839,23 +6963,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6869,10 +6993,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6880,21 +7005,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6907,10 +7032,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6919,21 +7045,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6946,10 +7072,11 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6958,21 +7085,21 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6988,12 +7115,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7002,23 +7129,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7036,12 +7163,12 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7050,23 +7177,23 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7080,10 +7207,11 @@ def build_list_basic_publishing_credentials_policies_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7091,21 +7219,21 @@ def build_list_basic_publishing_credentials_policies_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7117,10 +7245,11 @@ def build_get_ftp_allowed_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7128,21 +7257,21 @@ def build_get_ftp_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7157,12 +7286,12 @@ def build_update_ftp_allowed_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7170,23 +7299,23 @@ def build_update_ftp_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7200,10 +7329,11 @@ def build_get_scm_allowed_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7211,21 +7341,21 @@ def build_get_scm_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7240,12 +7370,12 @@ def build_update_scm_allowed_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7253,23 +7383,23 @@ def build_update_scm_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7283,10 +7413,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7294,21 +7425,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7323,12 +7454,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7336,23 +7467,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7366,10 +7497,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7377,21 +7509,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7406,12 +7538,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7419,23 +7551,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7449,10 +7581,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7460,21 +7593,21 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7489,12 +7622,12 @@ def build_update_auth_settings_v2_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7502,23 +7635,23 @@ def build_update_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7532,10 +7665,11 @@ def build_get_auth_settings_v2_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7543,21 +7677,21 @@ def build_get_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7572,12 +7706,12 @@ def build_update_azure_storage_accounts_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7585,23 +7719,23 @@ def build_update_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7615,10 +7749,11 @@ def build_list_azure_storage_accounts_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7626,21 +7761,21 @@ def build_list_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7655,12 +7790,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7668,23 +7803,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7698,10 +7833,11 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7709,21 +7845,21 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7735,10 +7871,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7746,21 +7883,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7772,10 +7909,11 @@ def build_get_app_settings_key_vault_references_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7783,21 +7921,21 @@ def build_get_app_settings_key_vault_references_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7810,10 +7948,11 @@ def build_get_app_setting_key_vault_reference_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7822,21 +7961,21 @@ def build_get_app_setting_key_vault_reference_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7848,10 +7987,11 @@ def build_get_site_connection_string_key_vault_references_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7859,21 +7999,21 @@ def build_get_site_connection_string_key_vault_references_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7886,10 +8026,11 @@ def build_get_site_connection_string_key_vault_reference_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7898,21 +8039,21 @@ def build_get_site_connection_string_key_vault_reference_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7927,12 +8068,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7940,23 +8081,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7970,10 +8111,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7981,21 +8123,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8007,10 +8149,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8018,21 +8161,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8047,12 +8190,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8060,23 +8203,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8093,12 +8236,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8106,23 +8249,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8136,10 +8279,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8147,21 +8291,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8173,10 +8317,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8184,21 +8329,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8213,12 +8358,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8226,23 +8371,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8256,10 +8401,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8267,21 +8413,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8293,10 +8439,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8304,21 +8451,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8333,12 +8480,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8346,23 +8493,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8379,12 +8526,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8392,23 +8539,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8422,10 +8569,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8433,21 +8581,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8460,10 +8608,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8472,21 +8621,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8499,10 +8648,11 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8511,21 +8661,21 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8537,10 +8687,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8548,21 +8699,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8574,10 +8725,11 @@ def build_get_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8585,21 +8737,21 @@ def build_get_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8611,10 +8763,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8622,21 +8775,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8649,10 +8802,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8661,21 +8815,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8688,10 +8842,11 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8700,21 +8855,21 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8727,10 +8882,11 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8739,21 +8895,21 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8766,10 +8922,11 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8778,21 +8935,21 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8804,10 +8961,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8815,21 +8973,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8842,10 +9000,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8854,21 +9013,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8884,12 +9043,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8898,23 +9057,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8929,10 +9088,11 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8941,21 +9101,21 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8968,10 +9128,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8980,21 +9141,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9009,12 +9170,12 @@ def build_discover_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9022,23 +9183,23 @@ def build_discover_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9052,10 +9213,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9063,21 +9225,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9090,10 +9252,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9102,21 +9265,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9132,12 +9295,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9146,23 +9309,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9177,10 +9340,11 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9189,21 +9353,21 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9219,12 +9383,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9233,23 +9397,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9263,10 +9427,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9274,21 +9439,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9303,12 +9468,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9316,23 +9481,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9346,10 +9511,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9357,21 +9523,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9383,10 +9549,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9394,21 +9561,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9420,10 +9587,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9431,21 +9599,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9458,10 +9626,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9470,21 +9639,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9500,12 +9669,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9514,23 +9683,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9545,10 +9714,11 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9557,21 +9727,21 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9588,12 +9758,12 @@ def build_create_or_update_function_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9603,23 +9773,23 @@ def build_create_or_update_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9635,10 +9805,11 @@ def build_delete_function_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9648,21 +9819,21 @@ def build_delete_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9675,10 +9846,11 @@ def build_list_function_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9687,21 +9859,21 @@ def build_list_function_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9714,10 +9886,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9726,21 +9899,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9752,10 +9925,11 @@ def build_list_host_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9763,21 +9937,21 @@ def build_list_host_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9789,10 +9963,11 @@ def build_list_sync_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9800,21 +9975,21 @@ def build_list_sync_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9826,10 +10001,11 @@ def build_sync_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9837,21 +10013,21 @@ def build_sync_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9868,12 +10044,12 @@ def build_create_or_update_host_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9883,23 +10059,23 @@ def build_create_or_update_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9915,10 +10091,11 @@ def build_delete_host_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9928,21 +10105,21 @@ def build_delete_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9954,10 +10131,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9965,21 +10143,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9992,10 +10170,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10004,21 +10183,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10034,12 +10213,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10048,23 +10227,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10079,10 +10258,11 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10091,21 +10271,21 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10119,10 +10299,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10132,21 +10313,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10163,12 +10344,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10178,23 +10359,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10210,10 +10391,11 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10223,21 +10405,21 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10254,12 +10436,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10269,23 +10451,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10299,10 +10481,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10310,21 +10493,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10336,10 +10519,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10347,21 +10531,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10374,10 +10558,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10386,21 +10571,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10416,12 +10601,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10430,23 +10615,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10461,10 +10646,11 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10473,21 +10659,21 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10503,12 +10689,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10517,23 +10703,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10547,10 +10733,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10558,21 +10745,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10585,10 +10772,11 @@ def build_get_instance_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10597,21 +10785,21 @@ def build_get_instance_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10624,10 +10812,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10636,21 +10825,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10666,12 +10855,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10680,23 +10869,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10711,10 +10900,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10723,21 +10913,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10750,10 +10940,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10762,21 +10953,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10790,10 +10981,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10803,21 +10995,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10831,10 +11023,11 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10844,21 +11037,21 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10872,10 +11065,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10885,21 +11079,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10913,10 +11107,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10926,21 +11121,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10955,10 +11150,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10969,21 +11165,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10997,10 +11193,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11010,21 +11207,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11036,10 +11233,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11047,21 +11245,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11073,10 +11271,11 @@ def build_list_site_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11084,21 +11283,21 @@ def build_list_site_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11110,10 +11309,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11121,21 +11321,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11147,10 +11347,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11158,21 +11359,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11184,10 +11385,11 @@ def build_get_swift_virtual_network_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11195,21 +11397,21 @@ def build_get_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11224,12 +11426,12 @@ def build_create_or_update_swift_virtual_network_connection_with_check_slot_requ content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11237,23 +11439,23 @@ def build_create_or_update_swift_virtual_network_connection_with_check_slot_requ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11267,10 +11469,11 @@ def build_delete_swift_virtual_network_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11278,21 +11481,21 @@ def build_delete_swift_virtual_network_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11307,12 +11510,12 @@ def build_update_swift_virtual_network_connection_with_check_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11320,23 +11523,23 @@ def build_update_swift_virtual_network_connection_with_check_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11351,10 +11554,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11363,21 +11567,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11390,10 +11594,11 @@ def build_get_network_trace_operation_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11402,21 +11607,21 @@ def build_get_network_trace_operation_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11432,10 +11637,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11443,27 +11649,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11479,10 +11685,11 @@ def build_start_web_site_network_trace_operation_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11490,27 +11697,27 @@ def build_start_web_site_network_trace_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11522,10 +11729,11 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11533,21 +11741,21 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11560,10 +11768,11 @@ def build_get_network_traces_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11572,21 +11781,21 @@ def build_get_network_traces_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11599,10 +11808,11 @@ def build_get_network_trace_operation_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11611,21 +11821,21 @@ def build_get_network_trace_operation_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11638,10 +11848,11 @@ def build_get_network_traces_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11650,21 +11861,21 @@ def build_get_network_traces_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11676,10 +11887,11 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11687,21 +11899,21 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11715,10 +11927,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11726,23 +11939,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11754,10 +11967,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11765,21 +11979,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11791,10 +12005,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11802,21 +12017,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11829,10 +12044,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11841,21 +12057,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11871,12 +12087,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11885,23 +12101,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11916,10 +12132,11 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11928,21 +12145,21 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11958,12 +12175,12 @@ def build_update_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11972,23 +12189,23 @@ def build_update_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12002,10 +12219,11 @@ def build_get_private_access_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12013,21 +12231,21 @@ def build_get_private_access_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12042,12 +12260,12 @@ def build_put_private_access_vnet_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12055,23 +12273,23 @@ def build_put_private_access_vnet_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12085,10 +12303,11 @@ def build_get_private_endpoint_connection_list_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12096,21 +12315,21 @@ def build_get_private_endpoint_connection_list_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12123,10 +12342,11 @@ def build_get_private_endpoint_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12135,21 +12355,21 @@ def build_get_private_endpoint_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12165,12 +12385,12 @@ def build_approve_or_reject_private_endpoint_connection_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12179,23 +12399,23 @@ def build_approve_or_reject_private_endpoint_connection_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12210,10 +12430,11 @@ def build_delete_private_endpoint_connection_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12222,21 +12443,21 @@ def build_delete_private_endpoint_connection_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12248,10 +12469,11 @@ def build_get_private_link_resources_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12259,21 +12481,21 @@ def build_get_private_link_resources_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12285,10 +12507,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12296,21 +12519,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12323,10 +12546,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12335,21 +12559,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12362,10 +12586,11 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12374,21 +12599,21 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12401,10 +12626,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12413,21 +12639,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12440,10 +12666,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12452,21 +12679,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12480,10 +12707,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12493,21 +12721,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12520,10 +12748,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12532,21 +12761,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12558,10 +12787,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12569,21 +12799,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12596,10 +12826,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12608,21 +12839,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12638,12 +12869,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12652,23 +12883,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12683,10 +12914,11 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12695,21 +12927,21 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12724,12 +12956,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12737,23 +12969,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12767,10 +12999,11 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12778,21 +13011,21 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12807,10 +13040,11 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12818,25 +13052,25 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12851,12 +13085,12 @@ def build_restore_from_backup_blob_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12864,23 +13098,23 @@ def build_restore_from_backup_blob_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12897,12 +13131,12 @@ def build_restore_from_deleted_app_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12910,23 +13144,23 @@ def build_restore_from_deleted_app_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12943,12 +13177,12 @@ def build_restore_snapshot_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12956,23 +13190,23 @@ def build_restore_snapshot_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12986,10 +13220,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12997,21 +13232,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13024,10 +13259,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13036,21 +13272,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13063,10 +13299,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13075,21 +13312,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13102,10 +13339,11 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13114,21 +13352,21 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13143,12 +13381,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13156,23 +13394,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13189,12 +13427,12 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13202,23 +13440,23 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13232,10 +13470,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13243,21 +13482,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13269,10 +13508,11 @@ def build_list_snapshots_from_dr_secondary_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13280,21 +13520,21 @@ def build_list_snapshots_from_dr_secondary_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13306,10 +13546,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13317,21 +13558,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13346,12 +13587,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13359,23 +13600,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13391,10 +13632,11 @@ def build_delete_source_control_slot_request( additional_flags: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13402,23 +13644,23 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if additional_flags is not None: - query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13433,12 +13675,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13446,23 +13688,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13476,10 +13718,11 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13487,21 +13730,21 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13517,10 +13760,11 @@ def build_start_network_trace_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13528,27 +13772,27 @@ def build_start_network_trace_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13560,10 +13804,11 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13571,21 +13816,21 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13597,10 +13842,11 @@ def build_stop_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13608,21 +13854,21 @@ def build_stop_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13634,10 +13880,11 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13645,21 +13892,21 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13671,10 +13918,11 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13682,21 +13930,21 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13708,10 +13956,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13719,21 +13968,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13746,10 +13995,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13758,21 +14008,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13785,10 +14035,11 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13797,21 +14048,21 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13824,10 +14075,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13836,21 +14088,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13864,10 +14116,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13877,21 +14130,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13904,10 +14157,11 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13916,21 +14170,21 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13944,10 +14198,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13955,23 +14210,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13983,10 +14238,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13994,21 +14250,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14021,10 +14277,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14033,21 +14290,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14063,12 +14320,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14077,23 +14334,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14108,10 +14365,11 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14120,21 +14378,21 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14150,12 +14408,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14164,23 +14422,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14196,10 +14454,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14209,21 +14468,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14240,12 +14499,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14255,23 +14514,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14290,12 +14549,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14305,23 +14564,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14335,10 +14594,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14346,21 +14606,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14373,10 +14633,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14385,21 +14646,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14413,35 +14674,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14457,35 +14718,35 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14498,31 +14759,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14533,31 +14795,32 @@ def build_list_snapshots_from_dr_secondary_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14568,31 +14831,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14606,35 +14870,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14649,33 +14913,34 @@ def build_delete_source_control_request( additional_flags: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if additional_flags is not None: - query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14689,35 +14954,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14730,31 +14995,32 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14769,37 +15035,38 @@ def build_start_network_trace_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14810,31 +15077,32 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14845,31 +15113,32 @@ def build_stop_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14880,31 +15149,32 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14915,31 +15185,32 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14950,31 +15221,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14986,10 +15258,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14997,21 +15270,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15023,10 +15296,11 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15034,21 +15308,21 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15060,10 +15334,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15071,21 +15346,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15098,10 +15373,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15110,21 +15386,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15136,10 +15412,11 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15147,21 +15424,21 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15174,33 +15451,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15211,31 +15489,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15247,10 +15526,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15258,21 +15538,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15287,12 +15567,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15300,23 +15580,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15330,10 +15610,11 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15341,21 +15622,21 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15370,12 +15651,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15383,23 +15664,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15414,10 +15695,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15426,21 +15708,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15456,12 +15738,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15470,23 +15752,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15504,12 +15786,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15518,23 +15800,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15547,31 +15829,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15583,10 +15866,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15594,25 +15878,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -15641,13 +15925,15 @@ def list( ) -> Iterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15658,6 +15944,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -15667,6 +15954,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15684,7 +15972,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15698,7 +15990,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -15709,7 +16001,7 @@ def list_by_resource_group( ) -> Iterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -15721,6 +16013,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15732,6 +16026,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -15743,6 +16038,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -15761,7 +16057,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15775,7 +16075,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -15786,7 +16086,7 @@ def get( ) -> "_models.Site": """Gets the details of a web, mobile, or API app. - Description for 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 @@ -15803,17 +16103,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15828,7 +16135,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -15844,6 +16151,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -15852,6 +16160,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -15859,7 +16168,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15877,7 +16190,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15891,8 +16204,8 @@ def begin_create_or_update( """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. + 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 @@ -15913,8 +16226,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -15926,6 +16240,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -15950,13 +16265,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15966,16 +16280,16 @@ def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -15988,11 +16302,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -16000,7 +16317,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16011,7 +16332,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -16025,8 +16346,8 @@ def update( """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. + 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 @@ -16046,6 +16367,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -16054,6 +16376,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -16061,7 +16384,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -16080,7 +16407,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -16093,13 +16420,13 @@ def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -16112,18 +16439,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16138,11 +16472,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16151,7 +16485,7 @@ def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -16170,6 +16504,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -16178,6 +16513,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -16185,7 +16521,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16196,7 +16536,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -16209,7 +16549,7 @@ def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -16229,6 +16569,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16237,6 +16578,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -16244,7 +16586,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16259,7 +16605,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -16271,7 +16617,7 @@ def list_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -16283,6 +16629,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16295,6 +16643,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -16306,6 +16655,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16323,7 +16673,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16337,7 +16691,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def get_backup_status( @@ -16349,7 +16703,7 @@ def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -16368,18 +16722,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16394,11 +16755,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16407,7 +16768,7 @@ def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -16426,18 +16787,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16448,7 +16816,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -16464,9 +16832,9 @@ def list_backup_status_secrets( 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. + 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 @@ -16487,6 +16855,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16496,6 +16865,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -16503,7 +16873,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16518,10 +16892,10 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - def _restore_initial( + def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16535,6 +16909,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -16544,6 +16919,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -16551,7 +16927,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -16561,11 +16941,11 @@ def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore( + def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16575,7 +16955,7 @@ def begin_restore( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -16597,8 +16977,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -16611,6 +16992,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16632,10 +17014,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_basic_publishing_credentials_policies( @@ -16646,8 +17027,7 @@ def list_basic_publishing_credentials_policies( ) -> Iterable["_models.PublishingCredentialsPoliciesCollection"]: """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. + 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 @@ -16660,6 +17040,8 @@ def list_basic_publishing_credentials_policies( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PublishingCredentialsPoliciesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublishingCredentialsPoliciesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16672,6 +17054,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) @@ -16683,6 +17066,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16700,7 +17084,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16714,7 +17102,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + list_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace def get_ftp_allowed( @@ -16725,7 +17113,7 @@ def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -16742,17 +17130,24 @@ def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16767,7 +17162,7 @@ def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16780,7 +17175,7 @@ def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -16800,6 +17195,7 @@ def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16808,6 +17204,7 @@ def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -16815,7 +17212,11 @@ def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16830,7 +17231,7 @@ def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16842,7 +17243,7 @@ def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -16859,17 +17260,24 @@ def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16884,7 +17292,7 @@ def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16897,7 +17305,7 @@ def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -16917,6 +17325,7 @@ def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16925,6 +17334,7 @@ def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -16932,7 +17342,11 @@ def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16947,7 +17361,7 @@ def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -16959,7 +17373,7 @@ def list_configurations( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -16972,6 +17386,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16984,6 +17400,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -16995,6 +17412,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17012,7 +17430,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17026,7 +17448,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -17038,7 +17460,7 @@ def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -17057,6 +17479,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -17065,6 +17488,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -17072,7 +17496,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17087,7 +17515,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -17099,7 +17527,7 @@ def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -17116,17 +17544,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17141,7 +17576,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -17154,7 +17589,7 @@ def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -17173,6 +17608,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -17181,6 +17617,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -17188,7 +17625,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17203,7 +17644,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -17215,7 +17656,7 @@ def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -17232,17 +17673,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17257,7 +17705,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -17270,8 +17718,7 @@ def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -17290,6 +17737,7 @@ def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -17298,6 +17746,7 @@ def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -17305,7 +17754,11 @@ def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17320,7 +17773,7 @@ def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -17332,7 +17785,7 @@ def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -17349,17 +17802,24 @@ def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17374,7 +17834,7 @@ def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -17387,7 +17847,7 @@ def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -17407,6 +17867,7 @@ def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -17415,6 +17876,7 @@ def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -17422,7 +17884,11 @@ def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17437,7 +17903,7 @@ def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -17449,7 +17915,7 @@ def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -17466,17 +17932,24 @@ def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17491,7 +17964,7 @@ def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -17504,7 +17977,7 @@ def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -17523,6 +17996,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -17531,6 +18005,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -17538,7 +18013,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17553,11 +18032,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17565,7 +18044,7 @@ def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -17582,17 +18061,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17603,7 +18089,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -17615,7 +18101,7 @@ def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -17632,17 +18118,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17657,7 +18150,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -17669,7 +18162,7 @@ def get_app_settings_key_vault_references( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -17682,6 +18175,8 @@ def get_app_settings_key_vault_references( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17694,6 +18189,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -17705,6 +18201,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17722,7 +18219,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17736,7 +18237,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace def get_app_setting_key_vault_reference( @@ -17748,7 +18249,7 @@ def get_app_setting_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -17767,18 +18268,25 @@ def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17793,7 +18301,7 @@ def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -17805,7 +18313,7 @@ def get_site_connection_string_key_vault_references( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -17818,6 +18326,8 @@ def get_site_connection_string_key_vault_references( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17830,6 +18340,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -17841,6 +18352,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17858,7 +18370,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17872,7 +18388,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace def get_site_connection_string_key_vault_reference( @@ -17884,7 +18400,7 @@ def get_site_connection_string_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -17903,18 +18419,25 @@ def get_site_connection_string_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_connection_string_key_vault_reference_request( resource_group_name=resource_group_name, name=name, connection_string_key=connection_string_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17929,7 +18452,7 @@ def get_site_connection_string_key_vault_reference( return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace @@ -17942,7 +18465,7 @@ def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -17961,6 +18484,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -17969,6 +18493,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -17976,7 +18501,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17991,7 +18520,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -18003,7 +18532,7 @@ def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -18020,17 +18549,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18045,7 +18581,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -18057,7 +18593,7 @@ def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -18074,17 +18610,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18099,7 +18642,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -18112,7 +18655,7 @@ def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -18132,6 +18675,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -18140,6 +18684,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -18147,7 +18692,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18162,7 +18711,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -18175,7 +18724,7 @@ def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -18194,6 +18743,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -18202,6 +18752,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -18209,7 +18760,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18224,7 +18779,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -18236,7 +18791,7 @@ def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -18253,17 +18808,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18278,7 +18840,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -18293,17 +18855,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18317,7 +18886,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -18329,7 +18898,7 @@ def begin_list_publishing_credentials( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -18347,7 +18916,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -18358,6 +18928,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -18381,10 +18952,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -18396,7 +18966,7 @@ def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -18415,6 +18985,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -18423,6 +18994,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -18430,7 +19002,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18445,7 +19021,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -18457,7 +19033,7 @@ def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -18474,17 +19050,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18499,7 +19082,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -18511,8 +19094,7 @@ def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -18529,17 +19111,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18554,7 +19143,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -18568,8 +19157,8 @@ def update_slot_configuration_names( """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. + 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 @@ -18588,6 +19177,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -18596,6 +19186,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -18603,7 +19194,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18618,7 +19213,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -18631,8 +19226,8 @@ def get_configuration( """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. + 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 @@ -18649,17 +19244,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18674,7 +19276,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18687,7 +19289,7 @@ def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -18706,6 +19308,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -18714,6 +19317,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -18721,7 +19325,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18736,7 +19344,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18749,7 +19357,7 @@ def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -18768,6 +19376,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -18776,6 +19385,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -18783,7 +19393,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18798,7 +19412,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18811,8 +19425,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -18825,6 +19439,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18837,6 +19453,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -18848,6 +19465,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18865,7 +19483,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18879,7 +19501,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -18891,7 +19513,7 @@ def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -18910,18 +19532,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18936,11 +19565,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18949,7 +19578,7 @@ def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -18968,18 +19597,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18990,7 +19626,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -19002,7 +19638,7 @@ def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -19019,17 +19655,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19045,7 +19688,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -19057,7 +19700,7 @@ def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -19074,17 +19717,24 @@ def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19100,7 +19750,7 @@ def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -19112,7 +19762,7 @@ def list_continuous_web_jobs( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -19125,6 +19775,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19137,6 +19789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -19148,6 +19801,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19165,7 +19819,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19179,7 +19837,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -19191,7 +19849,7 @@ def get_continuous_web_job( ) -> "_models.ContinuousWebJob": """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -19210,18 +19868,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19236,11 +19901,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19249,7 +19914,7 @@ def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -19268,18 +19933,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19290,11 +19962,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19303,7 +19975,7 @@ def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -19322,18 +19994,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19344,11 +20023,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19357,7 +20036,7 @@ def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -19376,18 +20055,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19398,7 +20084,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -19410,7 +20096,7 @@ def list_deployments( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -19422,6 +20108,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19434,6 +20122,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -19445,6 +20134,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19462,7 +20152,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19476,7 +20170,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -19488,7 +20182,7 @@ def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -19507,18 +20201,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19533,7 +20234,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -19547,7 +20248,7 @@ def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -19568,6 +20269,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -19577,6 +20279,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -19584,7 +20287,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19599,11 +20306,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19612,7 +20319,7 @@ def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -19631,18 +20338,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19653,7 +20367,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -19666,7 +20380,7 @@ def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -19686,18 +20400,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19712,7 +20433,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -19726,8 +20447,8 @@ def discover_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. - 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. + 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 @@ -19747,6 +20468,7 @@ def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -19755,6 +20477,7 @@ def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -19762,7 +20485,11 @@ def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19777,7 +20504,7 @@ def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -19789,7 +20516,7 @@ def list_domain_ownership_identifiers( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -19801,6 +20528,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19813,6 +20542,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -19824,6 +20554,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19841,7 +20572,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19855,7 +20590,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -19867,7 +20602,7 @@ def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -19886,18 +20621,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19912,7 +20654,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -19926,8 +20668,7 @@ def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -19948,6 +20689,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -19957,6 +20699,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -19964,7 +20707,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19979,11 +20726,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19992,7 +20739,7 @@ def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -20011,18 +20758,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20033,7 +20787,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -20047,8 +20801,7 @@ def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -20069,6 +20822,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -20078,6 +20832,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -20085,7 +20840,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20100,7 +20859,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -20112,7 +20871,7 @@ def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -20129,17 +20888,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20154,7 +20920,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -20170,6 +20936,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -20178,6 +20945,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -20185,7 +20953,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -20199,7 +20971,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -20212,7 +20984,7 @@ def begin_create_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -20233,8 +21005,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -20246,6 +21019,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20270,10 +21044,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -20284,7 +21057,7 @@ def get_ms_deploy_log( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -20301,17 +21074,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20326,7 +21106,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -20338,7 +21118,7 @@ def list_functions( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -20351,6 +21131,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20363,6 +21145,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -20374,6 +21157,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20391,7 +21175,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20405,7 +21193,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -20416,7 +21204,7 @@ def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -20433,17 +21221,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20458,7 +21253,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -20471,7 +21266,7 @@ def get_function( ) -> "_models.FunctionEnvelope": """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -20490,18 +21285,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20516,7 +21318,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -20533,6 +21335,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -20542,6 +21345,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -20549,7 +21353,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -20563,7 +21371,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -20577,7 +21385,7 @@ def begin_create_function( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -20600,8 +21408,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -20614,6 +21423,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20638,13 +21448,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20653,7 +21462,7 @@ def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -20672,18 +21481,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20694,7 +21510,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -20709,7 +21525,7 @@ def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -20732,6 +21548,7 @@ def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -20742,6 +21559,7 @@ def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -20749,7 +21567,11 @@ def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -20768,11 +21590,11 @@ def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret( + def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20782,7 +21604,7 @@ def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -20803,6 +21625,8 @@ def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -20810,12 +21634,17 @@ def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20826,7 +21655,7 @@ def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -20839,7 +21668,7 @@ def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -20858,18 +21687,25 @@ def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20884,7 +21720,7 @@ def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -20897,7 +21733,7 @@ def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -20916,18 +21752,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20942,7 +21785,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -20954,7 +21797,7 @@ def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -20971,17 +21814,24 @@ def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20996,11 +21846,11 @@ def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status( + def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21008,7 +21858,7 @@ def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -21025,17 +21875,24 @@ def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21046,11 +21903,11 @@ def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions( + def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21058,7 +21915,7 @@ def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -21075,17 +21932,24 @@ def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21096,7 +21960,7 @@ def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace @@ -21111,7 +21975,7 @@ def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -21134,6 +21998,7 @@ def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -21144,6 +22009,7 @@ def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -21151,7 +22017,11 @@ def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -21170,11 +22040,11 @@ def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret( + def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21184,7 +22054,7 @@ def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -21205,6 +22075,8 @@ def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -21212,12 +22084,17 @@ def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21228,7 +22105,7 @@ def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -21240,7 +22117,7 @@ def list_host_name_bindings( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -21253,6 +22130,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21265,6 +22144,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -21276,6 +22156,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21293,7 +22174,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21307,7 +22192,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -21319,7 +22204,7 @@ def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -21338,18 +22223,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21364,7 +22256,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -21378,7 +22270,7 @@ def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -21400,6 +22292,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -21409,6 +22302,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -21416,7 +22310,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21431,11 +22329,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21444,7 +22342,7 @@ def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -21463,18 +22361,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -21485,7 +22390,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -21499,7 +22404,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -21520,6 +22425,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -21527,12 +22434,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21547,7 +22459,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21562,7 +22474,7 @@ def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -21585,6 +22497,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -21595,6 +22508,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -21602,7 +22516,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21617,11 +22535,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21631,7 +22549,7 @@ def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -21652,6 +22570,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -21659,12 +22579,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21675,7 +22600,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21690,7 +22615,7 @@ def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -21713,6 +22638,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -21723,6 +22649,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -21730,7 +22657,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21745,7 +22676,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21757,7 +22688,7 @@ def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -21774,17 +22705,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21799,7 +22737,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -21811,8 +22749,7 @@ def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -21829,17 +22766,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21854,7 +22798,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -21867,7 +22811,7 @@ def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -21886,18 +22830,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21912,7 +22863,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -21926,8 +22877,7 @@ def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -21948,6 +22898,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -21957,6 +22908,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -21964,7 +22916,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21979,11 +22935,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21992,7 +22948,7 @@ def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -22011,18 +22967,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22033,7 +22996,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -22047,8 +23010,7 @@ def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -22069,6 +23031,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -22078,6 +23041,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -22085,7 +23049,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22100,7 +23068,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -22112,7 +23080,7 @@ def list_instance_identifiers( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -22125,6 +23093,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22137,6 +23107,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -22148,6 +23119,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22165,7 +23137,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22179,7 +23155,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_info( @@ -22191,7 +23167,7 @@ def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -22210,18 +23186,25 @@ def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22236,7 +23219,7 @@ def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -22249,7 +23232,7 @@ def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -22268,18 +23251,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22294,7 +23284,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -22311,6 +23301,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -22320,6 +23311,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -22327,7 +23319,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -22341,7 +23337,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -22355,7 +23351,7 @@ def begin_create_instance_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -22378,8 +23374,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -22392,6 +23389,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22416,10 +23414,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -22431,7 +23428,7 @@ def get_instance_ms_deploy_log( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -22450,18 +23447,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22476,7 +23480,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -22490,8 +23494,8 @@ def list_instance_processes( """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. + 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 @@ -22506,6 +23510,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22519,6 +23525,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -22531,6 +23538,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22548,7 +23556,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22562,7 +23574,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -22575,8 +23587,7 @@ def get_instance_process( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -22598,6 +23609,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -22605,12 +23618,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22625,11 +23643,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22640,8 +23658,8 @@ def delete_instance_process( """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. + 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 @@ -22663,6 +23681,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -22670,12 +23690,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -22686,7 +23711,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -22700,8 +23725,7 @@ def get_instance_process_dump( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -22723,6 +23747,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -22730,12 +23756,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22750,7 +23781,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -22765,8 +23796,8 @@ def list_instance_process_modules( """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. + 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 @@ -22784,6 +23815,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22798,6 +23831,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -22811,6 +23845,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22828,7 +23863,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22842,7 +23881,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -22856,8 +23895,7 @@ def get_instance_process_module( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -22881,6 +23919,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -22889,12 +23929,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22909,7 +23954,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -22923,8 +23968,7 @@ def list_instance_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -22942,6 +23986,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22956,6 +24002,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -22969,6 +24016,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22986,7 +24034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23000,7 +24052,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable( @@ -23011,7 +24063,7 @@ def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -23028,17 +24080,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23053,7 +24112,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -23065,7 +24124,7 @@ def list_site_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -23077,6 +24136,8 @@ def list_site_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23089,6 +24150,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -23100,6 +24162,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23117,7 +24180,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23131,7 +24198,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers( @@ -23142,7 +24209,7 @@ def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -23159,17 +24226,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23184,7 +24258,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore def _migrate_storage_initial( @@ -23201,6 +24275,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -23209,6 +24284,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -23217,7 +24293,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23231,7 +24311,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -23245,7 +24325,7 @@ def begin_migrate_storage( ) -> LROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -23269,8 +24349,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -23283,6 +24364,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23307,10 +24389,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -23325,6 +24406,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -23333,6 +24415,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -23340,7 +24423,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23354,7 +24441,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -23367,7 +24454,7 @@ def begin_migrate_my_sql( ) -> LROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -23387,8 +24474,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -23400,6 +24488,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23424,10 +24513,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -23439,8 +24527,8 @@ def get_migrate_my_sql_status( """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. + 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 @@ -23457,17 +24545,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23482,7 +24577,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -23494,7 +24589,7 @@ def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -23511,17 +24606,24 @@ def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23536,7 +24638,7 @@ def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23552,9 +24654,9 @@ def create_or_update_swift_virtual_network_connection_with_check( 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 + 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. @@ -23574,6 +24676,7 @@ def create_or_update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -23582,6 +24685,7 @@ def create_or_update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check.metadata['url'], @@ -23589,7 +24693,11 @@ def create_or_update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23604,11 +24712,11 @@ def create_or_update_swift_virtual_network_connection_with_check( return deserialized - create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network( + def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23616,7 +24724,7 @@ def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -23633,17 +24741,24 @@ def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23654,7 +24769,7 @@ def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23670,9 +24785,9 @@ def update_swift_virtual_network_connection_with_check( 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 + 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. @@ -23692,6 +24807,7 @@ def update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -23700,6 +24816,7 @@ def update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_with_check.metadata['url'], @@ -23707,7 +24824,11 @@ def update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23722,7 +24843,7 @@ def update_swift_virtual_network_connection_with_check( return deserialized - update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23735,7 +24856,7 @@ def list_network_features( ) -> "_models.NetworkFeatures": """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -23754,18 +24875,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23780,7 +24908,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -23793,8 +24921,7 @@ def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -23813,18 +24940,25 @@ def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23843,7 +24977,7 @@ def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -23858,17 +24992,17 @@ def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -23881,11 +25015,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23894,7 +25031,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23909,7 +25050,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_initial( @@ -23927,11 +25068,14 @@ def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23940,7 +25084,11 @@ def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23958,7 +25106,7 @@ def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -23973,17 +25121,17 @@ def begin_start_web_site_network_trace_operation( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23998,7 +25146,8 @@ def begin_start_web_site_network_trace_operation( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_01_15.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -24012,6 +25161,7 @@ def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -24035,13 +25185,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace( + def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24049,7 +25198,7 @@ def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -24066,17 +25215,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24087,7 +25243,7 @@ def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace @@ -24100,8 +25256,7 @@ def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24120,18 +25275,25 @@ def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24146,7 +25308,7 @@ def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -24159,8 +25321,7 @@ def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24179,18 +25340,25 @@ def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24209,7 +25377,7 @@ def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -24222,8 +25390,7 @@ def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24242,18 +25409,25 @@ def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24268,11 +25442,11 @@ def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24280,8 +25454,7 @@ def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -24298,17 +25471,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24319,7 +25499,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -24332,7 +25512,7 @@ def list_perf_mon_counters( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -24340,7 +25520,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -24349,6 +25529,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24361,6 +25543,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -24373,6 +25556,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24391,7 +25575,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24405,7 +25593,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -24416,7 +25604,7 @@ def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -24433,17 +25621,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24458,7 +25653,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -24470,7 +25665,7 @@ def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -24487,17 +25682,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24512,7 +25714,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -24525,7 +25727,7 @@ def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -24544,18 +25746,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24570,7 +25779,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24584,7 +25793,7 @@ def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -24605,6 +25814,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -24614,6 +25824,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -24621,7 +25832,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24636,11 +25851,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24649,7 +25864,7 @@ def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -24668,18 +25883,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24690,7 +25912,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24704,7 +25926,7 @@ def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -24725,6 +25947,7 @@ def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -24734,6 +25957,7 @@ def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -24741,7 +25965,11 @@ def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24756,7 +25984,7 @@ def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24769,8 +25997,8 @@ def get_private_access( """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. + 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 @@ -24787,17 +26015,24 @@ def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24812,7 +26047,7 @@ def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -24826,8 +26061,8 @@ def put_private_access_vnet( """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. + 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 @@ -24846,6 +26081,7 @@ def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -24854,6 +26090,7 @@ def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -24861,7 +26098,11 @@ def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24876,7 +26117,7 @@ def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -24888,7 +26129,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -24901,6 +26142,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24913,6 +26156,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -24924,6 +26168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24941,7 +26186,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24955,7 +26204,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -24967,7 +26216,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -24986,18 +26235,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25012,7 +26268,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -25029,6 +26285,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -25038,6 +26295,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -25045,7 +26303,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25063,7 +26325,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -25077,7 +26339,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -25102,8 +26364,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -25116,6 +26379,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25140,10 +26404,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -25158,18 +26421,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -25190,7 +26460,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -25203,7 +26473,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25223,7 +26493,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -25235,6 +26506,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25258,10 +26530,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -25272,7 +26543,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25289,17 +26560,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25314,7 +26592,7 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -25327,8 +26605,8 @@ def list_processes( """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. + 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 @@ -25340,6 +26618,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25352,6 +26632,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -25363,6 +26644,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25380,7 +26662,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25394,7 +26680,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -25406,8 +26692,7 @@ def get_process( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -25426,18 +26711,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25452,11 +26744,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25466,8 +26758,8 @@ def delete_process( """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. + 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 @@ -25486,18 +26778,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -25508,7 +26807,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -25521,8 +26820,7 @@ def get_process_dump( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -25541,18 +26839,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25567,7 +26872,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -25581,8 +26886,8 @@ def list_process_modules( """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. + 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 @@ -25597,6 +26902,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25610,6 +26917,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -25622,6 +26930,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25639,7 +26948,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25653,7 +26966,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -25666,8 +26979,7 @@ def get_process_module( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -25688,6 +27000,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -25695,12 +27009,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25715,7 +27034,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -25728,8 +27047,7 @@ def list_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -25744,6 +27062,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25757,6 +27077,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -25769,6 +27090,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25786,7 +27108,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25800,7 +27126,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -25811,7 +27137,7 @@ def list_public_certificates( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -25824,6 +27150,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25836,6 +27164,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -25847,6 +27176,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25864,7 +27194,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25878,7 +27212,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -25890,7 +27224,7 @@ def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -25909,18 +27243,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25935,7 +27276,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -25949,7 +27290,7 @@ def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -25971,6 +27312,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -25980,6 +27322,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -25987,7 +27330,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26002,11 +27349,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26015,7 +27362,7 @@ def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -26034,18 +27381,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -26056,7 +27410,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -26069,7 +27423,7 @@ def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -26090,6 +27444,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -26098,6 +27453,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -26105,7 +27461,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26120,11 +27480,11 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26133,8 +27493,8 @@ def reset_production_slot_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. + 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 @@ -26151,17 +27511,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26172,11 +27539,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26186,17 +27553,18 @@ def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -26209,11 +27577,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -26221,7 +27592,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26232,10 +27607,10 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - def _restore_from_backup_blob_initial( + def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26248,6 +27623,7 @@ def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -26256,6 +27632,7 @@ def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -26263,7 +27640,11 @@ def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26273,11 +27654,11 @@ def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob( + def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26286,7 +27667,7 @@ def begin_restore_from_backup_blob( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -26306,8 +27687,9 @@ def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26319,6 +27701,7 @@ def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26340,12 +27723,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_initial( + def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26358,6 +27740,7 @@ def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -26366,6 +27749,7 @@ def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -26373,7 +27757,11 @@ def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26383,11 +27771,11 @@ def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app( + def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26396,7 +27784,7 @@ def begin_restore_from_deleted_app( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -26416,8 +27804,9 @@ def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26429,6 +27818,7 @@ def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26450,12 +27840,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_initial( + def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26468,6 +27857,7 @@ def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -26476,6 +27866,7 @@ def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -26483,7 +27874,11 @@ def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26493,11 +27888,11 @@ def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot( + def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26506,7 +27901,7 @@ def begin_restore_snapshot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -26527,8 +27922,9 @@ def begin_restore_snapshot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26540,6 +27936,7 @@ def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26561,10 +27958,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -26575,7 +27971,7 @@ def list_site_extensions( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -26588,6 +27984,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26600,6 +27998,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -26611,6 +28010,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26628,7 +28028,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26642,7 +28046,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -26654,7 +28058,7 @@ def get_site_extension( ) -> "_models.SiteExtensionInfo": """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -26673,18 +28077,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26699,7 +28110,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -26715,18 +28126,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -26744,7 +28162,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -26757,7 +28175,7 @@ def begin_install_site_extension( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -26778,7 +28196,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -26790,6 +28209,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -26813,13 +28233,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26828,7 +28247,7 @@ def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -26847,18 +28266,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -26869,7 +28295,7 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -26881,7 +28307,7 @@ def list_slots( ) -> Iterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -26892,6 +28318,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26904,6 +28332,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -26915,6 +28344,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26932,7 +28362,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26946,7 +28380,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -26958,7 +28392,7 @@ def get_slot( ) -> "_models.Site": """Gets the details of a web, mobile, or API app. - Description for 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 @@ -26977,18 +28411,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27003,7 +28444,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -27020,6 +28461,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -27029,6 +28471,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -27036,7 +28479,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27054,7 +28501,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27069,8 +28516,8 @@ def begin_create_or_update_slot( """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. + 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 @@ -27094,8 +28541,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -27108,6 +28556,7 @@ def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -27132,13 +28581,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27149,7 +28597,7 @@ def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -27158,10 +28606,10 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -27174,12 +28622,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -27187,7 +28638,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -27198,7 +28653,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27213,8 +28668,8 @@ def update_slot( """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. + 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 @@ -27237,6 +28692,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -27246,6 +28702,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -27253,7 +28710,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27272,7 +28733,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27286,7 +28747,7 @@ def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -27294,7 +28755,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -27307,19 +28768,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27334,11 +28802,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27348,7 +28816,7 @@ def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -27370,6 +28838,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -27379,6 +28848,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -27386,7 +28856,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27397,7 +28871,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -27411,7 +28885,7 @@ def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -27434,6 +28908,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27443,6 +28918,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -27450,7 +28926,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27465,7 +28945,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -27478,7 +28958,7 @@ def list_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -27493,6 +28973,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27506,6 +28988,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -27518,6 +29001,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27535,7 +29019,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27549,7 +29037,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def get_backup_status_slot( @@ -27562,7 +29050,7 @@ def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -27584,6 +29072,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -27591,12 +29081,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27611,11 +29106,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27625,7 +29120,7 @@ def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -27647,6 +29142,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -27654,12 +29151,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27670,7 +29172,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -27687,9 +29189,9 @@ def list_backup_status_secrets_slot( 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. + 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 @@ -27712,6 +29214,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27722,6 +29225,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -27729,7 +29233,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27744,10 +29252,10 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - def _restore_slot_initial( + def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27762,6 +29270,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -27772,6 +29281,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -27779,7 +29289,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27789,11 +29303,11 @@ def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore_slot( + def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27804,7 +29318,7 @@ def begin_restore_slot( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -27829,8 +29343,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -27844,6 +29359,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -27865,10 +29381,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_basic_publishing_credentials_policies_slot( @@ -27880,8 +29395,7 @@ def list_basic_publishing_credentials_policies_slot( ) -> Iterable["_models.PublishingCredentialsPoliciesCollection"]: """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. + 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 @@ -27896,6 +29410,8 @@ def list_basic_publishing_credentials_policies_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PublishingCredentialsPoliciesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublishingCredentialsPoliciesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27909,6 +29425,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_basic_publishing_credentials_policies_slot.metadata['url'], ) request = _convert_request(request) @@ -27921,6 +29438,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27938,7 +29456,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27952,7 +29474,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + list_basic_publishing_credentials_policies_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace def get_ftp_allowed_slot( @@ -27964,7 +29486,7 @@ def get_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -27983,18 +29505,25 @@ def get_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ftp_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28009,7 +29538,7 @@ def get_ftp_allowed_slot( return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -28023,7 +29552,7 @@ def update_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -28045,6 +29574,7 @@ def update_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -28054,6 +29584,7 @@ def update_ftp_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed_slot.metadata['url'], @@ -28061,7 +29592,11 @@ def update_ftp_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28076,7 +29611,7 @@ def update_ftp_allowed_slot( return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -28089,7 +29624,7 @@ def get_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -28108,18 +29643,25 @@ def get_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_scm_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28134,7 +29676,7 @@ def get_scm_allowed_slot( return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -28148,7 +29690,7 @@ def update_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -28170,6 +29712,7 @@ def update_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -28179,6 +29722,7 @@ def update_scm_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed_slot.metadata['url'], @@ -28186,7 +29730,11 @@ def update_scm_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28201,7 +29749,7 @@ def update_scm_allowed_slot( return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -28214,7 +29762,7 @@ def list_configurations_slot( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -28230,6 +29778,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28243,6 +29793,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -28255,6 +29806,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28272,7 +29824,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28286,7 +29842,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -28299,7 +29855,7 @@ def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -28321,6 +29877,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -28330,6 +29887,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -28337,7 +29895,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28352,7 +29914,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -28365,7 +29927,7 @@ def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -28385,18 +29947,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28411,7 +29980,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -28425,7 +29994,7 @@ def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -28446,6 +30015,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -28455,6 +30025,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -28462,7 +30033,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28477,7 +30052,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -28490,7 +30065,7 @@ def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -28510,18 +30085,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28536,7 +30118,7 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore @distributed_trace @@ -28550,8 +30132,7 @@ def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -28572,6 +30153,7 @@ def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -28581,6 +30163,7 @@ def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -28588,7 +30171,11 @@ def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28603,7 +30190,7 @@ def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -28616,7 +30203,7 @@ def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -28636,18 +30223,25 @@ def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28662,7 +30256,7 @@ def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -28676,7 +30270,7 @@ def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -28699,6 +30293,7 @@ def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -28708,6 +30303,7 @@ def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -28715,7 +30311,11 @@ def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28730,7 +30330,7 @@ def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -28743,7 +30343,7 @@ def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -28763,18 +30363,25 @@ def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28789,7 +30396,7 @@ def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -28803,7 +30410,7 @@ def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -28825,6 +30432,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -28834,6 +30442,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -28841,7 +30450,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28856,11 +30469,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28869,7 +30482,7 @@ def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -28889,18 +30502,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28911,7 +30531,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -28924,7 +30544,7 @@ def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -28944,18 +30564,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28970,7 +30597,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -28983,7 +30610,7 @@ def get_app_settings_key_vault_references_slot( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -28998,6 +30625,8 @@ def get_app_settings_key_vault_references_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29011,6 +30640,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -29023,6 +30653,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29040,7 +30671,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29054,7 +30689,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings"} # type: ignore @distributed_trace def get_app_setting_key_vault_reference_slot( @@ -29067,7 +30702,7 @@ def get_app_setting_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -29088,6 +30723,8 @@ def get_app_setting_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_app_setting_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -29095,12 +30732,17 @@ def get_app_setting_key_vault_reference_slot( app_setting_key=app_setting_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29115,7 +30757,7 @@ def get_app_setting_key_vault_reference_slot( return deserialized - get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -29128,7 +30770,7 @@ def get_site_connection_string_key_vault_references_slot( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -29143,6 +30785,8 @@ def get_site_connection_string_key_vault_references_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29156,6 +30800,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -29168,6 +30813,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29185,7 +30831,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29199,7 +30849,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace def get_site_connection_string_key_vault_reference_slot( @@ -29212,7 +30862,7 @@ def get_site_connection_string_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -29233,6 +30883,8 @@ def get_site_connection_string_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_connection_string_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -29240,12 +30892,17 @@ def get_site_connection_string_key_vault_reference_slot( connection_string_key=connection_string_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29260,7 +30917,7 @@ def get_site_connection_string_key_vault_reference_slot( return deserialized - get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace @@ -29274,7 +30931,7 @@ def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -29296,6 +30953,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -29305,6 +30963,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -29312,7 +30971,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29327,7 +30990,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -29340,7 +31003,7 @@ def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -29360,18 +31023,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29386,7 +31056,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -29399,7 +31069,7 @@ def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -29419,18 +31089,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29445,7 +31122,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -29459,7 +31136,7 @@ def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -29482,6 +31159,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -29491,6 +31169,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -29498,7 +31177,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29513,7 +31196,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -29527,7 +31210,7 @@ def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -29549,6 +31232,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -29558,6 +31242,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -29565,7 +31250,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29580,7 +31269,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -29593,7 +31282,7 @@ def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -29613,18 +31302,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29639,7 +31335,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -29655,18 +31351,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29680,7 +31383,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -29693,7 +31396,7 @@ def begin_list_publishing_credentials_slot( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -29714,7 +31417,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -29726,6 +31430,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -29749,10 +31454,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -29765,7 +31469,7 @@ def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -29786,6 +31490,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -29795,6 +31500,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -29802,7 +31508,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29817,7 +31527,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -29830,7 +31540,7 @@ def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -29849,18 +31559,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29875,7 +31592,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -29889,8 +31606,8 @@ def get_configuration_slot( """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. + 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 @@ -29910,18 +31627,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29936,7 +31660,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -29950,7 +31674,7 @@ def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -29972,6 +31696,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -29981,6 +31706,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -29988,7 +31714,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30003,7 +31733,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -30017,7 +31747,7 @@ def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -30039,6 +31769,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -30048,6 +31779,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -30055,7 +31787,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30070,7 +31806,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -30084,8 +31820,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -30101,6 +31837,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30114,6 +31852,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -30126,6 +31865,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30143,7 +31883,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30157,7 +31901,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -30170,7 +31914,7 @@ def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -30192,6 +31936,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -30199,12 +31945,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30219,11 +31970,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30233,7 +31984,7 @@ def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -30255,6 +32006,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -30262,12 +32015,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30278,7 +32036,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -30291,7 +32049,7 @@ def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -30310,18 +32068,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30337,7 +32102,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -30350,7 +32115,7 @@ def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -30369,18 +32134,25 @@ def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30396,7 +32168,7 @@ def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -30409,7 +32181,7 @@ def list_continuous_web_jobs_slot( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -30425,6 +32197,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30438,6 +32212,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -30450,6 +32225,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30467,7 +32243,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30481,7 +32261,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -30494,7 +32274,7 @@ def get_continuous_web_job_slot( ) -> "_models.ContinuousWebJob": """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -30516,6 +32296,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30523,12 +32305,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30543,11 +32330,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30557,7 +32344,7 @@ def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -30579,6 +32366,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30586,12 +32375,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30602,11 +32396,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30616,7 +32410,7 @@ def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -30638,6 +32432,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30645,12 +32441,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30661,11 +32462,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30675,7 +32476,7 @@ def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -30697,6 +32498,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30704,12 +32507,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30720,7 +32528,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -30733,7 +32541,7 @@ def list_deployments_slot( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -30748,6 +32556,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30761,6 +32571,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -30773,6 +32584,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30790,7 +32602,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30804,7 +32620,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -30817,7 +32633,7 @@ def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -30839,6 +32655,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -30846,12 +32664,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30866,7 +32689,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -30881,7 +32704,7 @@ def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -30905,6 +32728,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -30915,6 +32739,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -30922,7 +32747,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30937,11 +32766,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30951,7 +32780,7 @@ def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -30973,6 +32802,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -30980,12 +32811,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30996,7 +32832,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -31010,7 +32846,7 @@ def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -31033,6 +32869,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -31040,12 +32878,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31060,7 +32903,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -31075,8 +32918,8 @@ def discover_backup_slot( """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. + 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 @@ -31099,6 +32942,7 @@ def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -31108,6 +32952,7 @@ def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -31115,7 +32960,11 @@ def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31130,7 +32979,7 @@ def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -31143,7 +32992,7 @@ def list_domain_ownership_identifiers_slot( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -31158,6 +33007,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31171,6 +33022,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -31183,6 +33035,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31200,7 +33053,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31214,7 +33071,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -31227,7 +33084,7 @@ def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -31249,6 +33106,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -31256,12 +33115,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31276,7 +33140,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31291,8 +33155,7 @@ def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -31316,6 +33179,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -31326,6 +33190,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -31333,7 +33198,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31348,11 +33217,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31362,7 +33231,7 @@ def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -31384,6 +33253,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -31391,12 +33262,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -31407,7 +33283,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31422,8 +33298,7 @@ def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -31447,6 +33322,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -31457,6 +33333,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -31464,7 +33341,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31479,7 +33360,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31492,7 +33373,7 @@ def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -31511,18 +33392,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31537,7 +33425,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -31554,6 +33442,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -31563,6 +33452,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -31570,7 +33460,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -31584,7 +33478,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -31598,7 +33492,7 @@ def begin_create_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -31621,8 +33515,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -31635,6 +33530,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -31659,10 +33555,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -31674,7 +33569,7 @@ def get_ms_deploy_log_slot( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -31693,18 +33588,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31719,7 +33621,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -31732,7 +33634,7 @@ def list_instance_functions_slot( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -31747,6 +33649,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31760,6 +33664,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -31772,6 +33677,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31789,7 +33695,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31803,7 +33713,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -31815,7 +33725,7 @@ def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -31834,18 +33744,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31860,7 +33777,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -31874,7 +33791,7 @@ def get_instance_function_slot( ) -> "_models.FunctionEnvelope": """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -31895,6 +33812,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -31902,12 +33821,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31922,7 +33846,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -31940,6 +33864,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -31950,6 +33875,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -31957,7 +33883,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -31971,7 +33901,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -31986,7 +33916,7 @@ def begin_create_instance_function_slot( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -32011,8 +33941,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -32026,6 +33957,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -32050,13 +33982,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32066,7 +33997,7 @@ def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -32087,6 +34018,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -32094,12 +34027,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32110,7 +34048,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -32126,7 +34064,7 @@ def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -32151,6 +34089,7 @@ def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -32162,6 +34101,7 @@ def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -32169,7 +34109,11 @@ def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -32188,11 +34132,11 @@ def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret_slot( + def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32203,7 +34147,7 @@ def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -32226,6 +34170,8 @@ def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -32234,12 +34180,17 @@ def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32250,7 +34201,7 @@ def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -32264,7 +34215,7 @@ def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -32285,6 +34236,8 @@ def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -32292,12 +34245,17 @@ def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32312,7 +34270,7 @@ def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -32326,7 +34284,7 @@ def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -32347,6 +34305,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -32354,12 +34314,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32374,7 +34339,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -32387,7 +34352,7 @@ def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -32406,18 +34371,25 @@ def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32432,11 +34404,11 @@ def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status_slot( + def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32445,7 +34417,7 @@ def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -32464,18 +34436,25 @@ def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32486,11 +34465,11 @@ def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions_slot( + def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32499,7 +34478,7 @@ def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -32518,18 +34497,25 @@ def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32540,7 +34526,7 @@ def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace @@ -32556,7 +34542,7 @@ def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -32581,6 +34567,7 @@ def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -32592,6 +34579,7 @@ def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -32599,7 +34587,11 @@ def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -32618,11 +34610,11 @@ def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret_slot( + def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32633,7 +34625,7 @@ def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -32656,6 +34648,8 @@ def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -32664,12 +34658,17 @@ def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32680,7 +34679,7 @@ def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -32693,7 +34692,7 @@ def list_host_name_bindings_slot( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -32709,6 +34708,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32722,6 +34723,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -32734,6 +34736,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32751,7 +34754,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32765,7 +34772,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -32778,7 +34785,7 @@ def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -32800,6 +34807,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -32807,12 +34816,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32827,7 +34841,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -32842,7 +34856,7 @@ def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -32867,6 +34881,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -32877,6 +34892,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -32884,7 +34900,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32899,11 +34919,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32913,7 +34933,7 @@ def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -32935,6 +34955,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -32942,12 +34964,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -32958,7 +34985,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -32973,7 +35000,7 @@ def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -32996,6 +35023,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -33004,12 +35033,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33024,7 +35058,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -33040,7 +35074,7 @@ def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -33065,6 +35099,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -33076,6 +35111,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -33083,7 +35119,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33098,11 +35138,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33113,7 +35153,7 @@ def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -33136,6 +35176,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -33144,12 +35186,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33160,7 +35207,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -33176,7 +35223,7 @@ def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -33201,6 +35248,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -33212,6 +35260,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -33219,7 +35268,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33234,7 +35287,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -33247,7 +35300,7 @@ def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -33266,18 +35319,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33292,7 +35352,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -33305,8 +35365,7 @@ def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -33326,18 +35385,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33352,7 +35418,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -33366,7 +35432,7 @@ def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -33388,6 +35454,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -33395,12 +35463,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33415,7 +35488,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33430,8 +35503,7 @@ def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -33455,6 +35527,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -33465,6 +35538,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -33472,7 +35546,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33487,11 +35565,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33501,7 +35579,7 @@ def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -33523,6 +35601,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -33530,12 +35610,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33546,7 +35631,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33561,8 +35646,7 @@ def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -33586,6 +35670,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -33596,6 +35681,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -33603,7 +35689,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33618,7 +35708,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33631,7 +35721,7 @@ def list_instance_identifiers_slot( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -33647,6 +35737,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33660,6 +35752,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -33672,6 +35765,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33689,7 +35783,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33703,7 +35801,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_info_slot( @@ -33716,7 +35814,7 @@ def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -33738,6 +35836,8 @@ def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -33745,12 +35845,17 @@ def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33765,7 +35870,7 @@ def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -33779,7 +35884,7 @@ def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -33800,6 +35905,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -33807,12 +35914,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33827,7 +35939,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -33845,6 +35957,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -33855,6 +35968,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -33862,7 +35976,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -33876,7 +35994,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -33891,7 +36009,7 @@ def begin_create_instance_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -33916,8 +36034,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -33931,6 +36050,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -33955,10 +36075,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -33971,7 +36090,7 @@ def get_instance_ms_deploy_log_slot( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -33992,6 +36111,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -33999,12 +36120,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34019,7 +36145,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -34034,8 +36160,8 @@ def list_instance_processes_slot( """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. + 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 @@ -34053,6 +36179,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34067,6 +36195,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -34080,6 +36209,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34097,7 +36227,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34111,7 +36245,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -34125,8 +36259,7 @@ def get_instance_process_slot( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34151,6 +36284,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -34159,12 +36294,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34179,11 +36319,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34195,8 +36335,8 @@ def delete_instance_process_slot( """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. + 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 @@ -34221,6 +36361,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -34229,12 +36371,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -34245,7 +36392,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -34260,8 +36407,7 @@ def get_instance_process_dump_slot( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -34286,6 +36432,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -34294,12 +36442,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34314,7 +36467,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -34330,8 +36483,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -34352,6 +36505,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34367,6 +36522,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -34381,6 +36537,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34398,7 +36555,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34412,7 +36573,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -34427,8 +36588,7 @@ def get_instance_process_module_slot( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34455,6 +36615,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -34464,12 +36626,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34484,7 +36651,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -34499,8 +36666,7 @@ def list_instance_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -34521,6 +36687,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34536,6 +36704,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -34550,6 +36719,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34567,7 +36737,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34581,7 +36755,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable_slot( @@ -34593,7 +36767,7 @@ def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -34613,18 +36787,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34639,7 +36820,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -34652,7 +36833,7 @@ def list_site_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -34667,6 +36848,8 @@ def list_site_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34680,6 +36863,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -34692,6 +36876,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34709,7 +36894,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34723,7 +36912,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers_slot( @@ -34735,7 +36924,7 @@ def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -34754,18 +36943,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34780,7 +36976,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -34794,8 +36990,8 @@ def get_migrate_my_sql_status_slot( """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. + 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 @@ -34814,18 +37010,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34840,7 +37043,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -34853,7 +37056,7 @@ def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -34873,18 +37076,25 @@ def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34899,7 +37109,7 @@ def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -34916,9 +37126,9 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( 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 + 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. @@ -34941,6 +37151,7 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -34950,6 +37161,7 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check_slot.metadata['url'], @@ -34957,7 +37169,11 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34972,11 +37188,11 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( return deserialized - create_or_update_swift_virtual_network_connection_with_check_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network_slot( + def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34985,7 +37201,7 @@ def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -35005,18 +37221,25 @@ def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35027,7 +37250,7 @@ def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -35044,9 +37267,9 @@ def update_swift_virtual_network_connection_with_check_slot( 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 + 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. @@ -35069,6 +37292,7 @@ def update_swift_virtual_network_connection_with_check_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -35078,6 +37302,7 @@ def update_swift_virtual_network_connection_with_check_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_with_check_slot.metadata['url'], @@ -35085,7 +37310,11 @@ def update_swift_virtual_network_connection_with_check_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35100,7 +37329,7 @@ def update_swift_virtual_network_connection_with_check_slot( return deserialized - update_swift_virtual_network_connection_with_check_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_with_check_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -35114,7 +37343,7 @@ def list_network_features_slot( ) -> "_models.NetworkFeatures": """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -35136,6 +37365,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -35143,12 +37374,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35163,7 +37399,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -35177,8 +37413,7 @@ def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35200,6 +37435,8 @@ def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -35207,12 +37444,17 @@ def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35231,7 +37473,7 @@ def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -35247,7 +37489,7 @@ def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -35255,11 +37497,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -35272,12 +37514,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -35286,7 +37531,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35301,7 +37550,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_slot_initial( @@ -35320,12 +37569,15 @@ def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -35334,7 +37586,11 @@ def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35352,7 +37608,7 @@ def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -35368,7 +37624,7 @@ def begin_start_web_site_network_trace_operation_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -35376,11 +37632,11 @@ def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -35395,7 +37651,8 @@ def begin_start_web_site_network_trace_operation_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_01_15.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -35410,6 +37667,7 @@ def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -35433,13 +37691,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace_slot( + def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35448,7 +37705,7 @@ def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -35467,18 +37724,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35489,7 +37753,7 @@ def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace @@ -35503,8 +37767,7 @@ def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35526,6 +37789,8 @@ def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -35533,12 +37798,17 @@ def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35553,7 +37823,7 @@ def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -35567,8 +37837,7 @@ def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35590,6 +37859,8 @@ def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -35597,12 +37868,17 @@ def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35621,7 +37897,7 @@ def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -35635,8 +37911,7 @@ def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35658,6 +37933,8 @@ def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -35665,12 +37942,17 @@ def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35685,11 +37967,11 @@ def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35698,8 +37980,7 @@ def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -35719,18 +38000,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35741,7 +38029,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -35755,7 +38043,7 @@ def list_perf_mon_counters_slot( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -35765,7 +38053,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -35774,6 +38062,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -35787,6 +38077,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -35800,6 +38091,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -35818,7 +38110,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35832,7 +38128,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -35844,7 +38140,7 @@ def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -35863,18 +38159,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35889,7 +38192,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -35902,7 +38205,7 @@ def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -35922,18 +38225,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35948,7 +38258,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -35962,7 +38272,7 @@ def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -35984,6 +38294,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -35991,12 +38303,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36011,7 +38328,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -36026,7 +38343,7 @@ def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -36050,6 +38367,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -36060,6 +38378,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -36067,7 +38386,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36082,11 +38405,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36096,7 +38419,7 @@ def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -36118,6 +38441,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -36125,12 +38450,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36141,7 +38471,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -36156,7 +38486,7 @@ def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -36180,6 +38510,7 @@ def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -36190,6 +38521,7 @@ def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -36197,7 +38529,11 @@ def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36212,7 +38548,7 @@ def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -36226,8 +38562,8 @@ def get_private_access_slot( """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. + 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 @@ -36246,18 +38582,25 @@ def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36272,7 +38615,7 @@ def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -36287,8 +38630,8 @@ def put_private_access_vnet_slot( """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. + 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 @@ -36309,6 +38652,7 @@ def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -36318,6 +38662,7 @@ def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -36325,7 +38670,11 @@ def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36340,7 +38689,7 @@ def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -36353,7 +38702,7 @@ def get_private_endpoint_connection_list_slot( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -36368,6 +38717,8 @@ def get_private_endpoint_connection_list_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36381,6 +38732,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list_slot.metadata['url'], ) request = _convert_request(request) @@ -36393,6 +38745,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36410,7 +38763,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36424,7 +38781,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection_slot( @@ -36437,7 +38794,7 @@ def get_private_endpoint_connection_slot( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36458,6 +38815,8 @@ def get_private_endpoint_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_endpoint_connection_slot_request( resource_group_name=resource_group_name, @@ -36465,12 +38824,17 @@ def get_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36485,7 +38849,7 @@ def get_private_endpoint_connection_slot( return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_slot_initial( @@ -36503,6 +38867,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -36513,6 +38878,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'], @@ -36520,7 +38886,11 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36538,7 +38908,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( return deserialized - _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -36553,7 +38923,7 @@ def begin_approve_or_reject_private_endpoint_connection_slot( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -36580,8 +38950,9 @@ def begin_approve_or_reject_private_endpoint_connection_slot( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -36595,6 +38966,7 @@ def begin_approve_or_reject_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36619,10 +38991,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_slot_initial( self, @@ -36638,6 +39009,8 @@ def _delete_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_private_endpoint_connection_slot_request_initial( resource_group_name=resource_group_name, @@ -36645,12 +39018,17 @@ def _delete_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -36671,7 +39049,7 @@ def _delete_private_endpoint_connection_slot_initial( return deserialized - _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -36685,7 +39063,7 @@ def begin_delete_private_endpoint_connection_slot( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36707,7 +39085,8 @@ def begin_delete_private_endpoint_connection_slot( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -36720,6 +39099,7 @@ def begin_delete_private_endpoint_connection_slot( name=name, private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -36743,10 +39123,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources_slot( @@ -36758,7 +39137,7 @@ def get_private_link_resources_slot( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36777,18 +39156,25 @@ def get_private_link_resources_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_private_link_resources_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36803,7 +39189,7 @@ def get_private_link_resources_slot( return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + get_private_link_resources_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources"} # type: ignore @distributed_trace @@ -36817,8 +39203,8 @@ def list_processes_slot( """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. + 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 @@ -36833,6 +39219,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36846,6 +39234,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -36858,6 +39247,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36875,7 +39265,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36889,7 +39283,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -36902,8 +39296,7 @@ def get_process_slot( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -36925,6 +39318,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -36932,12 +39327,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36952,11 +39352,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36967,8 +39367,8 @@ def delete_process_slot( """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. + 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 @@ -36990,6 +39390,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -36997,12 +39399,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -37013,7 +39420,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -37027,8 +39434,7 @@ def get_process_dump_slot( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -37050,6 +39456,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -37057,12 +39465,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37077,7 +39490,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -37092,8 +39505,8 @@ def list_process_modules_slot( """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. + 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 @@ -37111,6 +39524,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37125,6 +39540,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -37138,6 +39554,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37155,7 +39572,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37169,7 +39590,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -37183,8 +39604,7 @@ def get_process_module_slot( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -37208,6 +39628,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -37216,12 +39638,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37236,7 +39663,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -37250,8 +39677,7 @@ def list_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -37269,6 +39695,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37283,6 +39711,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -37296,6 +39725,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37313,7 +39743,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37327,7 +39761,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -37339,7 +39773,7 @@ def list_public_certificates_slot( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -37355,6 +39789,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37368,6 +39804,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -37380,6 +39817,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37397,7 +39835,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37411,7 +39853,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -37424,7 +39866,7 @@ def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -37446,6 +39888,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -37453,12 +39897,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37473,7 +39922,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -37488,7 +39937,7 @@ def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -37513,6 +39962,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -37523,6 +39973,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -37530,7 +39981,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37545,11 +40000,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37559,7 +40014,7 @@ def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -37581,6 +40036,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -37588,12 +40045,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37604,7 +40066,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -37618,7 +40080,7 @@ def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -37642,6 +40104,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -37651,6 +40114,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -37658,7 +40122,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37673,11 +40141,11 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37687,8 +40155,8 @@ def reset_slot_configuration_slot( """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. + 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 @@ -37708,18 +40176,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37730,11 +40205,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37745,7 +40220,7 @@ def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -37755,10 +40230,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -37771,12 +40247,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -37784,7 +40263,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37795,10 +40278,10 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - def _restore_from_backup_blob_slot_initial( + def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37812,6 +40295,7 @@ def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -37821,6 +40305,7 @@ def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -37828,7 +40313,11 @@ def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37838,11 +40327,11 @@ def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob_slot( + def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37852,7 +40341,7 @@ def begin_restore_from_backup_blob_slot( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -37875,8 +40364,9 @@ def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -37889,6 +40379,7 @@ def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -37910,12 +40401,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_slot_initial( + def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37929,6 +40419,7 @@ def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -37938,6 +40429,7 @@ def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -37945,7 +40437,11 @@ def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -37955,11 +40451,11 @@ def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app_slot( + def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37969,7 +40465,7 @@ def begin_restore_from_deleted_app_slot( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -37991,8 +40487,9 @@ def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38005,6 +40502,7 @@ def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38026,12 +40524,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_slot_initial( + def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38045,6 +40542,7 @@ def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -38054,6 +40552,7 @@ def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -38061,7 +40560,11 @@ def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38071,11 +40574,11 @@ def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot_slot( + def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38085,7 +40588,7 @@ def begin_restore_snapshot_slot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -38108,8 +40611,9 @@ def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38122,6 +40626,7 @@ def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38143,10 +40648,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -38158,7 +40662,7 @@ def list_site_extensions_slot( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -38174,6 +40678,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38187,6 +40693,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -38199,6 +40706,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38216,7 +40724,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38230,7 +40742,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -38243,7 +40755,7 @@ def get_site_extension_slot( ) -> "_models.SiteExtensionInfo": """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -38265,6 +40777,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -38272,12 +40786,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38292,7 +40811,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -38309,6 +40828,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -38316,12 +40837,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -38339,7 +40865,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -38353,7 +40879,7 @@ def begin_install_site_extension_slot( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -38377,7 +40903,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -38390,6 +40917,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -38413,13 +40941,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38429,7 +40956,7 @@ def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -38451,6 +40978,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -38458,12 +40987,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -38474,7 +41008,7 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -38488,7 +41022,7 @@ def list_slot_differences_slot( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -38506,6 +41040,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -38522,6 +41057,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -38537,6 +41073,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -38556,7 +41093,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38570,9 +41111,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38586,6 +41127,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -38595,6 +41137,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -38602,7 +41145,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38612,11 +41159,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38626,7 +41173,7 @@ def begin_swap_slot( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -38649,8 +41196,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38663,6 +41211,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38684,10 +41233,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -38699,7 +41247,7 @@ def list_snapshots_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -38712,6 +41260,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38725,6 +41275,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -38737,6 +41288,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38754,7 +41306,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38768,7 +41324,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -38780,7 +41336,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -38793,6 +41349,8 @@ def list_snapshots_from_dr_secondary_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38806,6 +41364,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -38818,6 +41377,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38835,7 +41395,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38849,7 +41413,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control_slot( @@ -38861,7 +41425,7 @@ def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -38881,18 +41445,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38914,7 +41485,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -38931,6 +41502,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -38940,6 +41512,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -38947,7 +41520,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -38968,7 +41545,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -38982,7 +41559,7 @@ def begin_create_or_update_source_control_slot( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -39006,8 +41583,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -39020,6 +41598,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -39044,13 +41623,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39060,7 +41638,7 @@ def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -39069,7 +41647,7 @@ def delete_source_control_slot( :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: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -39082,19 +41660,26 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39105,7 +41690,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39119,7 +41704,7 @@ def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -39141,6 +41726,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39150,6 +41736,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -39157,7 +41744,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39179,11 +41770,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39192,7 +41783,7 @@ def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -39212,18 +41803,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39234,7 +41832,7 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore def _start_network_trace_slot_initial( @@ -39253,12 +41851,15 @@ def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -39267,7 +41868,11 @@ def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39285,7 +41890,7 @@ def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace @@ -39301,7 +41906,7 @@ def begin_start_network_trace_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -39309,11 +41914,11 @@ def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -39328,7 +41933,8 @@ def begin_start_network_trace_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_01_15.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -39343,6 +41949,7 @@ def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -39366,13 +41973,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39381,7 +41987,7 @@ def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -39401,18 +42007,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39423,11 +42036,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def stop_network_trace_slot( + def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39436,7 +42049,7 @@ def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -39455,18 +42068,25 @@ def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39477,11 +42097,11 @@ def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39490,7 +42110,7 @@ def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -39509,18 +42129,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39531,11 +42158,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39544,7 +42171,7 @@ def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -39563,18 +42190,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -39585,7 +42219,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -39598,7 +42232,7 @@ def list_triggered_web_jobs_slot( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -39614,6 +42248,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39627,6 +42263,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -39639,6 +42276,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39656,7 +42294,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39670,7 +42312,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -39683,7 +42325,7 @@ def get_triggered_web_job_slot( ) -> "_models.TriggeredWebJob": """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39705,6 +42347,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39712,12 +42356,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39732,11 +42381,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39746,7 +42395,7 @@ def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39768,6 +42417,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39775,12 +42426,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39791,7 +42447,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -39805,7 +42461,7 @@ def list_triggered_web_job_history_slot( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -39823,6 +42479,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39837,6 +42495,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -39850,6 +42509,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39867,7 +42527,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39881,7 +42545,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -39895,8 +42559,7 @@ def get_triggered_web_job_history_slot( ) -> "_models.TriggeredJobHistory": """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -39920,6 +42583,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -39928,12 +42593,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39948,11 +42618,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39962,7 +42632,7 @@ def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -39984,6 +42654,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39991,12 +42663,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40007,7 +42684,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -40021,7 +42698,7 @@ def list_usages_slot( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -40033,7 +42710,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -40042,6 +42719,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40055,6 +42734,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -40068,6 +42748,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -40086,7 +42767,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40100,7 +42785,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -40112,7 +42797,7 @@ def list_vnet_connections_slot( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -40132,18 +42817,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40158,7 +42850,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -40172,7 +42864,7 @@ def get_vnet_connection_slot( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -40194,6 +42886,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -40201,12 +42895,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40221,7 +42920,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40237,8 +42936,8 @@ def create_or_update_vnet_connection_slot( """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). + 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 @@ -40262,6 +42961,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40272,6 +42972,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -40279,7 +42980,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40294,11 +42999,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40308,8 +43013,7 @@ def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -40331,6 +43035,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -40338,12 +43044,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40354,7 +43065,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40370,8 +43081,8 @@ def update_vnet_connection_slot( """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). + 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 @@ -40395,6 +43106,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -40405,6 +43117,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -40412,7 +43125,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40427,7 +43144,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40442,7 +43159,7 @@ def get_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Gets an app's Virtual Network gateway. - Description for 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 @@ -40466,6 +43183,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -40474,12 +43193,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40494,7 +43218,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40510,7 +43234,7 @@ def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40536,6 +43260,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40547,6 +43272,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -40554,7 +43280,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40569,7 +43299,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40585,7 +43315,7 @@ def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40611,6 +43341,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40622,6 +43353,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -40629,7 +43361,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40644,7 +43380,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40657,7 +43393,7 @@ def list_web_jobs_slot( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -40671,6 +43407,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40684,6 +43422,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -40696,6 +43435,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40713,7 +43453,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40727,7 +43471,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -40740,7 +43484,7 @@ def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -40762,6 +43506,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -40769,12 +43515,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40789,7 +43540,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -40802,7 +43553,7 @@ def list_slot_differences_from_production( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -40817,6 +43568,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -40832,6 +43584,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -40846,6 +43599,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -40865,7 +43619,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40879,9 +43637,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40894,6 +43652,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -40902,6 +43661,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -40909,7 +43669,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -40919,11 +43683,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40932,7 +43696,7 @@ def begin_swap_slot_with_production( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -40952,8 +43716,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -40965,6 +43730,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -40986,10 +43752,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -41000,7 +43765,7 @@ def list_snapshots( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -41011,6 +43776,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41023,6 +43790,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -41034,6 +43802,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41051,7 +43820,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41065,7 +43838,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -41076,7 +43849,7 @@ def list_snapshots_from_dr_secondary( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -41087,6 +43860,8 @@ def list_snapshots_from_dr_secondary( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41099,6 +43874,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -41110,6 +43886,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41127,7 +43904,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41141,7 +43922,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control( @@ -41152,7 +43933,7 @@ def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -41169,17 +43950,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -41201,7 +43989,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -41217,6 +44005,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -41225,6 +44014,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -41232,7 +44022,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -41253,7 +44047,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -41266,7 +44060,7 @@ def begin_create_or_update_source_control( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -41287,8 +44081,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_01_15.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -41300,6 +44095,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -41324,13 +44120,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41339,13 +44134,13 @@ def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 additional_flags: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -41358,18 +44153,25 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -41380,7 +44182,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -41393,7 +44195,7 @@ def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -41412,6 +44214,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -41420,6 +44223,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -41427,7 +44231,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -41449,11 +44257,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41461,7 +44269,7 @@ def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -41478,17 +44286,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41499,7 +44314,7 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore def _start_network_trace_initial( @@ -41517,11 +44332,14 @@ def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -41530,7 +44348,11 @@ def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -41548,7 +44370,7 @@ def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace @@ -41563,17 +44385,17 @@ def begin_start_network_trace( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -41588,7 +44410,8 @@ def begin_start_network_trace( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_01_15.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -41602,6 +44425,7 @@ def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -41625,13 +44449,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41639,7 +44462,7 @@ def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -41656,17 +44479,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41677,11 +44507,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def stop_network_trace( + def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41689,7 +44519,7 @@ def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -41706,17 +44536,24 @@ def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -41727,11 +44564,11 @@ def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41739,7 +44576,7 @@ def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -41756,17 +44593,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41777,11 +44621,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41789,7 +44633,7 @@ def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -41806,17 +44650,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -41827,7 +44678,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -41839,7 +44690,7 @@ def list_triggered_web_jobs( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -41852,6 +44703,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41864,6 +44717,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -41875,6 +44729,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41892,7 +44747,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41906,7 +44765,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -41918,7 +44777,7 @@ def get_triggered_web_job( ) -> "_models.TriggeredWebJob": """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -41937,18 +44796,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41963,11 +44829,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41976,7 +44842,7 @@ def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -41995,18 +44861,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -42017,7 +44890,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -42030,7 +44903,7 @@ def list_triggered_web_job_history( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -42045,6 +44918,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -42058,6 +44933,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -42070,6 +44946,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -42087,7 +44964,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42101,7 +44982,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -42114,8 +44995,7 @@ def get_triggered_web_job_history( ) -> "_models.TriggeredJobHistory": """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -42136,6 +45016,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -42143,12 +45025,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42163,11 +45050,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42176,7 +45063,7 @@ def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -42195,18 +45082,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42217,7 +45111,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -42230,7 +45124,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -42239,7 +45133,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -42248,6 +45142,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -42260,6 +45156,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -42272,6 +45169,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -42290,7 +45188,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42304,7 +45206,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -42315,7 +45217,7 @@ def list_vnet_connections( ) -> List["_models.VnetInfo"]: """Gets the virtual networks the app (or deployment slot) is connected to. - Description for Gets the virtual networks the app (or deployment slot) is connected to. + 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 @@ -42332,17 +45234,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42357,7 +45266,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -42370,7 +45279,7 @@ def get_vnet_connection( ) -> "_models.VnetInfo": """Gets a virtual network the app (or deployment slot) is connected to by name. - Description for Gets a virtual network the app (or deployment slot) is connected to by name. + 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 @@ -42389,18 +45298,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42415,7 +45331,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42430,8 +45346,8 @@ def create_or_update_vnet_connection( """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). + 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 @@ -42452,6 +45368,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -42461,6 +45378,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -42468,7 +45386,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42483,11 +45405,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42496,8 +45418,7 @@ def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -42516,18 +45437,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42538,7 +45466,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42553,8 +45481,8 @@ def update_vnet_connection( """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). + 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 @@ -42575,6 +45503,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfo') @@ -42584,6 +45513,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -42591,7 +45521,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42606,7 +45540,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42620,7 +45554,7 @@ def get_vnet_connection_gateway( ) -> "_models.VnetGateway": """Gets an app's Virtual Network gateway. - Description for 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 @@ -42641,6 +45575,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -42648,12 +45584,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42668,7 +45609,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42683,7 +45624,7 @@ def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -42706,6 +45647,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -42716,6 +45658,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -42723,7 +45666,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42738,7 +45685,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42753,7 +45700,7 @@ def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -42776,6 +45723,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -42786,6 +45734,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -42793,7 +45742,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42808,7 +45761,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42820,7 +45773,7 @@ def list_web_jobs( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -42831,6 +45784,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -42843,6 +45798,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -42854,6 +45810,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -42871,7 +45828,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42885,7 +45846,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -42897,7 +45858,7 @@ def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -42916,18 +45877,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42942,5 +45910,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_web_site_management_client_operations.py index 770546b8f8b5..67870faa3b4d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_01_15/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,34 @@ def build_list_billing_meters_request( os_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') if os_type is not None: - query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,33 +231,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,29 +268,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -300,37 +305,38 @@ def build_list_geo_regions_request( linux_dynamic_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: - query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + _query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') if linux_dynamic_workers_enabled is not None: - query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -342,33 +348,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -379,29 +385,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -410,29 +417,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-01-15" + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -444,33 +452,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -485,34 +493,34 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -527,34 +535,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -569,34 +577,34 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-01-15" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -611,7 +619,7 @@ def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -624,14 +632,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -646,7 +661,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -657,7 +672,7 @@ def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2021_01_15.models.User @@ -672,11 +687,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -684,7 +701,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -699,7 +720,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -709,7 +730,7 @@ def list_source_controls( ) -> Iterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -718,6 +739,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -727,6 +750,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -735,6 +759,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -752,7 +777,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -766,7 +795,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -776,7 +805,7 @@ def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -791,15 +820,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -814,7 +850,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -826,7 +862,7 @@ def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -843,12 +879,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -856,7 +894,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -871,7 +913,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -883,11 +925,11 @@ def list_billing_meters( ) -> Iterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -895,6 +937,8 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -905,6 +949,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -916,6 +961,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -935,7 +981,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -949,7 +999,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace def check_name_availability( @@ -961,13 +1011,13 @@ def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2021_01_15.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -980,6 +1030,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -987,6 +1038,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -994,7 +1046,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1009,7 +1065,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -1019,7 +1075,7 @@ def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -1032,15 +1088,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1055,7 +1118,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -1069,24 +1132,26 @@ def list_geo_regions( ) -> Iterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2021_01_15.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1097,6 +1162,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1110,6 +1176,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1131,7 +1198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1145,7 +1216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1155,7 +1226,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> Iterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2021_01_15.models.NameIdentifier @@ -1165,6 +1236,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1178,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1190,6 +1263,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1209,7 +1283,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1223,7 +1301,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1232,7 +1310,7 @@ def list_premier_add_on_offers( ) -> Iterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -1241,6 +1319,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_01_15.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1251,6 +1331,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1260,6 +1341,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1277,7 +1359,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1291,7 +1377,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1300,7 +1386,7 @@ def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -1313,15 +1399,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1336,7 +1429,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1348,8 +1441,8 @@ def verify_hosting_environment_vnet( """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. + 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.v2021_01_15.models.VnetParameters @@ -1364,12 +1457,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1377,7 +1472,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,11 +1491,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1404,7 +1503,7 @@ def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -1421,6 +1520,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1428,6 +1528,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1435,7 +1536,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1446,7 +1551,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1458,7 +1563,7 @@ def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -1475,6 +1580,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1482,6 +1588,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1489,7 +1596,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1504,11 +1615,11 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1516,7 +1627,7 @@ def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -1533,6 +1644,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-01-15") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1540,6 +1652,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1547,7 +1660,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1558,5 +1675,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_configuration.py index 1ce6a265a93d..fe042cdd3f3f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials import TokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2021-03-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_metadata.json b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_metadata.json index 3a7232ec813a..c42698dd8dc8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_metadata.json +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_metadata.json @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"WebSiteManagementClientConfiguration\"], \"._operations_mixin\": [\"WebSiteManagementClientOperationsMixin\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -125,84 +125,84 @@ "get_publishing_user" : { "sync": { "signature": "def get_publishing_user(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_publishing_user(\n self,\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Gets publishing user.\n\nDescription for Gets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets publishing user.\n\nGets publishing user.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "update_publishing_user" : { "sync": { "signature": "def update_publishing_user(\n self,\n user_details, # type: \"_models.User\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.User\"\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_03_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_03_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_publishing_user(\n self,\n user_details: \"_models.User\",\n **kwargs: Any\n) -\u003e \"_models.User\":\n", - "doc": "\"\"\"Updates publishing user.\n\nDescription for Updates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_03_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates publishing user.\n\nUpdates publishing user.\n\n:param user_details: Details of publishing user.\n:type user_details: ~azure.mgmt.web.v2021_03_01.models.User\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: User, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.User\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "user_details" }, "list_source_controls" : { "sync": { "signature": "def list_source_controls(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.SourceControlCollection\"]\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_source_controls(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.SourceControlCollection\"]:\n", - "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nDescription for Gets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets the source controls available for Azure websites.\n\nGets the source controls available for Azure websites.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either SourceControlCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SourceControlCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "get_source_control" : { "sync": { "signature": "def get_source_control(\n self,\n source_control_type, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_source_control(\n self,\n source_control_type: str,\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Gets source control token.\n\nDescription for Gets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets source control token.\n\nGets source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type" }, "update_source_control" : { "sync": { "signature": "def update_source_control(\n self,\n source_control_type, # type: str\n request_message, # type: \"_models.SourceControl\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SourceControl\"\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def update_source_control(\n self,\n source_control_type: str,\n request_message: \"_models.SourceControl\",\n **kwargs: Any\n) -\u003e \"_models.SourceControl\":\n", - "doc": "\"\"\"Updates source control token.\n\nDescription for Updates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Updates source control token.\n\nUpdates source control token.\n\n:param source_control_type: Type of source control.\n:type source_control_type: str\n:param request_message: Source control token information.\n:type request_message: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SourceControl, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SourceControl\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "source_control_type, request_message" }, "list_billing_meters" : { "sync": { "signature": "def list_billing_meters(\n self,\n billing_location=None, # type: Optional[str]\n os_type=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.BillingMeterCollection\"]\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_billing_meters(\n self,\n billing_location: Optional[str] = None,\n os_type: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.BillingMeterCollection\"]:\n", - "doc": "\"\"\"Gets a list of meters for a given location.\n\nDescription for Gets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource.\n:type billing_location: str\n:param os_type: App Service OS type meters used for.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets a list of meters for a given location.\n\nGets a list of meters for a given location.\n\n:param billing_location: Azure Location of billable resource. Default value is None.\n:type billing_location: str\n:param os_type: App Service OS type meters used for. Default value is None.\n:type os_type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BillingMeterCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.BillingMeterCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "billing_location, os_type" }, "check_name_availability" : { "sync": { "signature": "def check_name_availability(\n self,\n name, # type: str\n type, # type: Union[str, \"_models.CheckNameResourceTypes\"]\n is_fqdn=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ResourceNameAvailability\"\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def check_name_availability(\n self,\n name: str,\n type: Union[str, \"_models.CheckNameResourceTypes\"],\n is_fqdn: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.ResourceNameAvailability\":\n", - "doc": "\"\"\"Check if a resource name is available.\n\nDescription for Check if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Check if a resource name is available.\n\nCheck if a resource name is available.\n\n:param name: Resource name to verify.\n:type name: str\n:param type: Resource type used for verification.\n:type type: str or ~azure.mgmt.web.v2021_03_01.models.CheckNameResourceTypes\n:param is_fqdn: Is fully qualified domain name. Default value is None.\n:type is_fqdn: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ResourceNameAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.ResourceNameAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name, type, is_fqdn" }, @@ -221,108 +221,108 @@ "get_subscription_deployment_locations" : { "sync": { "signature": "def get_subscription_deployment_locations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.DeploymentLocations\"\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def get_subscription_deployment_locations(\n self,\n **kwargs: Any\n) -\u003e \"_models.DeploymentLocations\":\n", - "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nDescription for Gets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Gets list of available geo regions plus ministamps.\n\nGets list of available geo regions plus ministamps.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DeploymentLocations, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.DeploymentLocations\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_geo_regions" : { "sync": { "signature": "def list_geo_regions(\n self,\n sku=None, # type: Optional[Union[str, \"_models.SkuName\"]]\n linux_workers_enabled=None, # type: Optional[bool]\n xenon_workers_enabled=None, # type: Optional[bool]\n linux_dynamic_workers_enabled=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.GeoRegionCollection\"]\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2021_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2021_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_geo_regions(\n self,\n sku: Optional[Union[str, \"_models.SkuName\"]] = None,\n linux_workers_enabled: Optional[bool] = None,\n xenon_workers_enabled: Optional[bool] = None,\n linux_dynamic_workers_enabled: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.GeoRegionCollection\"]:\n", - "doc": "\"\"\"Get a list of available geographical regions.\n\nDescription for Get a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions.\n:type sku: str or ~azure.mgmt.web.v2021_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get a list of available geographical regions.\n\nGet a list of available geographical regions.\n\n:param sku: Name of SKU used to filter the regions. Default value is None.\n:type sku: str or ~azure.mgmt.web.v2021_03_01.models.SkuName\n:param linux_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Linux workers. Default value is None.\n:type linux_workers_enabled: bool\n:param xenon_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter to only\n regions that support Xenon workers. Default value is None.\n:type xenon_workers_enabled: bool\n:param linux_dynamic_workers_enabled: Specify :code:`\u003ccode\u003etrue\u003c/code\u003e` if you want to filter\n to only regions that support Linux Consumption Workers. Default value is None.\n:type linux_dynamic_workers_enabled: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either GeoRegionCollection or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.GeoRegionCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "sku, linux_workers_enabled, xenon_workers_enabled, linux_dynamic_workers_enabled" }, "list_site_identifiers_assigned_to_host_name" : { "sync": { "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier, # type: \"_models.NameIdentifier\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.IdentifierCollection\"]\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_site_identifiers_assigned_to_host_name(\n self,\n name_identifier: \"_models.NameIdentifier\",\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.IdentifierCollection\"]:\n", - "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nDescription for List all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all apps that are assigned to a hostname.\n\nList all apps that are assigned to a hostname.\n\n:param name_identifier: Hostname information.\n:type name_identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either IdentifierCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "name_identifier" }, "list_premier_add_on_offers" : { "sync": { "signature": "def list_premier_add_on_offers(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.PremierAddOnOfferCollection\"]\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, "signature": "def list_premier_add_on_offers(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.PremierAddOnOfferCollection\"]:\n", - "doc": "\"\"\"List all premier add-on offers.\n\nDescription for List all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all premier add-on offers.\n\nList all premier add-on offers.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either PremierAddOnOfferCollection or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PremierAddOnOfferCollection]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_skus" : { "sync": { "signature": "def list_skus(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SkuInfos\"\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def list_skus(\n self,\n **kwargs: Any\n) -\u003e \"_models.SkuInfos\":\n", - "doc": "\"\"\"List all SKUs.\n\nDescription for List all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"List all SKUs.\n\nList all SKUs.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SkuInfos, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.SkuInfos\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "verify_hosting_environment_vnet" : { "sync": { "signature": "def verify_hosting_environment_vnet(\n self,\n parameters, # type: \"_models.VnetParameters\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.VnetValidationFailureDetails\"\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_03_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_03_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def verify_hosting_environment_vnet(\n self,\n parameters: \"_models.VnetParameters\",\n **kwargs: Any\n) -\u003e \"_models.VnetValidationFailureDetails\":\n", - "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nDescription for Verifies if this VNET is compatible with an App Service Environment by\nanalyzing the Network Security Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_03_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Verifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\nVerifies if this VNET is compatible with an App Service Environment by analyzing the Network\nSecurity Group rules.\n\n:param parameters: VNET information.\n:type parameters: ~azure.mgmt.web.v2021_03_01.models.VnetParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VnetValidationFailureDetails, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.VnetValidationFailureDetails\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "parameters" }, "move" : { "sync": { - "signature": "def move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Move resources between resource groups.\n\nDescription for Move resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Move resources between resource groups.\n\nMove resources between resource groups.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" }, "validate" : { "sync": { "signature": "def validate(\n self,\n resource_group_name, # type: str\n validate_request, # type: \"_models.ValidateRequest\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.ValidateResponse\"\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_03_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_03_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def validate(\n self,\n resource_group_name: str,\n validate_request: \"_models.ValidateRequest\",\n **kwargs: Any\n) -\u003e \"_models.ValidateResponse\":\n", - "doc": "\"\"\"Validate if a resource can be created.\n\nDescription for Validate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_03_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Validate if a resource can be created.\n\nValidate if a resource can be created.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param validate_request: Request with the resources to validate.\n:type validate_request: ~azure.mgmt.web.v2021_03_01.models.ValidateRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.web.v2021_03_01.models.ValidateResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, validate_request" }, "validate_move" : { "sync": { - "signature": "def validate_move(\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name, # type: str\n move_resource_envelope, # type: \"_models.CsmMoveResourceEnvelope\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def validate_move(\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"Validate whether a resource can be moved.\n\nDescription for Validate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def validate_move( # pylint: disable=inconsistent-return-statements\n self,\n resource_group_name: str,\n move_resource_envelope: \"_models.CsmMoveResourceEnvelope\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"Validate whether a resource can be moved.\n\nValidate whether a resource can be moved.\n\n:param resource_group_name: Name of the resource group to which the resource belongs.\n:type resource_group_name: str\n:param move_resource_envelope: Object that represents the resource to move.\n:type move_resource_envelope: ~azure.mgmt.web.v2021_03_01.models.CsmMoveResourceEnvelope\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, move_resource_envelope" } diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_version.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_version.py index 92453d8691d9..5c14e0d8303d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_version.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.1.0" +VERSION = "0.42.0" diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_web_site_management_client.py index c416ccf5d6d3..4074f007aa95 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer from . import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -76,8 +77,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2021-03-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ @@ -120,7 +124,7 @@ def __init__( def _send_request( self, - request, # type: HttpRequest + request: HttpRequest, **kwargs: Any ) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/_configuration.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/_configuration.py index 636b77e9ee9e..f88eb47796c4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/_configuration.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClientConfiguration(Configuration): +class WebSiteManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for WebSiteManagementClient. Note that all parameters used to create this instance are saved as instance @@ -27,8 +27,12 @@ class WebSiteManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + :param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). :type subscription_id: str + :keyword api_version: Api Version. Default value is "2021-03-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -38,6 +42,8 @@ def __init__( **kwargs: Any ) -> None: super(WebSiteManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -45,7 +51,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-web/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/_web_site_management_client.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/_web_site_management_client.py index 18f4b317f73b..116876eb3f14 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/_web_site_management_client.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/_web_site_management_client.py @@ -7,11 +7,12 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer from .. import models from ._configuration import WebSiteManagementClientConfiguration @@ -21,7 +22,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): +class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes """WebSite Management Client. :ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations @@ -77,8 +78,11 @@ class WebSiteManagementClient(WebSiteManagementClientOperationsMixin): :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 base_url: Service URL. Default value is 'https://management.azure.com'. + :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str + :keyword api_version: Api Version. Default value is "2021-03-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_certificate_orders_operations.py index 099016c32a2b..530a2f0826c7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceCertificateOrdersOperations: +class AppServiceCertificateOrdersOperations: # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,17 +121,17 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async - async def validate_purchase_information( + async def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -140,12 +147,14 @@ async def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -153,7 +162,11 @@ async def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -164,7 +177,7 @@ async def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -175,7 +188,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -186,6 +199,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -197,6 +212,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -207,6 +223,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -224,7 +241,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,7 +259,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace_async async def get( @@ -249,7 +270,7 @@ async def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -266,17 +287,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -291,7 +319,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore async def _create_or_update_initial( @@ -307,6 +335,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -315,6 +344,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -322,7 +352,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -340,7 +374,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -353,7 +387,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -376,8 +410,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -389,6 +424,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -413,13 +449,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -427,7 +462,7 @@ async def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -444,17 +479,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -465,7 +507,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace_async @@ -478,7 +520,7 @@ async def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -498,6 +540,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -506,6 +549,7 @@ async def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -513,7 +557,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -528,7 +576,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -540,7 +588,7 @@ def list_certificates( ) -> AsyncIterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -553,6 +601,8 @@ def list_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -565,6 +615,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -576,6 +627,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -593,7 +645,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -607,7 +663,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace_async async def get_certificate( @@ -619,7 +675,7 @@ async def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -638,18 +694,25 @@ async def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -664,7 +727,7 @@ async def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore async def _create_or_update_certificate_initial( @@ -681,6 +744,7 @@ async def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -690,6 +754,7 @@ async def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -697,7 +762,11 @@ async def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -715,7 +784,7 @@ async def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -729,7 +798,7 @@ async def begin_create_or_update_certificate( ) -> AsyncLROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -753,8 +822,9 @@ async def begin_create_or_update_certificate( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -767,6 +837,7 @@ async def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -791,13 +862,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete_certificate( + async def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -806,7 +876,7 @@ async def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -825,18 +895,25 @@ async def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -847,7 +924,7 @@ async def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async @@ -861,7 +938,7 @@ async def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -883,6 +960,7 @@ async def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -892,6 +970,7 @@ async def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -899,7 +978,11 @@ async def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,11 +997,11 @@ async def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace_async - async def reissue( + async def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -927,7 +1010,7 @@ async def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -947,6 +1030,7 @@ async def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -955,6 +1039,7 @@ async def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -962,7 +1047,11 @@ async def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -973,11 +1062,11 @@ async def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -986,7 +1075,7 @@ async def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1006,6 +1095,7 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1014,6 +1104,7 @@ async def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1021,7 +1112,11 @@ async def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1032,11 +1127,11 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace_async - async def resend_email( + async def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1044,7 +1139,7 @@ async def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1061,17 +1156,24 @@ async def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1082,11 +1184,11 @@ async def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace_async - async def resend_request_emails( + async def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1115,6 +1217,7 @@ async def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1123,6 +1226,7 @@ async def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1130,7 +1234,11 @@ async def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1141,7 +1249,7 @@ async def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace_async @@ -1179,6 +1287,7 @@ async def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1187,6 +1296,7 @@ async def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1194,7 +1304,11 @@ async def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1209,11 +1323,11 @@ async def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace_async - async def verify_domain_ownership( + async def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1221,7 +1335,7 @@ async def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -1238,17 +1352,24 @@ async def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1259,7 +1380,7 @@ async def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace_async @@ -1271,7 +1392,7 @@ async def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -1288,17 +1409,24 @@ async def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1313,7 +1441,7 @@ async def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace_async @@ -1325,7 +1453,7 @@ async def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -1342,17 +1470,24 @@ async def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1367,5 +1502,5 @@ async def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_environments_operations.py index b582f7e3e976..fc96625ce0fe 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServiceEnvironmentsOperations: +class AppServiceEnvironmentsOperations: # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -292,7 +320,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -305,7 +333,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -328,8 +356,9 @@ async def begin_create_or_update( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -341,6 +370,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -365,12 +395,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -383,18 +412,25 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -404,11 +440,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -417,7 +453,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -438,7 +474,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -450,6 +487,7 @@ async def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -470,10 +508,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -485,7 +522,7 @@ async def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -505,6 +542,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -513,6 +551,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -520,7 +559,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -542,7 +585,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -554,7 +597,7 @@ def list_capacities( ) -> AsyncIterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -567,6 +610,8 @@ def list_capacities( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -579,6 +624,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -590,6 +636,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -607,7 +654,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +672,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace_async async def get_vip_info( @@ -632,7 +683,7 @@ async def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -649,17 +700,24 @@ async def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -674,7 +732,7 @@ async def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore async def _change_vnet_initial( @@ -690,6 +748,7 @@ async def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -698,6 +757,7 @@ async def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -705,7 +765,11 @@ async def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -723,7 +787,7 @@ async def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -736,7 +800,7 @@ async def begin_change_vnet( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -759,6 +823,7 @@ async def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -774,6 +839,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -788,6 +854,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -807,7 +874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -818,7 +889,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -830,6 +901,7 @@ async def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -840,8 +912,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -857,10 +928,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace_async @@ -872,7 +942,7 @@ async def get_ase_v3_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Get networking configuration of an App Service Environment. - Description for Get networking configuration of an App Service Environment. + 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 @@ -889,17 +959,24 @@ async def get_ase_v3_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ase_v3_networking_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ase_v3_networking_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +991,7 @@ async def get_ase_v3_networking_configuration( return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + get_ase_v3_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace_async @@ -927,7 +1004,7 @@ async def update_ase_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Update networking configuration of an App Service Environment. - Description for Update networking configuration of an App Service Environment. + 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 @@ -947,6 +1024,7 @@ async def update_ase_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') @@ -955,6 +1033,7 @@ async def update_ase_networking_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ase_networking_configuration.metadata['url'], @@ -962,7 +1041,11 @@ async def update_ase_networking_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,7 +1060,7 @@ async def update_ase_networking_configuration( return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + update_ase_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace_async @@ -989,7 +1072,7 @@ async def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -1006,17 +1089,24 @@ async def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,7 +1121,7 @@ async def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace_async @@ -1044,7 +1134,7 @@ async def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -1063,18 +1153,25 @@ async def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1089,7 +1186,7 @@ async def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -1101,8 +1198,7 @@ def get_inbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -1115,6 +1211,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1127,6 +1225,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1138,6 +1237,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1155,7 +1255,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1169,7 +1273,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -1180,7 +1284,7 @@ def list_multi_role_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -1193,6 +1297,8 @@ def list_multi_role_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1205,6 +1311,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -1216,6 +1323,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1233,7 +1341,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1247,7 +1359,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace_async async def get_multi_role_pool( @@ -1258,7 +1370,7 @@ async def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -1275,17 +1387,24 @@ async def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1300,7 +1419,7 @@ async def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore async def _create_or_update_multi_role_pool_initial( @@ -1316,6 +1435,7 @@ async def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1324,6 +1444,7 @@ async def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -1331,7 +1452,11 @@ async def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1349,7 +1474,7 @@ async def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async @@ -1362,7 +1487,7 @@ async def begin_create_or_update_multi_role_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -1384,8 +1509,9 @@ async def begin_create_or_update_multi_role_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1397,6 +1523,7 @@ async def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1421,10 +1548,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace_async async def update_multi_role_pool( @@ -1436,7 +1562,7 @@ async def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -1455,6 +1581,7 @@ async def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -1463,6 +1590,7 @@ async def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -1470,7 +1598,11 @@ async def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1489,7 +1621,7 @@ async def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -1503,8 +1635,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -1519,6 +1651,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1532,6 +1666,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1544,6 +1679,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1561,7 +1697,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1575,7 +1715,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -1586,7 +1726,7 @@ def list_multi_role_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -1599,6 +1739,8 @@ def list_multi_role_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1611,6 +1753,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -1622,6 +1765,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1639,7 +1783,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1653,7 +1801,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -1664,7 +1812,7 @@ def list_multi_role_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -1676,6 +1824,8 @@ def list_multi_role_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1688,6 +1838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -1699,6 +1850,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1716,7 +1868,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1730,7 +1886,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -1741,7 +1897,7 @@ def list_multi_role_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -1753,6 +1909,8 @@ def list_multi_role_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1765,6 +1923,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -1776,6 +1935,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1793,7 +1953,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1807,7 +1971,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace_async async def list_operations( @@ -1818,7 +1982,7 @@ async def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -1835,17 +1999,24 @@ async def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1860,7 +2031,7 @@ async def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -1872,8 +2043,7 @@ def get_outbound_network_dependencies_endpoints( ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -1886,6 +2056,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1898,6 +2070,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -1909,6 +2082,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1926,7 +2100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1940,7 +2118,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def get_private_endpoint_connection_list( @@ -1951,7 +2129,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoints associated with a hosting environment. - Description for Gets the list of private endpoints associated with a hosting environment. + 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 @@ -1964,6 +2142,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1976,6 +2156,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -1987,6 +2168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2004,7 +2186,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2018,7 +2204,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -2030,7 +2216,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2049,18 +2235,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2075,7 +2268,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -2092,6 +2285,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -2101,6 +2295,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -2108,7 +2303,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2126,7 +2325,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -2140,7 +2339,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -2165,8 +2364,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2179,6 +2379,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2203,10 +2404,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -2221,18 +2421,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2253,7 +2460,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -2266,7 +2473,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2286,7 +2493,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -2298,6 +2506,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2321,10 +2530,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -2335,7 +2543,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2352,17 +2560,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2377,11 +2592,11 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources"} # type: ignore @distributed_trace_async - async def reboot( + async def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2389,7 +2604,7 @@ async def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -2406,17 +2621,24 @@ async def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -2427,7 +2649,7 @@ async def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore async def _resume_initial( @@ -2442,17 +2664,24 @@ async def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2470,7 +2699,7 @@ async def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace_async @@ -2482,7 +2711,7 @@ async def begin_resume( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -2503,6 +2732,8 @@ async def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2515,6 +2746,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -2526,6 +2758,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2543,7 +2776,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2554,7 +2791,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2565,6 +2802,7 @@ async def get_next(next_link=None): raw_result = await self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2574,8 +2812,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2591,10 +2828,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -2606,7 +2842,7 @@ def list_app_service_plans( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -2619,6 +2855,8 @@ def list_app_service_plans( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2631,6 +2869,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -2642,6 +2881,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2659,7 +2899,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2673,7 +2917,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -2685,13 +2929,14 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -2699,6 +2944,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2711,6 +2958,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -2723,6 +2971,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -2741,7 +2990,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2755,7 +3008,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore async def _suspend_initial( self, @@ -2769,17 +3022,24 @@ async def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2797,7 +3057,7 @@ async def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace_async @@ -2809,7 +3069,7 @@ async def begin_suspend( ) -> AsyncLROPoller[AsyncItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -2830,6 +3090,8 @@ async def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2842,6 +3104,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -2853,6 +3116,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2870,7 +3134,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2881,7 +3149,7 @@ async def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2892,6 +3160,7 @@ async def get_next(next_link=None): raw_result = await self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2901,8 +3170,7 @@ def get_long_running_output(pipeline_response): async def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return await get_next(next_link) + return await get_next(next_link) return AsyncItemPaged( internal_get_next, extract_data @@ -2918,10 +3186,9 @@ async def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -2934,7 +3201,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -2943,7 +3210,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2952,6 +3219,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2964,6 +3233,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2976,6 +3246,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2994,7 +3265,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3008,7 +3283,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -3019,7 +3294,7 @@ def list_worker_pools( ) -> AsyncIterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -3032,6 +3307,8 @@ def list_worker_pools( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3044,6 +3321,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -3055,6 +3333,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3072,7 +3351,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3086,7 +3369,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace_async async def get_worker_pool( @@ -3098,7 +3381,7 @@ async def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -3117,18 +3400,25 @@ async def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3143,7 +3433,7 @@ async def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore async def _create_or_update_worker_pool_initial( @@ -3160,6 +3450,7 @@ async def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3169,6 +3460,7 @@ async def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -3176,7 +3468,11 @@ async def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3194,7 +3490,7 @@ async def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async @@ -3208,7 +3504,7 @@ async def begin_create_or_update_worker_pool( ) -> AsyncLROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -3232,8 +3528,9 @@ async def begin_create_or_update_worker_pool( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3246,6 +3543,7 @@ async def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3270,10 +3568,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace_async async def update_worker_pool( @@ -3286,7 +3583,7 @@ async def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -3307,6 +3604,7 @@ async def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -3316,6 +3614,7 @@ async def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -3323,7 +3622,11 @@ async def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3342,7 +3645,7 @@ async def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -3356,8 +3659,7 @@ def list_worker_pool_instance_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -3374,6 +3676,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3388,6 +3692,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3401,6 +3706,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3418,7 +3724,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3432,7 +3742,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -3444,7 +3754,7 @@ def list_web_worker_metric_definitions( ) -> AsyncIterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -3459,6 +3769,8 @@ def list_web_worker_metric_definitions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3472,6 +3784,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3484,6 +3797,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3501,7 +3815,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3515,7 +3833,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -3527,7 +3845,7 @@ def list_worker_pool_skus( ) -> AsyncIterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -3541,6 +3859,8 @@ def list_worker_pool_skus( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3554,6 +3874,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3566,6 +3887,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3583,7 +3905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3597,7 +3923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -3609,7 +3935,7 @@ def list_web_worker_usages( ) -> AsyncIterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -3623,6 +3949,8 @@ def list_web_worker_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3636,6 +3964,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -3648,6 +3977,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3665,7 +3995,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3679,4 +4013,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_plans_operations.py index aeacdae692db..1915bcf3cfa0 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AppServicePlansOperations: +class AppServicePlansOperations: # pylint: disable=too-many-public-methods """AppServicePlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -69,6 +68,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -89,6 +91,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -131,7 +138,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -142,6 +149,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -153,6 +162,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -163,6 +173,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -180,7 +191,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +209,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace_async async def get( @@ -205,7 +220,7 @@ async def get( ) -> "_models.AppServicePlan": """Get an App Service plan. - Description for 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 @@ -222,17 +237,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -247,7 +269,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore async def _create_or_update_initial( @@ -263,6 +285,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -271,6 +294,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -278,7 +302,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -296,7 +324,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -309,7 +337,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -330,8 +358,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -343,6 +372,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -367,13 +397,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -381,7 +410,7 @@ async def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -398,17 +427,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -419,7 +455,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -432,7 +468,7 @@ async def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -451,6 +487,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -459,6 +496,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -466,7 +504,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -485,7 +527,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace_async @@ -497,7 +539,7 @@ async def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -514,17 +556,24 @@ async def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -539,7 +588,7 @@ async def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace_async @@ -553,7 +602,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -574,6 +623,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -581,12 +632,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -601,11 +657,11 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -615,7 +671,7 @@ async def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -636,6 +692,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -643,12 +701,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -659,7 +722,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -673,7 +736,7 @@ async def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -694,6 +757,8 @@ async def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -701,12 +766,17 @@ async def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -721,7 +791,7 @@ async def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -735,7 +805,7 @@ def list_web_apps_by_hybrid_connection( ) -> AsyncIterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -751,6 +821,8 @@ def list_web_apps_by_hybrid_connection( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -765,6 +837,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -778,6 +851,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -795,7 +869,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -809,7 +887,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace_async async def get_hybrid_connection_plan_limit( @@ -820,7 +898,7 @@ async def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -837,17 +915,24 @@ async def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -862,7 +947,7 @@ async def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -874,7 +959,7 @@ def list_hybrid_connections( ) -> AsyncIterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -887,6 +972,8 @@ def list_hybrid_connections( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -899,6 +986,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -910,6 +998,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -927,7 +1016,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -941,10 +1034,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async - async def restart_web_apps( + async def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -953,7 +1046,7 @@ async def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -974,18 +1067,25 @@ async def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -996,7 +1096,7 @@ async def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -1011,7 +1111,7 @@ def list_web_apps( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -1019,12 +1119,13 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -1032,6 +1133,8 @@ def list_web_apps( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1044,6 +1147,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1058,6 +1162,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -1078,7 +1183,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1092,7 +1201,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace_async async def get_server_farm_skus( @@ -1103,7 +1212,7 @@ async def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -1120,17 +1229,24 @@ async def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1145,7 +1261,7 @@ async def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -1158,14 +1274,15 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -1174,6 +1291,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1186,6 +1305,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -1198,6 +1318,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -1216,7 +1337,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1230,7 +1355,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnets( @@ -1241,7 +1366,7 @@ async def list_vnets( ) -> List["_models.VnetInfoResource"]: """Get all Virtual Networks associated with an App Service plan. - Description for 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 @@ -1258,17 +1383,24 @@ async def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1283,7 +1415,7 @@ async def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -1296,7 +1428,7 @@ async def get_vnet_from_server_farm( ) -> "_models.VnetInfoResource": """Get a Virtual Network associated with an App Service plan. - Description for 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 @@ -1315,18 +1447,25 @@ async def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1341,7 +1480,7 @@ async def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -1355,7 +1494,7 @@ async def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -1376,6 +1515,8 @@ async def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -1383,12 +1524,17 @@ async def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1403,7 +1549,7 @@ async def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1418,7 +1564,7 @@ async def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -1441,6 +1587,7 @@ async def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -1451,6 +1598,7 @@ async def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -1458,7 +1606,11 @@ async def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1473,7 +1625,7 @@ async def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -1486,8 +1638,7 @@ async def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -1506,18 +1657,25 @@ async def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1690,7 @@ async def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace_async @@ -1546,7 +1704,7 @@ async def get_route_for_vnet( ) -> List["_models.VnetRoute"]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -1567,6 +1725,8 @@ async def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -1574,12 +1734,17 @@ async def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1594,7 +1759,7 @@ async def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1609,7 +1774,7 @@ async def create_or_update_vnet_route( ) -> "_models.VnetRoute": """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1632,6 +1797,7 @@ async def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1642,6 +1808,7 @@ async def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -1649,7 +1816,11 @@ async def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1664,11 +1835,11 @@ async def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def delete_vnet_route( + async def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1678,7 +1849,7 @@ async def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -1699,6 +1870,8 @@ async def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -1706,12 +1879,17 @@ async def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1722,7 +1900,7 @@ async def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async @@ -1737,7 +1915,7 @@ async def update_vnet_route( ) -> "_models.VnetRoute": """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -1760,6 +1938,7 @@ async def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -1770,6 +1949,7 @@ async def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -1777,7 +1957,11 @@ async def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1792,11 +1976,11 @@ async def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace_async - async def reboot_worker( + async def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1805,7 +1989,7 @@ async def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -1824,18 +2008,25 @@ async def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1846,5 +2037,5 @@ async def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificate_orders_diagnostics_operations.py index 477496eda3c3..192787c76ce8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificate_orders_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificate_orders_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ def list_app_service_certificate_order_detector_response( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """Microsoft.CertificateRegistration to get the list of detectors for this RP. - Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + 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 @@ -69,6 +68,8 @@ def list_app_service_certificate_order_detector_response( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_certificate_order_detector_response.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + list_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors"} # type: ignore @distributed_trace_async async def get_app_service_certificate_order_detector_response( @@ -138,8 +145,7 @@ async def get_app_service_certificate_order_detector_response( ) -> "_models.DetectorResponse": """Microsoft.CertificateRegistration call to get a detector response from App Lens. - Description for Microsoft.CertificateRegistration call to get a detector response from App - Lens. + 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 @@ -147,11 +153,11 @@ async def get_app_service_certificate_order_detector_response( :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. + :param start_time: The start time for detector response. Default value is None. :type start_time: ~datetime.datetime - :param end_time: The end time for the detector response. + :param end_time: The end time for the detector response. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: The time grain for the detector response. + :param time_grain: The time grain for the detector response. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -164,12 +170,15 @@ async def get_app_service_certificate_order_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_app_service_certificate_order_detector_response_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -178,7 +187,11 @@ async def get_app_service_certificate_order_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -193,5 +206,5 @@ async def get_app_service_certificate_order_detector_response( return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore + get_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificate_registration_provider_operations.py index 521013a05c70..b2c3d696e0fe 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificates_operations.py index 8602ab19b53d..5dbd3beb6e3f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -54,10 +53,10 @@ def list( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :param filter: Return only information specified in the filter (using OData syntax). For - example: $filter=KeyVaultId eq 'KeyVaultId'. + example: $filter=KeyVaultId eq 'KeyVaultId'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -66,6 +65,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -76,6 +77,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list.metadata['url'], ) @@ -86,6 +88,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -104,7 +107,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -118,7 +125,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -128,7 +135,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -139,6 +146,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -150,6 +159,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -160,6 +170,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,7 +266,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -257,7 +279,7 @@ async def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -276,6 +298,7 @@ async def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -284,6 +307,7 @@ async def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -291,7 +315,11 @@ async def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -306,11 +334,11 @@ async def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -318,7 +346,7 @@ async def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -335,17 +363,24 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -356,7 +391,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace_async @@ -369,7 +404,7 @@ async def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -388,6 +423,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -396,6 +432,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -403,7 +440,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -418,5 +459,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_container_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_container_apps_operations.py index ba05d9272a62..b21ce98c286a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_container_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_container_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -64,6 +63,8 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_subscription.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps'} # type: ignore + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps"} # type: ignore @distributed_trace def list_by_resource_group( @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps"} # type: ignore @distributed_trace_async async def get( @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(container_app_envelope, 'ContainerApp') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -289,7 +317,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore @distributed_trace_async @@ -302,7 +330,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.ContainerApp"]: """Create or update a Container App. - Description for Create or update a Container App. + Create or update a Container App. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -323,8 +351,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.ContainerApp] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] lro_delay = kwargs.pop( 'polling_interval', @@ -336,6 +365,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, container_app_envelope=container_app_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -360,12 +390,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -377,17 +406,24 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -397,11 +433,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -409,7 +445,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete a Container App. - Description for Delete a Container App. + Delete a Container App. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -427,7 +463,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -438,6 +475,7 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -458,10 +496,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore @distributed_trace_async async def list_secrets( @@ -486,16 +523,23 @@ async def list_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_secrets_request( subscription_id=self._config.subscription_id, name=name, + api_version=api_version, template_url=self.list_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -510,5 +554,5 @@ async def list_secrets( return deserialized - list_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets'} # type: ignore + list_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_container_apps_revisions_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_container_apps_revisions_operations.py index 6b441815359d..1d59c08738f8 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_container_apps_revisions_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_container_apps_revisions_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -67,6 +66,8 @@ def list_revisions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.RevisionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RevisionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -79,6 +80,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, container_app_name=container_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_revisions.metadata['url'], ) request = _convert_request(request) @@ -90,6 +92,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, container_app_name=container_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -107,7 +110,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +128,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_revisions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions'} # type: ignore + list_revisions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions"} # type: ignore @distributed_trace_async async def get_revision( @@ -152,18 +159,25 @@ async def get_revision( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_revision_request( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_revision.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -178,11 +192,11 @@ async def get_revision( return deserialized - get_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}'} # type: ignore + get_revision.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}"} # type: ignore @distributed_trace_async - async def activate_revision( + async def activate_revision( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, container_app_name: str, @@ -210,18 +224,25 @@ async def activate_revision( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_activate_revision_request( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.activate_revision.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -232,11 +253,11 @@ async def activate_revision( if cls: return cls(pipeline_response, None, {}) - activate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate'} # type: ignore + activate_revision.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate"} # type: ignore @distributed_trace_async - async def deactivate_revision( + async def deactivate_revision( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, container_app_name: str, @@ -264,18 +285,25 @@ async def deactivate_revision( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_deactivate_revision_request( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.deactivate_revision.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -286,11 +314,11 @@ async def deactivate_revision( if cls: return cls(pipeline_response, None, {}) - deactivate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate'} # type: ignore + deactivate_revision.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate"} # type: ignore @distributed_trace_async - async def restart_revision( + async def restart_revision( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, container_app_name: str, @@ -318,18 +346,25 @@ async def restart_revision( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_restart_revision_request( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.restart_revision.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,5 +375,5 @@ async def restart_revision( if cls: return cls(pipeline_response, None, {}) - restart_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart'} # type: ignore + restart_revision.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_deleted_web_apps_operations.py index 4d444e91af82..c87105a3bfd6 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -122,7 +129,7 @@ def list_by_location( ) -> AsyncIterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -133,6 +140,8 @@ def list_by_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -144,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -154,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -171,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -185,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace_async async def get_deleted_web_app_by_location( @@ -196,7 +211,7 @@ async def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -213,17 +228,24 @@ async def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -238,5 +260,5 @@ async def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_diagnostics_operations.py index 2b97176884ba..723f0052d2dd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -25,7 +24,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class DiagnosticsOperations: +class DiagnosticsOperations: # pylint: disable=too-many-public-methods """DiagnosticsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -56,7 +55,7 @@ def list_hosting_environment_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -69,6 +68,8 @@ def list_hosting_environment_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -92,6 +94,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -109,7 +112,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +130,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace_async async def get_hosting_environment_detector_response( @@ -138,7 +145,7 @@ async def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -146,11 +153,11 @@ async def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -163,12 +170,15 @@ async def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -177,7 +187,11 @@ async def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -192,7 +206,7 @@ async def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -204,7 +218,7 @@ def list_site_detector_responses( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -217,6 +231,8 @@ def list_site_detector_responses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -229,6 +245,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -240,6 +257,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -257,7 +275,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -271,7 +293,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response( @@ -286,7 +308,7 @@ async def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -294,11 +316,11 @@ async def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -311,12 +333,15 @@ async def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -325,7 +350,11 @@ async def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -340,7 +369,7 @@ async def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -352,7 +381,7 @@ def list_site_diagnostic_categories( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -365,6 +394,8 @@ def list_site_diagnostic_categories( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -377,6 +408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -388,6 +420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -405,7 +438,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -419,7 +456,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category( @@ -431,7 +468,7 @@ async def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -450,18 +487,25 @@ async def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -476,7 +520,7 @@ async def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -489,7 +533,7 @@ def list_site_analyses( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -504,6 +548,8 @@ def list_site_analyses( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -517,6 +563,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -529,6 +576,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -546,7 +594,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -560,7 +612,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis( @@ -573,7 +625,7 @@ async def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -594,6 +646,8 @@ async def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -601,12 +655,17 @@ async def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -621,7 +680,7 @@ async def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -638,7 +697,7 @@ async def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -648,11 +707,11 @@ async def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -665,6 +724,8 @@ async def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -672,6 +733,7 @@ async def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -680,7 +742,11 @@ async def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -695,7 +761,7 @@ async def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -708,7 +774,7 @@ def list_site_detectors( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -723,6 +789,8 @@ def list_site_detectors( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +804,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -748,6 +817,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -765,7 +835,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -779,7 +853,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector( @@ -792,7 +866,7 @@ async def get_site_detector( ) -> "_models.DetectorDefinitionResource": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -813,6 +887,8 @@ async def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -820,12 +896,17 @@ async def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -840,7 +921,7 @@ async def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -857,7 +938,7 @@ async def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -867,11 +948,11 @@ async def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -884,6 +965,8 @@ async def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -891,6 +974,7 @@ async def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -899,7 +983,11 @@ async def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -914,7 +1002,7 @@ async def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -927,7 +1015,7 @@ def list_site_detector_responses_slot( ) -> AsyncIterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -942,6 +1030,8 @@ def list_site_detector_responses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -955,6 +1045,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -967,6 +1058,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -984,7 +1076,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -998,7 +1094,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_response_slot( @@ -1014,7 +1110,7 @@ async def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1024,11 +1120,11 @@ async def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1041,6 +1137,8 @@ async def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1048,6 +1146,7 @@ async def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1056,7 +1155,11 @@ async def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1071,7 +1174,7 @@ async def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1084,7 +1187,7 @@ def list_site_diagnostic_categories_slot( ) -> AsyncIterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1099,6 +1202,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1112,6 +1217,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -1124,6 +1230,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1141,7 +1248,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1155,7 +1266,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace_async async def get_site_diagnostic_category_slot( @@ -1168,7 +1279,7 @@ async def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1189,6 +1300,8 @@ async def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -1196,12 +1309,17 @@ async def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1216,7 +1334,7 @@ async def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1230,7 +1348,7 @@ def list_site_analyses_slot( ) -> AsyncIterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1247,6 +1365,8 @@ def list_site_analyses_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1261,6 +1381,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -1274,6 +1395,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1291,7 +1413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1305,7 +1431,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace_async async def get_site_analysis_slot( @@ -1319,7 +1445,7 @@ async def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1342,6 +1468,8 @@ async def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1350,12 +1478,17 @@ async def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1370,7 +1503,7 @@ async def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace_async @@ -1388,7 +1521,7 @@ async def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1400,11 +1533,11 @@ async def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1417,6 +1550,8 @@ async def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -1425,6 +1560,7 @@ async def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1433,7 +1569,11 @@ async def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1448,7 +1588,7 @@ async def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1462,7 +1602,7 @@ def list_site_detectors_slot( ) -> AsyncIterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1479,6 +1619,8 @@ def list_site_detectors_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1493,6 +1635,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -1506,6 +1649,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1523,7 +1667,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1537,7 +1685,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace_async async def get_site_detector_slot( @@ -1551,7 +1699,7 @@ async def get_site_detector_slot( ) -> "_models.DetectorDefinitionResource": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1574,6 +1722,8 @@ async def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1582,12 +1732,17 @@ async def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1602,7 +1757,7 @@ async def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace_async @@ -1620,7 +1775,7 @@ async def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1632,11 +1787,11 @@ async def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1649,6 +1804,8 @@ async def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -1657,6 +1814,7 @@ async def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1665,7 +1823,11 @@ async def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1680,5 +1842,5 @@ async def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_domain_registration_provider_operations.py index 55b2e8858f29..108c1c94ba71 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,8 +52,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -64,6 +62,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +73,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -81,6 +82,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +100,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +118,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_domains_operations.py index 22f597cd7ed7..2ee7a7172f9c 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,7 +55,7 @@ async def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier @@ -71,12 +70,14 @@ async def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -84,7 +85,11 @@ async def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -99,7 +104,7 @@ async def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -109,7 +114,7 @@ def list( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) @@ -117,6 +122,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -127,6 +134,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -136,6 +144,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -153,7 +162,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -167,7 +180,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get_control_center_sso_request( @@ -176,7 +189,7 @@ async def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -189,15 +202,22 @@ async def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +232,7 @@ async def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -223,7 +243,7 @@ def list_recommendations( ) -> AsyncIterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2021_03_01.models.DomainRecommendationSearchParameters @@ -234,6 +254,7 @@ def list_recommendations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -247,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -259,6 +281,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -278,7 +301,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -292,7 +319,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -302,7 +329,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -312,6 +339,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -323,6 +352,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -333,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -350,7 +381,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -364,7 +399,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace_async async def get( @@ -375,7 +410,7 @@ async def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -392,17 +427,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +459,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore async def _create_or_update_initial( @@ -433,6 +475,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -441,6 +484,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -448,7 +492,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -466,7 +514,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -479,7 +527,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -500,8 +548,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -513,6 +562,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -537,13 +587,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -552,7 +601,7 @@ async def delete( ) -> None: """Delete a domain. - Description for 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 @@ -572,18 +621,25 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -594,7 +650,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace_async @@ -607,7 +663,7 @@ async def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -626,6 +682,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -634,6 +691,7 @@ async def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -641,7 +699,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -660,7 +722,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -672,7 +734,7 @@ def list_ownership_identifiers( ) -> AsyncIterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -685,6 +747,8 @@ def list_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -697,6 +761,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -708,6 +773,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -725,7 +791,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -739,7 +809,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_ownership_identifier( @@ -751,7 +821,7 @@ async def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -770,18 +840,25 @@ async def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -796,7 +873,7 @@ async def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -811,8 +888,8 @@ async def create_or_update_ownership_identifier( """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. + 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 @@ -833,6 +910,7 @@ async def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -842,6 +920,7 @@ async def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -849,7 +928,11 @@ async def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -864,11 +947,11 @@ async def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def delete_ownership_identifier( + async def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -877,7 +960,7 @@ async def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -896,18 +979,25 @@ async def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -918,7 +1008,7 @@ async def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async @@ -933,8 +1023,8 @@ async def update_ownership_identifier( """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. + 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 @@ -955,6 +1045,7 @@ async def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -964,6 +1055,7 @@ async def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -971,7 +1063,11 @@ async def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -986,11 +1082,11 @@ async def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace_async - async def renew( + async def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -998,7 +1094,7 @@ async def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1015,17 +1111,24 @@ async def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1036,7 +1139,7 @@ async def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore @distributed_trace_async @@ -1065,17 +1168,24 @@ async def transfer_out( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_transfer_out_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.transfer_out.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1090,5 +1200,5 @@ async def transfer_out( return deserialized - transfer_out.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut'} # type: ignore + transfer_out.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_global_operations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_global_operations_operations.py index 577e10013d5e..204bb2d73610 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_global_operations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_global_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, List, Optional, TypeVar from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse @@ -52,7 +51,7 @@ async def get_deleted_web_app( ) -> "_models.DeletedSite": """Get deleted app for a subscription. - Description for Get deleted app for a subscription. + 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 @@ -67,16 +66,23 @@ async def get_deleted_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deleted_web_app_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -91,7 +97,7 @@ async def get_deleted_web_app( return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}"} # type: ignore @distributed_trace_async @@ -102,7 +108,7 @@ async def get_deleted_web_app_snapshots( ) -> List["_models.Snapshot"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + 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 @@ -117,16 +123,23 @@ async def get_deleted_web_app_snapshots( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deleted_web_app_snapshots_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_snapshots.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -141,11 +154,11 @@ async def get_deleted_web_app_snapshots( return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + get_deleted_web_app_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots"} # type: ignore @distributed_trace_async - async def get_subscription_operation_with_async_response( + async def get_subscription_operation_with_async_response( # pylint: disable=inconsistent-return-statements self, location: str, operation_id: str, @@ -153,7 +166,7 @@ async def get_subscription_operation_with_async_response( ) -> None: """Gets an operation in a subscription and given region. - Description for Gets an operation in a subscription and given region. + Gets an operation in a subscription and given region. :param location: Location name. :type location: str @@ -170,17 +183,24 @@ async def get_subscription_operation_with_async_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_subscription_operation_with_async_response_request( location=location, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_operation_with_async_response.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -191,5 +211,5 @@ async def get_subscription_operation_with_async_response( if cls: return cls(pipeline_response, None, {}) - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore + get_subscription_operation_with_async_response.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_kube_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_kube_environments_operations.py index 4d388d0ff2fa..2bfaf8f6722f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_kube_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_kube_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,7 +54,7 @@ def list_by_subscription( ) -> AsyncIterable["_models.KubeEnvironmentCollection"]: """Get all Kubernetes Environments for a subscription. - Description for Get all Kubernetes Environments for a subscription. + Get all Kubernetes Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KubeEnvironmentCollection or the result of @@ -64,6 +63,8 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +75,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_subscription.metadata['url'], ) request = _convert_request(request) @@ -83,6 +85,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -100,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -114,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.KubeEnvironmentCollection"]: """Get all the Kubernetes Environments in a resource group. - Description for Get all the Kubernetes Environments in a resource group. + 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 @@ -135,6 +142,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -146,6 +155,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -156,6 +166,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -173,7 +184,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -187,7 +202,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace_async async def get( @@ -198,7 +213,7 @@ async def get( ) -> "_models.KubeEnvironment": """Get the properties of a Kubernetes Environment. - Description for Get the properties of a Kubernetes Environment. + 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 @@ -215,17 +230,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -240,7 +262,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore async def _create_or_update_initial( @@ -256,6 +278,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') @@ -264,6 +287,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -271,7 +295,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -289,7 +317,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async @@ -302,7 +330,7 @@ async def begin_create_or_update( ) -> AsyncLROPoller["_models.KubeEnvironment"]: """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -323,8 +351,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.KubeEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -336,6 +365,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -360,12 +390,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore - async def _delete_initial( + async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -377,17 +406,24 @@ async def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -397,11 +433,11 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async - async def begin_delete( + async def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -409,7 +445,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Delete a Kubernetes Environment. - Description for Delete a Kubernetes Environment. + Delete a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -427,7 +463,8 @@ async def begin_delete( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -438,6 +475,7 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -458,10 +496,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace_async async def update( @@ -473,7 +510,7 @@ async def update( ) -> "_models.KubeEnvironment": """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -493,6 +530,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentPatchResource') @@ -501,6 +539,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -508,7 +547,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -527,5 +570,5 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_provider_operations.py index c77049dd6174..f907d95655bc 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -15,7 +14,6 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -54,9 +52,9 @@ def get_available_stacks( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_03_01.models.Enum15 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -65,6 +63,8 @@ def get_available_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -74,6 +74,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -83,6 +84,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -101,7 +103,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -115,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def get_function_app_stacks( @@ -125,9 +131,9 @@ def get_function_app_stacks( ) -> AsyncIterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions. - Description for Get available Function app frameworks and their versions. + Get available Function app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_03_01.models.Enum16 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -136,6 +142,8 @@ def get_function_app_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks.metadata['url'], ) @@ -154,6 +163,7 @@ def prepare_request(next_link=None): else: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + get_function_app_stacks.metadata = {'url': "/providers/Microsoft.Web/functionAppStacks"} # type: ignore @distributed_trace def get_function_app_stacks_for_location( @@ -197,11 +211,11 @@ def get_function_app_stacks_for_location( ) -> AsyncIterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions for location. - Description for Get available Function app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_03_01.models.Enum17 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -210,6 +224,8 @@ def get_function_app_stacks_for_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -220,6 +236,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks_for_location.metadata['url'], ) @@ -230,6 +247,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -248,7 +266,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -262,7 +284,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + get_function_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/functionAppStacks"} # type: ignore @distributed_trace def get_web_app_stacks_for_location( @@ -273,11 +295,11 @@ def get_web_app_stacks_for_location( ) -> AsyncIterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions for location. - Description for Get available Web app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_03_01.models.Enum18 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -286,6 +308,8 @@ def get_web_app_stacks_for_location( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -296,6 +320,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks_for_location.metadata['url'], ) @@ -306,6 +331,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -324,7 +350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,7 +368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + get_web_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/webAppStacks"} # type: ignore @distributed_trace def list_operations( @@ -348,8 +378,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -358,6 +388,8 @@ def list_operations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -367,6 +399,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -375,6 +408,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -392,7 +426,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -406,7 +444,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_web_app_stacks( @@ -416,9 +454,9 @@ def get_web_app_stacks( ) -> AsyncIterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions. - Description for Get available Web app frameworks and their versions. + Get available Web app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_03_01.models.Enum19 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -427,6 +465,8 @@ def get_web_app_stacks( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -436,6 +476,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks.metadata['url'], ) @@ -445,6 +486,7 @@ def prepare_request(next_link=None): else: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -463,7 +505,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -477,7 +523,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + get_web_app_stacks.metadata = {'url': "/providers/Microsoft.Web/webAppStacks"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -487,9 +533,9 @@ def get_available_stacks_on_prem( ) -> AsyncIterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_03_01.models.Enum20 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -498,6 +544,8 @@ def get_available_stacks_on_prem( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -508,6 +556,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -518,6 +567,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -536,7 +586,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -550,4 +604,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_recommendations_operations.py index 5ec34e27f89e..237cbd01563a 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -55,14 +54,14 @@ def list( ) -> AsyncIterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -71,6 +70,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -81,6 +82,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -92,6 +94,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -111,7 +114,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -125,16 +132,16 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace_async - async def reset_all_filters( + async def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -147,15 +154,22 @@ async def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -166,19 +180,18 @@ async def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_subscription( + async def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -193,16 +206,23 @@ async def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -213,7 +233,7 @@ async def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -227,7 +247,7 @@ def list_history_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -238,7 +258,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -247,6 +267,8 @@ def list_history_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -259,6 +281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -272,6 +295,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -291,7 +315,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -305,7 +333,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -318,7 +346,7 @@ def list_recommended_rules_for_hosting_environment( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -328,7 +356,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -337,6 +365,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -349,6 +379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -362,6 +393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -381,7 +413,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,10 +431,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_hosting_environment( + async def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -407,7 +443,7 @@ async def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -426,18 +462,25 @@ async def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -448,11 +491,11 @@ async def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_hosting_environment( + async def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -461,7 +504,7 @@ async def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -480,18 +523,25 @@ async def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -502,7 +552,7 @@ async def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -517,7 +567,7 @@ async def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -526,10 +576,10 @@ async def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -542,12 +592,15 @@ async def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -555,7 +608,11 @@ async def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -570,11 +627,11 @@ async def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_hosting_environment( + async def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -584,7 +641,7 @@ async def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -605,19 +662,26 @@ async def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -628,7 +692,7 @@ async def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -642,7 +706,7 @@ def list_history_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -653,7 +717,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -662,6 +726,8 @@ def list_history_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -674,6 +740,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -687,6 +754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -706,7 +774,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -720,7 +792,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -733,7 +805,7 @@ def list_recommended_rules_for_web_app( ) -> AsyncIterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -743,7 +815,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -752,6 +824,8 @@ def list_recommended_rules_for_web_app( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -764,6 +838,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -777,6 +852,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -796,7 +872,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -810,10 +890,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace_async - async def disable_all_for_web_app( + async def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -821,7 +901,7 @@ async def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -838,17 +918,24 @@ async def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -859,11 +946,11 @@ async def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace_async - async def reset_all_filters_for_web_app( + async def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -871,7 +958,7 @@ async def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -888,17 +975,24 @@ async def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -909,7 +1003,7 @@ async def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace_async @@ -924,7 +1018,7 @@ async def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -933,10 +1027,10 @@ async def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -949,12 +1043,15 @@ async def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -962,7 +1059,11 @@ async def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,11 +1078,11 @@ async def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace_async - async def disable_recommendation_for_site( + async def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -990,7 +1091,7 @@ async def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1009,18 +1110,25 @@ async def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1031,5 +1139,5 @@ async def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_resource_health_metadata_operations.py index 554f5b1c8c0c..3b0beaaed8db 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -122,8 +129,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -134,6 +140,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -145,6 +153,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -155,6 +164,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -172,7 +182,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -186,7 +200,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -197,8 +211,7 @@ def list_by_site( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -211,6 +224,8 @@ def list_by_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -223,6 +238,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -234,6 +250,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -251,7 +268,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -265,7 +286,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site( @@ -276,7 +297,7 @@ async def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -293,17 +314,24 @@ async def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -318,7 +346,7 @@ async def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -331,8 +359,7 @@ def list_by_site_slot( ) -> AsyncIterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -347,6 +374,8 @@ def list_by_site_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -360,6 +389,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -372,6 +402,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -389,7 +420,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -403,7 +438,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace_async async def get_by_site_slot( @@ -415,7 +450,7 @@ async def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -434,18 +469,25 @@ async def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -460,5 +502,5 @@ async def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_static_sites_operations.py index 34129e3a2839..99015f079063 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -26,7 +25,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class StaticSitesOperations: +class StaticSitesOperations: # pylint: disable=too-many-public-methods """StaticSitesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -57,7 +56,7 @@ async def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -76,6 +75,7 @@ async def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -83,6 +83,7 @@ async def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -90,7 +91,11 @@ async def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -105,7 +110,7 @@ async def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -115,7 +120,7 @@ def list( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -124,6 +129,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -134,6 +141,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -143,6 +151,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -160,7 +169,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -174,7 +187,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -184,7 +197,7 @@ def get_static_sites_by_resource_group( ) -> AsyncIterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -195,6 +208,8 @@ def get_static_sites_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -206,6 +221,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -216,6 +232,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -233,7 +250,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -247,7 +268,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace_async async def get_static_site( @@ -258,7 +279,7 @@ async def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -275,17 +296,24 @@ async def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -300,7 +328,7 @@ async def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore async def _create_or_update_static_site_initial( @@ -316,6 +344,7 @@ async def _create_or_update_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -324,6 +353,7 @@ async def _create_or_update_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_initial.metadata['url'], @@ -331,7 +361,11 @@ async def _create_or_update_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -349,7 +383,7 @@ async def _create_or_update_static_site_initial( return deserialized - _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _create_or_update_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async @@ -362,8 +396,7 @@ async def begin_create_or_update_static_site( ) -> AsyncLROPoller["_models.StaticSiteARMResource"]: """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -385,8 +418,9 @@ async def begin_create_or_update_static_site( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.StaticSiteARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -398,6 +432,7 @@ async def begin_create_or_update_static_site( resource_group_name=resource_group_name, name=name, static_site_envelope=static_site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -422,12 +457,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore - async def _delete_static_site_initial( + async def _delete_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -439,17 +473,24 @@ async def _delete_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -459,11 +500,11 @@ async def _delete_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _delete_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site( + async def begin_delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -471,7 +512,7 @@ async def begin_delete_static_site( ) -> AsyncLROPoller[None]: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -489,7 +530,8 @@ async def begin_delete_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -500,6 +542,7 @@ async def begin_delete_static_site( raw_result = await self._delete_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -520,10 +563,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace_async async def update_static_site( @@ -535,8 +577,7 @@ async def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -555,6 +596,7 @@ async def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -563,6 +605,7 @@ async def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -570,7 +613,11 @@ async def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -589,7 +636,7 @@ async def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -602,7 +649,7 @@ def list_static_site_users( ) -> AsyncIterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -617,6 +664,8 @@ def list_static_site_users( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -630,6 +679,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -642,6 +692,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -659,7 +710,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -673,10 +728,10 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace_async - async def delete_static_site_user( + async def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -686,7 +741,7 @@ async def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -707,6 +762,8 @@ async def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -714,12 +771,17 @@ async def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -730,7 +792,7 @@ async def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace_async @@ -745,7 +807,7 @@ async def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -769,6 +831,7 @@ async def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -779,6 +842,7 @@ async def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -786,7 +850,11 @@ async def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -801,7 +869,7 @@ async def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -813,7 +881,7 @@ def get_static_site_builds( ) -> AsyncIterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -826,6 +894,8 @@ def get_static_site_builds( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -838,6 +908,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -849,6 +920,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -866,7 +938,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -880,7 +956,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace_async async def get_static_site_build( @@ -892,7 +968,7 @@ async def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -911,18 +987,25 @@ async def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -937,10 +1020,10 @@ async def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore - async def _delete_static_site_build_initial( + async def _delete_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -953,18 +1036,25 @@ async def _delete_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_static_site_build_request_initial( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_build_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -974,11 +1064,11 @@ async def _delete_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + _delete_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site_build( + async def begin_delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -987,7 +1077,7 @@ async def begin_delete_static_site_build( ) -> AsyncLROPoller[None]: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1007,7 +1097,8 @@ async def begin_delete_static_site_build( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1019,6 +1110,7 @@ async def begin_delete_static_site_build( resource_group_name=resource_group_name, name=name, environment_name=environment_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -1039,10 +1131,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + begin_delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace_async async def create_or_update_static_site_build_app_settings( @@ -1055,7 +1146,7 @@ async def create_or_update_static_site_build_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site build. - Description for Creates or updates the app settings of a static site build. + 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 @@ -1076,6 +1167,7 @@ async def create_or_update_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1085,6 +1177,7 @@ async def create_or_update_static_site_build_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_app_settings.metadata['url'], @@ -1092,7 +1185,11 @@ async def create_or_update_static_site_build_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1107,7 +1204,7 @@ async def create_or_update_static_site_build_app_settings( return deserialized - create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + create_or_update_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1121,7 +1218,7 @@ async def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -1142,6 +1239,7 @@ async def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1151,6 +1249,7 @@ async def create_or_update_static_site_build_function_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -1158,7 +1257,11 @@ async def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1173,7 +1276,7 @@ async def create_or_update_static_site_build_function_app_settings( return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings"} # type: ignore @distributed_trace @@ -1186,7 +1289,7 @@ def list_static_site_build_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -1201,6 +1304,8 @@ def list_static_site_build_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1214,6 +1319,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -1226,6 +1332,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1243,7 +1350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1257,7 +1368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions"} # type: ignore @distributed_trace_async async def list_static_site_build_app_settings( @@ -1269,7 +1380,7 @@ async def list_static_site_build_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -1288,18 +1399,25 @@ async def list_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_build_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1314,7 +1432,7 @@ async def list_static_site_build_app_settings( return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + list_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings"} # type: ignore @distributed_trace_async @@ -1327,7 +1445,7 @@ async def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -1346,18 +1464,25 @@ async def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1372,7 +1497,7 @@ async def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -1385,8 +1510,7 @@ def get_user_provided_function_apps_for_static_site_build( ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site build. - Description for Gets the details of the user provided function apps registered with a static - site build. + 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 @@ -1401,6 +1525,8 @@ def get_user_provided_function_apps_for_static_site_build( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1414,6 +1540,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site_build.metadata['url'], ) request = _convert_request(request) @@ -1426,6 +1553,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1443,7 +1571,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1457,7 +1589,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps"} # type: ignore @distributed_trace_async async def get_user_provided_function_app_for_static_site_build( @@ -1470,8 +1602,7 @@ async def get_user_provided_function_app_for_static_site_build( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site build. - Description for Gets the details of the user provided function app registered with a static - site build. + 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 @@ -1492,6 +1623,8 @@ async def get_user_provided_function_app_for_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_user_provided_function_app_for_static_site_build_request( resource_group_name=resource_group_name, @@ -1499,12 +1632,17 @@ async def get_user_provided_function_app_for_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1519,7 +1657,7 @@ async def get_user_provided_function_app_for_static_site_build( return deserialized - get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore async def _register_user_provided_function_app_with_static_site_build_initial( @@ -1538,6 +1676,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -1548,6 +1687,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -1556,7 +1696,11 @@ async def _register_user_provided_function_app_with_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1574,7 +1718,7 @@ async def _register_user_provided_function_app_with_static_site_build_initial( return deserialized - _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async @@ -1590,7 +1734,7 @@ async def begin_register_user_provided_function_app_with_static_site_build( ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site build. - Description for Register a user provided function app with a static site build. + 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 @@ -1622,8 +1766,9 @@ async def begin_register_user_provided_function_app_with_static_site_build( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1638,6 +1783,7 @@ async def begin_register_user_provided_function_app_with_static_site_build( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1662,13 +1808,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async - async def detach_user_provided_function_app_from_static_site_build( + async def detach_user_provided_function_app_from_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1678,7 +1823,7 @@ async def detach_user_provided_function_app_from_static_site_build( ) -> None: """Detach the user provided function app from the static site build. - Description for Detach the user provided function app from the static site build. + 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 @@ -1699,6 +1844,8 @@ async def detach_user_provided_function_app_from_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_build_request( resource_group_name=resource_group_name, @@ -1706,12 +1853,17 @@ async def detach_user_provided_function_app_from_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1722,10 +1874,10 @@ async def detach_user_provided_function_app_from_static_site_build( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - async def _create_zip_deployment_for_static_site_build_initial( + async def _create_zip_deployment_for_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1739,6 +1891,7 @@ async def _create_zip_deployment_for_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -1748,6 +1901,7 @@ async def _create_zip_deployment_for_static_site_build_initial( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_build_initial.metadata['url'], @@ -1755,7 +1909,11 @@ async def _create_zip_deployment_for_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1765,11 +1923,11 @@ async def _create_zip_deployment_for_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace_async - async def begin_create_zip_deployment_for_static_site_build( + async def begin_create_zip_deployment_for_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1779,7 +1937,7 @@ async def begin_create_zip_deployment_for_static_site_build( ) -> AsyncLROPoller[None]: """Deploys zipped content to a specific environment of a static site. - Description for Deploys zipped content to a specific environment of a static site. + 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 @@ -1803,8 +1961,9 @@ async def begin_create_zip_deployment_for_static_site_build( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1817,6 +1976,7 @@ async def begin_create_zip_deployment_for_static_site_build( name=name, environment_name=environment_name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1838,10 +1998,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace_async async def create_or_update_static_site_app_settings( @@ -1853,7 +2012,7 @@ async def create_or_update_static_site_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site. - Description for Creates or updates the app settings of a static site. + 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 @@ -1872,6 +2031,7 @@ async def create_or_update_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1880,6 +2040,7 @@ async def create_or_update_static_site_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_app_settings.metadata['url'], @@ -1887,7 +2048,11 @@ async def create_or_update_static_site_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1902,7 +2067,7 @@ async def create_or_update_static_site_app_settings( return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + create_or_update_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1915,7 +2080,7 @@ async def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -1934,6 +2099,7 @@ async def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1942,6 +2108,7 @@ async def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -1949,7 +2116,11 @@ async def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1964,7 +2135,7 @@ async def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace_async @@ -1977,7 +2148,7 @@ async def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -1997,6 +2168,7 @@ async def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -2005,6 +2177,7 @@ async def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -2012,7 +2185,11 @@ async def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2027,7 +2204,7 @@ async def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -2039,7 +2216,7 @@ def list_static_site_custom_domains( ) -> AsyncIterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -2052,6 +2229,8 @@ def list_static_site_custom_domains( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2064,6 +2243,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -2075,6 +2255,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2092,7 +2273,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2106,7 +2291,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace_async async def get_static_site_custom_domain( @@ -2118,7 +2303,7 @@ async def get_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Gets an existing custom domain for a particular static site. - Description for Gets an existing custom domain for a particular static site. + 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 @@ -2137,18 +2322,25 @@ async def get_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2163,7 +2355,7 @@ async def get_static_site_custom_domain( return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + get_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore async def _create_or_update_static_site_custom_domain_initial( @@ -2180,6 +2372,7 @@ async def _create_or_update_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -2189,6 +2382,7 @@ async def _create_or_update_static_site_custom_domain_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_custom_domain_initial.metadata['url'], @@ -2196,7 +2390,11 @@ async def _create_or_update_static_site_custom_domain_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2214,7 +2412,7 @@ async def _create_or_update_static_site_custom_domain_initial( return deserialized - _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _create_or_update_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async @@ -2228,8 +2426,7 @@ async def begin_create_or_update_static_site_custom_domain( ) -> AsyncLROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -2255,8 +2452,9 @@ async def begin_create_or_update_static_site_custom_domain( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.StaticSiteCustomDomainOverviewARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2269,6 +2467,7 @@ async def begin_create_or_update_static_site_custom_domain( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2293,12 +2492,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - async def _delete_static_site_custom_domain_initial( + async def _delete_static_site_custom_domain_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2311,18 +2509,25 @@ async def _delete_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_static_site_custom_domain_request_initial( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_custom_domain_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2332,11 +2537,11 @@ async def _delete_static_site_custom_domain_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _delete_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace_async - async def begin_delete_static_site_custom_domain( + async def begin_delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2345,7 +2550,7 @@ async def begin_delete_static_site_custom_domain( ) -> AsyncLROPoller[None]: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2365,7 +2570,8 @@ async def begin_delete_static_site_custom_domain( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2377,6 +2583,7 @@ async def begin_delete_static_site_custom_domain( resource_group_name=resource_group_name, name=name, domain_name=domain_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2397,12 +2604,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - async def _validate_custom_domain_can_be_added_to_static_site_initial( + async def _validate_custom_domain_can_be_added_to_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2416,6 +2622,7 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -2425,6 +2632,7 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'], @@ -2432,7 +2640,11 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2442,11 +2654,11 @@ async def _validate_custom_domain_can_be_added_to_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace_async - async def begin_validate_custom_domain_can_be_added_to_static_site( + async def begin_validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2456,7 +2668,7 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( ) -> AsyncLROPoller[None]: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -2480,8 +2692,9 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2494,6 +2707,7 @@ async def begin_validate_custom_domain_can_be_added_to_static_site( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2515,12 +2729,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore - async def _detach_static_site_initial( + async def _detach_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2532,17 +2745,24 @@ async def _detach_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_detach_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._detach_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2552,11 +2772,11 @@ async def _detach_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + _detach_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace_async - async def begin_detach_static_site( + async def begin_detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2564,7 +2784,7 @@ async def begin_detach_static_site( ) -> AsyncLROPoller[None]: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2582,7 +2802,8 @@ async def begin_detach_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2593,6 +2814,7 @@ async def begin_detach_static_site( raw_result = await self._detach_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2613,10 +2835,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + begin_detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace def list_static_site_functions( @@ -2627,7 +2848,7 @@ def list_static_site_functions( ) -> AsyncIterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -2640,6 +2861,8 @@ def list_static_site_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2652,6 +2875,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -2663,6 +2887,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2680,7 +2905,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2694,7 +2923,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace_async async def list_static_site_app_settings( @@ -2705,7 +2934,7 @@ async def list_static_site_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2722,17 +2951,24 @@ async def list_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2747,7 +2983,7 @@ async def list_static_site_app_settings( return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + list_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings"} # type: ignore @distributed_trace_async @@ -2759,7 +2995,7 @@ async def list_static_site_configured_roles( ) -> "_models.StringList": """Lists the roles configured for the static site. - Description for Lists the roles configured for the static site. + 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 @@ -2776,17 +3012,24 @@ async def list_static_site_configured_roles( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_configured_roles_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_configured_roles.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2801,7 +3044,7 @@ async def list_static_site_configured_roles( return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + list_static_site_configured_roles.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles"} # type: ignore @distributed_trace_async @@ -2813,7 +3056,7 @@ async def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -2830,17 +3073,24 @@ async def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2855,7 +3105,7 @@ async def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace_async @@ -2867,7 +3117,7 @@ async def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -2884,17 +3134,24 @@ async def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2909,7 +3166,7 @@ async def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace @@ -2921,7 +3178,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a static site. - Description for Gets the list of private endpoint connections associated with a static site. + 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 @@ -2934,6 +3191,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2946,6 +3205,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -2957,6 +3217,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2974,7 +3235,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2988,7 +3253,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -3000,7 +3265,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3019,18 +3284,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3045,7 +3317,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -3062,6 +3334,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -3071,6 +3344,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -3078,7 +3352,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3096,7 +3374,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -3110,7 +3388,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -3135,8 +3413,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3149,6 +3428,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3173,10 +3453,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -3191,18 +3470,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3223,7 +3509,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -3236,7 +3522,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3256,7 +3542,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -3268,6 +3555,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3291,10 +3579,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -3305,7 +3592,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3322,17 +3609,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,11 +3641,11 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources"} # type: ignore @distributed_trace_async - async def reset_static_site_api_key( + async def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3360,7 +3654,7 @@ async def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -3380,6 +3674,7 @@ async def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -3388,6 +3683,7 @@ async def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -3395,7 +3691,11 @@ async def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3406,7 +3706,7 @@ async def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore @distributed_trace @@ -3418,8 +3718,7 @@ def get_user_provided_function_apps_for_static_site( ) -> AsyncIterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site. - Description for Gets the details of the user provided function apps registered with a static - site. + 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 @@ -3432,6 +3731,8 @@ def get_user_provided_function_apps_for_static_site( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3444,6 +3745,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site.metadata['url'], ) request = _convert_request(request) @@ -3455,6 +3757,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3472,7 +3775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3486,7 +3793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps"} # type: ignore @distributed_trace_async async def get_user_provided_function_app_for_static_site( @@ -3498,8 +3805,7 @@ async def get_user_provided_function_app_for_static_site( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site. - Description for Gets the details of the user provided function app registered with a static - site. + 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 @@ -3518,18 +3824,25 @@ async def get_user_provided_function_app_for_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_user_provided_function_app_for_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3544,7 +3857,7 @@ async def get_user_provided_function_app_for_static_site( return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore async def _register_user_provided_function_app_with_static_site_initial( @@ -3562,6 +3875,7 @@ async def _register_user_provided_function_app_with_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -3571,6 +3885,7 @@ async def _register_user_provided_function_app_with_static_site_initial( name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -3579,7 +3894,11 @@ async def _register_user_provided_function_app_with_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3597,7 +3916,7 @@ async def _register_user_provided_function_app_with_static_site_initial( return deserialized - _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async @@ -3612,7 +3931,7 @@ async def begin_register_user_provided_function_app_with_static_site( ) -> AsyncLROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site. - Description for Register a user provided function app with a static site. + 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 @@ -3642,8 +3961,9 @@ async def begin_register_user_provided_function_app_with_static_site( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3657,6 +3977,7 @@ async def begin_register_user_provided_function_app_with_static_site( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3681,13 +4002,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace_async - async def detach_user_provided_function_app_from_static_site( + async def detach_user_provided_function_app_from_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3696,7 +4016,7 @@ async def detach_user_provided_function_app_from_static_site( ) -> None: """Detach the user provided function app from the static site. - Description for Detach the user provided function app from the static site. + 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 @@ -3715,18 +4035,25 @@ async def detach_user_provided_function_app_from_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3737,10 +4064,10 @@ async def detach_user_provided_function_app_from_static_site( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - async def _create_zip_deployment_for_static_site_initial( + async def _create_zip_deployment_for_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3753,6 +4080,7 @@ async def _create_zip_deployment_for_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -3761,6 +4089,7 @@ async def _create_zip_deployment_for_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_initial.metadata['url'], @@ -3768,7 +4097,11 @@ async def _create_zip_deployment_for_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3778,11 +4111,11 @@ async def _create_zip_deployment_for_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore @distributed_trace_async - async def begin_create_zip_deployment_for_static_site( + async def begin_create_zip_deployment_for_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3791,7 +4124,7 @@ async def begin_create_zip_deployment_for_static_site( ) -> AsyncLROPoller[None]: """Deploys zipped content to a static site. - Description for Deploys zipped content to a static site. + 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 @@ -3813,8 +4146,9 @@ async def begin_create_zip_deployment_for_static_site( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -3826,6 +4160,7 @@ async def begin_create_zip_deployment_for_static_site( resource_group_name=resource_group_name, name=name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3847,7 +4182,6 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_top_level_domains_operations.py index 3eb058acf60d..dc974ccb728f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -53,7 +52,7 @@ def list( ) -> AsyncIterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -62,6 +61,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -72,6 +73,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -81,6 +83,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -98,7 +101,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace_async async def get( @@ -122,7 +129,7 @@ async def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -137,16 +144,23 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -161,7 +175,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -173,7 +187,7 @@ def list_agreements( ) -> AsyncIterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -186,6 +200,7 @@ def list_agreements( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -200,6 +215,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -213,6 +229,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -232,7 +249,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -246,4 +267,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_web_apps_operations.py index 3ca2b575c0f3..1a17ce340826 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,11 +21,11 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._web_apps_operations import build_add_premier_add_on_request, build_add_premier_add_on_slot_request, build_analyze_custom_hostname_request, build_analyze_custom_hostname_slot_request, build_apply_slot_config_to_production_request, build_apply_slot_configuration_slot_request, build_approve_or_reject_private_endpoint_connection_request_initial, build_approve_or_reject_private_endpoint_connection_slot_request_initial, build_backup_request, build_backup_slot_request, build_create_deployment_request, build_create_deployment_slot_request, build_create_function_request_initial, build_create_instance_function_slot_request_initial, build_create_instance_ms_deploy_operation_request_initial, build_create_instance_ms_deploy_operation_slot_request_initial, build_create_ms_deploy_operation_request_initial, build_create_ms_deploy_operation_slot_request_initial, build_create_one_deploy_operation_request, build_create_or_update_configuration_request, build_create_or_update_configuration_slot_request, build_create_or_update_domain_ownership_identifier_request, build_create_or_update_domain_ownership_identifier_slot_request, build_create_or_update_function_secret_request, build_create_or_update_function_secret_slot_request, build_create_or_update_host_name_binding_request, build_create_or_update_host_name_binding_slot_request, build_create_or_update_host_secret_request, build_create_or_update_host_secret_slot_request, build_create_or_update_hybrid_connection_request, build_create_or_update_hybrid_connection_slot_request, build_create_or_update_public_certificate_request, build_create_or_update_public_certificate_slot_request, build_create_or_update_relay_service_connection_request, build_create_or_update_relay_service_connection_slot_request, build_create_or_update_request_initial, build_create_or_update_slot_request_initial, build_create_or_update_source_control_request_initial, build_create_or_update_source_control_slot_request_initial, build_create_or_update_swift_virtual_network_connection_with_check_request, build_create_or_update_swift_virtual_network_connection_with_check_slot_request, build_create_or_update_vnet_connection_gateway_request, build_create_or_update_vnet_connection_gateway_slot_request, build_create_or_update_vnet_connection_request, build_create_or_update_vnet_connection_slot_request, build_delete_backup_configuration_request, build_delete_backup_configuration_slot_request, build_delete_backup_request, build_delete_backup_slot_request, build_delete_continuous_web_job_request, build_delete_continuous_web_job_slot_request, build_delete_deployment_request, build_delete_deployment_slot_request, build_delete_domain_ownership_identifier_request, build_delete_domain_ownership_identifier_slot_request, build_delete_function_request, build_delete_function_secret_request, build_delete_function_secret_slot_request, build_delete_host_name_binding_request, build_delete_host_name_binding_slot_request, build_delete_host_secret_request, build_delete_host_secret_slot_request, build_delete_hybrid_connection_request, build_delete_hybrid_connection_slot_request, build_delete_instance_function_slot_request, build_delete_instance_process_request, build_delete_instance_process_slot_request, build_delete_premier_add_on_request, build_delete_premier_add_on_slot_request, build_delete_private_endpoint_connection_request_initial, build_delete_private_endpoint_connection_slot_request_initial, build_delete_process_request, build_delete_process_slot_request, build_delete_public_certificate_request, build_delete_public_certificate_slot_request, build_delete_relay_service_connection_request, build_delete_relay_service_connection_slot_request, build_delete_request, build_delete_site_extension_request, build_delete_site_extension_slot_request, build_delete_slot_request, build_delete_source_control_request, build_delete_source_control_slot_request, build_delete_swift_virtual_network_request, build_delete_swift_virtual_network_slot_request, build_delete_triggered_web_job_request, build_delete_triggered_web_job_slot_request, build_delete_vnet_connection_request, build_delete_vnet_connection_slot_request, build_discover_backup_request, build_discover_backup_slot_request, build_generate_new_site_publishing_password_request, build_generate_new_site_publishing_password_slot_request, build_get_app_setting_key_vault_reference_request, build_get_app_setting_key_vault_reference_slot_request, build_get_app_settings_key_vault_references_request, build_get_app_settings_key_vault_references_slot_request, build_get_auth_settings_request, build_get_auth_settings_slot_request, build_get_auth_settings_v2_request, build_get_auth_settings_v2_slot_request, build_get_auth_settings_v2_without_secrets_request, build_get_backup_configuration_request, build_get_backup_configuration_slot_request, build_get_backup_status_request, build_get_backup_status_slot_request, build_get_configuration_request, build_get_configuration_slot_request, build_get_configuration_snapshot_request, build_get_configuration_snapshot_slot_request, build_get_container_logs_zip_request, build_get_container_logs_zip_slot_request, build_get_continuous_web_job_request, build_get_continuous_web_job_slot_request, build_get_deployment_request, build_get_deployment_slot_request, build_get_diagnostic_logs_configuration_request, build_get_diagnostic_logs_configuration_slot_request, build_get_domain_ownership_identifier_request, build_get_domain_ownership_identifier_slot_request, build_get_ftp_allowed_request, build_get_ftp_allowed_slot_request, build_get_function_request, build_get_functions_admin_token_request, build_get_functions_admin_token_slot_request, build_get_host_name_binding_request, build_get_host_name_binding_slot_request, build_get_hybrid_connection_request, build_get_hybrid_connection_slot_request, build_get_instance_function_slot_request, build_get_instance_info_request, build_get_instance_info_slot_request, build_get_instance_ms_deploy_log_request, build_get_instance_ms_deploy_log_slot_request, build_get_instance_ms_deploy_status_request, build_get_instance_ms_deploy_status_slot_request, build_get_instance_process_dump_request, build_get_instance_process_dump_slot_request, build_get_instance_process_module_request, build_get_instance_process_module_slot_request, build_get_instance_process_request, build_get_instance_process_slot_request, build_get_migrate_my_sql_status_request, build_get_migrate_my_sql_status_slot_request, build_get_ms_deploy_log_request, build_get_ms_deploy_log_slot_request, build_get_ms_deploy_status_request, build_get_ms_deploy_status_slot_request, build_get_network_trace_operation_request, build_get_network_trace_operation_slot_request, build_get_network_trace_operation_slot_v2_request, build_get_network_trace_operation_v2_request, build_get_network_traces_request, build_get_network_traces_slot_request, build_get_network_traces_slot_v2_request, build_get_network_traces_v2_request, build_get_one_deploy_status_request, build_get_premier_add_on_request, build_get_premier_add_on_slot_request, build_get_private_access_request, build_get_private_access_slot_request, build_get_private_endpoint_connection_list_request, build_get_private_endpoint_connection_list_slot_request, build_get_private_endpoint_connection_request, build_get_private_endpoint_connection_slot_request, build_get_private_link_resources_request, build_get_private_link_resources_slot_request, build_get_process_dump_request, build_get_process_dump_slot_request, build_get_process_module_request, build_get_process_module_slot_request, build_get_process_request, build_get_process_slot_request, build_get_public_certificate_request, build_get_public_certificate_slot_request, build_get_relay_service_connection_request, build_get_relay_service_connection_slot_request, build_get_request, build_get_scm_allowed_request, build_get_scm_allowed_slot_request, build_get_site_connection_string_key_vault_reference_request, build_get_site_connection_string_key_vault_reference_slot_request, build_get_site_connection_string_key_vault_references_request, build_get_site_connection_string_key_vault_references_slot_request, build_get_site_extension_request, build_get_site_extension_slot_request, build_get_site_php_error_log_flag_request, build_get_site_php_error_log_flag_slot_request, build_get_slot_request, build_get_source_control_request, build_get_source_control_slot_request, build_get_swift_virtual_network_connection_request, build_get_swift_virtual_network_connection_slot_request, build_get_triggered_web_job_history_request, build_get_triggered_web_job_history_slot_request, build_get_triggered_web_job_request, build_get_triggered_web_job_slot_request, build_get_vnet_connection_gateway_request, build_get_vnet_connection_gateway_slot_request, build_get_vnet_connection_request, build_get_vnet_connection_slot_request, build_get_web_job_request, build_get_web_job_slot_request, build_get_web_site_container_logs_request, build_get_web_site_container_logs_slot_request, build_install_site_extension_request_initial, build_install_site_extension_slot_request_initial, build_is_cloneable_request, build_is_cloneable_slot_request, build_list_application_settings_request, build_list_application_settings_slot_request, build_list_azure_storage_accounts_request, build_list_azure_storage_accounts_slot_request, build_list_backup_status_secrets_request, build_list_backup_status_secrets_slot_request, build_list_backups_request, build_list_backups_slot_request, build_list_basic_publishing_credentials_policies_request, build_list_basic_publishing_credentials_policies_slot_request, build_list_by_resource_group_request, build_list_configuration_snapshot_info_request, build_list_configuration_snapshot_info_slot_request, build_list_configurations_request, build_list_configurations_slot_request, build_list_connection_strings_request, build_list_connection_strings_slot_request, build_list_continuous_web_jobs_request, build_list_continuous_web_jobs_slot_request, build_list_deployment_log_request, build_list_deployment_log_slot_request, build_list_deployments_request, build_list_deployments_slot_request, build_list_domain_ownership_identifiers_request, build_list_domain_ownership_identifiers_slot_request, build_list_function_keys_request, build_list_function_keys_slot_request, build_list_function_secrets_request, build_list_function_secrets_slot_request, build_list_functions_request, build_list_host_keys_request, build_list_host_keys_slot_request, build_list_host_name_bindings_request, build_list_host_name_bindings_slot_request, build_list_hybrid_connections_request, build_list_hybrid_connections_slot_request, build_list_instance_functions_slot_request, build_list_instance_identifiers_request, build_list_instance_identifiers_slot_request, build_list_instance_process_modules_request, build_list_instance_process_modules_slot_request, build_list_instance_process_threads_request, build_list_instance_process_threads_slot_request, build_list_instance_processes_request, build_list_instance_processes_slot_request, build_list_metadata_request, build_list_metadata_slot_request, build_list_network_features_request, build_list_network_features_slot_request, build_list_perf_mon_counters_request, build_list_perf_mon_counters_slot_request, build_list_premier_add_ons_request, build_list_premier_add_ons_slot_request, build_list_process_modules_request, build_list_process_modules_slot_request, build_list_process_threads_request, build_list_process_threads_slot_request, build_list_processes_request, build_list_processes_slot_request, build_list_public_certificates_request, build_list_public_certificates_slot_request, build_list_publishing_credentials_request_initial, build_list_publishing_credentials_slot_request_initial, build_list_publishing_profile_xml_with_secrets_request, build_list_publishing_profile_xml_with_secrets_slot_request, build_list_relay_service_connections_request, build_list_relay_service_connections_slot_request, build_list_request, build_list_site_backups_request, build_list_site_backups_slot_request, build_list_site_extensions_request, build_list_site_extensions_slot_request, build_list_site_push_settings_request, build_list_site_push_settings_slot_request, build_list_slot_configuration_names_request, build_list_slot_differences_from_production_request, build_list_slot_differences_slot_request, build_list_slots_request, build_list_snapshots_from_dr_secondary_request, build_list_snapshots_from_dr_secondary_slot_request, build_list_snapshots_request, build_list_snapshots_slot_request, build_list_sync_function_triggers_request, build_list_sync_function_triggers_slot_request, build_list_sync_status_request, build_list_sync_status_slot_request, build_list_triggered_web_job_history_request, build_list_triggered_web_job_history_slot_request, build_list_triggered_web_jobs_request, build_list_triggered_web_jobs_slot_request, build_list_usages_request, build_list_usages_slot_request, build_list_vnet_connections_request, build_list_vnet_connections_slot_request, build_list_web_jobs_request, build_list_web_jobs_slot_request, build_migrate_my_sql_request_initial, build_migrate_storage_request_initial, build_put_private_access_vnet_request, build_put_private_access_vnet_slot_request, build_recover_site_configuration_snapshot_request, build_recover_site_configuration_snapshot_slot_request, build_reset_production_slot_config_request, build_reset_slot_configuration_slot_request, build_restart_request, build_restart_slot_request, build_restore_from_backup_blob_request_initial, build_restore_from_backup_blob_slot_request_initial, build_restore_from_deleted_app_request_initial, build_restore_from_deleted_app_slot_request_initial, build_restore_request_initial, build_restore_slot_request_initial, build_restore_snapshot_request_initial, build_restore_snapshot_slot_request_initial, build_run_triggered_web_job_request, build_run_triggered_web_job_slot_request, build_start_continuous_web_job_request, build_start_continuous_web_job_slot_request, build_start_network_trace_request_initial, build_start_network_trace_slot_request_initial, build_start_request, build_start_slot_request, build_start_web_site_network_trace_operation_request_initial, build_start_web_site_network_trace_operation_slot_request_initial, build_start_web_site_network_trace_request, build_start_web_site_network_trace_slot_request, build_stop_continuous_web_job_request, build_stop_continuous_web_job_slot_request, build_stop_network_trace_request, build_stop_network_trace_slot_request, build_stop_request, build_stop_slot_request, build_stop_web_site_network_trace_request, build_stop_web_site_network_trace_slot_request, build_swap_slot_request_initial, build_swap_slot_with_production_request_initial, build_sync_function_triggers_request, build_sync_function_triggers_slot_request, build_sync_functions_request, build_sync_functions_slot_request, build_sync_repository_request, build_sync_repository_slot_request, build_update_application_settings_request, build_update_application_settings_slot_request, build_update_auth_settings_request, build_update_auth_settings_slot_request, build_update_auth_settings_v2_request, build_update_auth_settings_v2_slot_request, build_update_azure_storage_accounts_request, build_update_azure_storage_accounts_slot_request, build_update_backup_configuration_request, build_update_backup_configuration_slot_request, build_update_configuration_request, build_update_configuration_slot_request, build_update_connection_strings_request, build_update_connection_strings_slot_request, build_update_diagnostic_logs_config_request, build_update_diagnostic_logs_config_slot_request, build_update_domain_ownership_identifier_request, build_update_domain_ownership_identifier_slot_request, build_update_ftp_allowed_request, build_update_ftp_allowed_slot_request, build_update_hybrid_connection_request, build_update_hybrid_connection_slot_request, build_update_metadata_request, build_update_metadata_slot_request, build_update_premier_add_on_request, build_update_premier_add_on_slot_request, build_update_relay_service_connection_request, build_update_relay_service_connection_slot_request, build_update_request, build_update_scm_allowed_request, build_update_scm_allowed_slot_request, build_update_site_push_settings_request, build_update_site_push_settings_slot_request, build_update_slot_configuration_names_request, build_update_slot_request, build_update_source_control_request, build_update_source_control_slot_request, build_update_swift_virtual_network_connection_with_check_request, build_update_swift_virtual_network_connection_with_check_slot_request, build_update_vnet_connection_gateway_request, build_update_vnet_connection_gateway_slot_request, build_update_vnet_connection_request, build_update_vnet_connection_slot_request +from ...operations._web_apps_operations import build_add_premier_add_on_request, build_add_premier_add_on_slot_request, build_analyze_custom_hostname_request, build_analyze_custom_hostname_slot_request, build_apply_slot_config_to_production_request, build_apply_slot_configuration_slot_request, build_approve_or_reject_private_endpoint_connection_request_initial, build_approve_or_reject_private_endpoint_connection_slot_request_initial, build_backup_request, build_backup_slot_request, build_create_deployment_request, build_create_deployment_slot_request, build_create_function_request_initial, build_create_instance_function_slot_request_initial, build_create_instance_ms_deploy_operation_request_initial, build_create_instance_ms_deploy_operation_slot_request_initial, build_create_ms_deploy_operation_request_initial, build_create_ms_deploy_operation_slot_request_initial, build_create_one_deploy_operation_request, build_create_or_update_configuration_request, build_create_or_update_configuration_slot_request, build_create_or_update_domain_ownership_identifier_request, build_create_or_update_domain_ownership_identifier_slot_request, build_create_or_update_function_secret_request, build_create_or_update_function_secret_slot_request, build_create_or_update_host_name_binding_request, build_create_or_update_host_name_binding_slot_request, build_create_or_update_host_secret_request, build_create_or_update_host_secret_slot_request, build_create_or_update_hybrid_connection_request, build_create_or_update_hybrid_connection_slot_request, build_create_or_update_public_certificate_request, build_create_or_update_public_certificate_slot_request, build_create_or_update_relay_service_connection_request, build_create_or_update_relay_service_connection_slot_request, build_create_or_update_request_initial, build_create_or_update_slot_request_initial, build_create_or_update_source_control_request_initial, build_create_or_update_source_control_slot_request_initial, build_create_or_update_swift_virtual_network_connection_with_check_request, build_create_or_update_swift_virtual_network_connection_with_check_slot_request, build_create_or_update_vnet_connection_gateway_request, build_create_or_update_vnet_connection_gateway_slot_request, build_create_or_update_vnet_connection_request, build_create_or_update_vnet_connection_slot_request, build_delete_backup_configuration_request, build_delete_backup_configuration_slot_request, build_delete_backup_request, build_delete_backup_slot_request, build_delete_continuous_web_job_request, build_delete_continuous_web_job_slot_request, build_delete_deployment_request, build_delete_deployment_slot_request, build_delete_domain_ownership_identifier_request, build_delete_domain_ownership_identifier_slot_request, build_delete_function_request, build_delete_function_secret_request, build_delete_function_secret_slot_request, build_delete_host_name_binding_request, build_delete_host_name_binding_slot_request, build_delete_host_secret_request, build_delete_host_secret_slot_request, build_delete_hybrid_connection_request, build_delete_hybrid_connection_slot_request, build_delete_instance_function_slot_request, build_delete_instance_process_request, build_delete_instance_process_slot_request, build_delete_premier_add_on_request, build_delete_premier_add_on_slot_request, build_delete_private_endpoint_connection_request_initial, build_delete_private_endpoint_connection_slot_request_initial, build_delete_process_request, build_delete_process_slot_request, build_delete_public_certificate_request, build_delete_public_certificate_slot_request, build_delete_relay_service_connection_request, build_delete_relay_service_connection_slot_request, build_delete_request, build_delete_site_extension_request, build_delete_site_extension_slot_request, build_delete_slot_request, build_delete_source_control_request, build_delete_source_control_slot_request, build_delete_swift_virtual_network_request, build_delete_swift_virtual_network_slot_request, build_delete_triggered_web_job_request, build_delete_triggered_web_job_slot_request, build_delete_vnet_connection_request, build_delete_vnet_connection_slot_request, build_discover_backup_request, build_discover_backup_slot_request, build_generate_new_site_publishing_password_request, build_generate_new_site_publishing_password_slot_request, build_get_app_setting_key_vault_reference_request, build_get_app_setting_key_vault_reference_slot_request, build_get_app_settings_key_vault_references_request, build_get_app_settings_key_vault_references_slot_request, build_get_auth_settings_request, build_get_auth_settings_slot_request, build_get_auth_settings_v2_request, build_get_auth_settings_v2_slot_request, build_get_auth_settings_v2_without_secrets_request, build_get_auth_settings_v2_without_secrets_slot_request, build_get_backup_configuration_request, build_get_backup_configuration_slot_request, build_get_backup_status_request, build_get_backup_status_slot_request, build_get_configuration_request, build_get_configuration_slot_request, build_get_configuration_snapshot_request, build_get_configuration_snapshot_slot_request, build_get_container_logs_zip_request, build_get_container_logs_zip_slot_request, build_get_continuous_web_job_request, build_get_continuous_web_job_slot_request, build_get_deployment_request, build_get_deployment_slot_request, build_get_diagnostic_logs_configuration_request, build_get_diagnostic_logs_configuration_slot_request, build_get_domain_ownership_identifier_request, build_get_domain_ownership_identifier_slot_request, build_get_ftp_allowed_request, build_get_ftp_allowed_slot_request, build_get_function_request, build_get_functions_admin_token_request, build_get_functions_admin_token_slot_request, build_get_host_name_binding_request, build_get_host_name_binding_slot_request, build_get_hybrid_connection_request, build_get_hybrid_connection_slot_request, build_get_instance_function_slot_request, build_get_instance_info_request, build_get_instance_info_slot_request, build_get_instance_ms_deploy_log_request, build_get_instance_ms_deploy_log_slot_request, build_get_instance_ms_deploy_status_request, build_get_instance_ms_deploy_status_slot_request, build_get_instance_process_dump_request, build_get_instance_process_dump_slot_request, build_get_instance_process_module_request, build_get_instance_process_module_slot_request, build_get_instance_process_request, build_get_instance_process_slot_request, build_get_migrate_my_sql_status_request, build_get_migrate_my_sql_status_slot_request, build_get_ms_deploy_log_request, build_get_ms_deploy_log_slot_request, build_get_ms_deploy_status_request, build_get_ms_deploy_status_slot_request, build_get_network_trace_operation_request, build_get_network_trace_operation_slot_request, build_get_network_trace_operation_slot_v2_request, build_get_network_trace_operation_v2_request, build_get_network_traces_request, build_get_network_traces_slot_request, build_get_network_traces_slot_v2_request, build_get_network_traces_v2_request, build_get_one_deploy_status_request, build_get_premier_add_on_request, build_get_premier_add_on_slot_request, build_get_private_access_request, build_get_private_access_slot_request, build_get_private_endpoint_connection_list_request, build_get_private_endpoint_connection_list_slot_request, build_get_private_endpoint_connection_request, build_get_private_endpoint_connection_slot_request, build_get_private_link_resources_request, build_get_private_link_resources_slot_request, build_get_process_dump_request, build_get_process_dump_slot_request, build_get_process_module_request, build_get_process_module_slot_request, build_get_process_request, build_get_process_slot_request, build_get_public_certificate_request, build_get_public_certificate_slot_request, build_get_relay_service_connection_request, build_get_relay_service_connection_slot_request, build_get_request, build_get_scm_allowed_request, build_get_scm_allowed_slot_request, build_get_site_connection_string_key_vault_reference_request, build_get_site_connection_string_key_vault_reference_slot_request, build_get_site_connection_string_key_vault_references_request, build_get_site_connection_string_key_vault_references_slot_request, build_get_site_extension_request, build_get_site_extension_slot_request, build_get_site_php_error_log_flag_request, build_get_site_php_error_log_flag_slot_request, build_get_slot_request, build_get_source_control_request, build_get_source_control_slot_request, build_get_swift_virtual_network_connection_request, build_get_swift_virtual_network_connection_slot_request, build_get_triggered_web_job_history_request, build_get_triggered_web_job_history_slot_request, build_get_triggered_web_job_request, build_get_triggered_web_job_slot_request, build_get_vnet_connection_gateway_request, build_get_vnet_connection_gateway_slot_request, build_get_vnet_connection_request, build_get_vnet_connection_slot_request, build_get_web_job_request, build_get_web_job_slot_request, build_get_web_site_container_logs_request, build_get_web_site_container_logs_slot_request, build_install_site_extension_request_initial, build_install_site_extension_slot_request_initial, build_is_cloneable_request, build_is_cloneable_slot_request, build_list_application_settings_request, build_list_application_settings_slot_request, build_list_azure_storage_accounts_request, build_list_azure_storage_accounts_slot_request, build_list_backup_status_secrets_request, build_list_backup_status_secrets_slot_request, build_list_backups_request, build_list_backups_slot_request, build_list_basic_publishing_credentials_policies_request, build_list_basic_publishing_credentials_policies_slot_request, build_list_by_resource_group_request, build_list_configuration_snapshot_info_request, build_list_configuration_snapshot_info_slot_request, build_list_configurations_request, build_list_configurations_slot_request, build_list_connection_strings_request, build_list_connection_strings_slot_request, build_list_continuous_web_jobs_request, build_list_continuous_web_jobs_slot_request, build_list_deployment_log_request, build_list_deployment_log_slot_request, build_list_deployments_request, build_list_deployments_slot_request, build_list_domain_ownership_identifiers_request, build_list_domain_ownership_identifiers_slot_request, build_list_function_keys_request, build_list_function_keys_slot_request, build_list_function_secrets_request, build_list_function_secrets_slot_request, build_list_functions_request, build_list_host_keys_request, build_list_host_keys_slot_request, build_list_host_name_bindings_request, build_list_host_name_bindings_slot_request, build_list_hybrid_connections_request, build_list_hybrid_connections_slot_request, build_list_instance_functions_slot_request, build_list_instance_identifiers_request, build_list_instance_identifiers_slot_request, build_list_instance_process_modules_request, build_list_instance_process_modules_slot_request, build_list_instance_process_threads_request, build_list_instance_process_threads_slot_request, build_list_instance_processes_request, build_list_instance_processes_slot_request, build_list_metadata_request, build_list_metadata_slot_request, build_list_network_features_request, build_list_network_features_slot_request, build_list_perf_mon_counters_request, build_list_perf_mon_counters_slot_request, build_list_premier_add_ons_request, build_list_premier_add_ons_slot_request, build_list_process_modules_request, build_list_process_modules_slot_request, build_list_process_threads_request, build_list_process_threads_slot_request, build_list_processes_request, build_list_processes_slot_request, build_list_public_certificates_request, build_list_public_certificates_slot_request, build_list_publishing_credentials_request_initial, build_list_publishing_credentials_slot_request_initial, build_list_publishing_profile_xml_with_secrets_request, build_list_publishing_profile_xml_with_secrets_slot_request, build_list_relay_service_connections_request, build_list_relay_service_connections_slot_request, build_list_request, build_list_site_backups_request, build_list_site_backups_slot_request, build_list_site_extensions_request, build_list_site_extensions_slot_request, build_list_site_push_settings_request, build_list_site_push_settings_slot_request, build_list_slot_configuration_names_request, build_list_slot_differences_from_production_request, build_list_slot_differences_slot_request, build_list_slots_request, build_list_snapshots_from_dr_secondary_request, build_list_snapshots_from_dr_secondary_slot_request, build_list_snapshots_request, build_list_snapshots_slot_request, build_list_sync_function_triggers_request, build_list_sync_function_triggers_slot_request, build_list_sync_status_request, build_list_sync_status_slot_request, build_list_triggered_web_job_history_request, build_list_triggered_web_job_history_slot_request, build_list_triggered_web_jobs_request, build_list_triggered_web_jobs_slot_request, build_list_usages_request, build_list_usages_slot_request, build_list_vnet_connections_request, build_list_vnet_connections_slot_request, build_list_web_jobs_request, build_list_web_jobs_slot_request, build_migrate_my_sql_request_initial, build_migrate_storage_request_initial, build_put_private_access_vnet_request, build_put_private_access_vnet_slot_request, build_recover_site_configuration_snapshot_request, build_recover_site_configuration_snapshot_slot_request, build_reset_production_slot_config_request, build_reset_slot_configuration_slot_request, build_restart_request, build_restart_slot_request, build_restore_from_backup_blob_request_initial, build_restore_from_backup_blob_slot_request_initial, build_restore_from_deleted_app_request_initial, build_restore_from_deleted_app_slot_request_initial, build_restore_request_initial, build_restore_slot_request_initial, build_restore_snapshot_request_initial, build_restore_snapshot_slot_request_initial, build_run_triggered_web_job_request, build_run_triggered_web_job_slot_request, build_start_continuous_web_job_request, build_start_continuous_web_job_slot_request, build_start_network_trace_request_initial, build_start_network_trace_slot_request_initial, build_start_request, build_start_slot_request, build_start_web_site_network_trace_operation_request_initial, build_start_web_site_network_trace_operation_slot_request_initial, build_start_web_site_network_trace_request, build_start_web_site_network_trace_slot_request, build_stop_continuous_web_job_request, build_stop_continuous_web_job_slot_request, build_stop_network_trace_request, build_stop_network_trace_slot_request, build_stop_request, build_stop_slot_request, build_stop_web_site_network_trace_request, build_stop_web_site_network_trace_slot_request, build_swap_slot_request_initial, build_swap_slot_with_production_request_initial, build_sync_function_triggers_request, build_sync_function_triggers_slot_request, build_sync_functions_request, build_sync_functions_slot_request, build_sync_repository_request, build_sync_repository_slot_request, build_update_application_settings_request, build_update_application_settings_slot_request, build_update_auth_settings_request, build_update_auth_settings_slot_request, build_update_auth_settings_v2_request, build_update_auth_settings_v2_slot_request, build_update_azure_storage_accounts_request, build_update_azure_storage_accounts_slot_request, build_update_backup_configuration_request, build_update_backup_configuration_slot_request, build_update_configuration_request, build_update_configuration_slot_request, build_update_connection_strings_request, build_update_connection_strings_slot_request, build_update_diagnostic_logs_config_request, build_update_diagnostic_logs_config_slot_request, build_update_domain_ownership_identifier_request, build_update_domain_ownership_identifier_slot_request, build_update_ftp_allowed_request, build_update_ftp_allowed_slot_request, build_update_hybrid_connection_request, build_update_hybrid_connection_slot_request, build_update_metadata_request, build_update_metadata_slot_request, build_update_premier_add_on_request, build_update_premier_add_on_slot_request, build_update_relay_service_connection_request, build_update_relay_service_connection_slot_request, build_update_request, build_update_scm_allowed_request, build_update_scm_allowed_slot_request, build_update_site_push_settings_request, build_update_site_push_settings_slot_request, build_update_slot_configuration_names_request, build_update_slot_request, build_update_source_control_request, build_update_source_control_slot_request, build_update_swift_virtual_network_connection_with_check_request, build_update_swift_virtual_network_connection_with_check_slot_request, build_update_vnet_connection_gateway_request, build_update_vnet_connection_gateway_slot_request, build_update_vnet_connection_request, build_update_vnet_connection_slot_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WebAppsOperations: +class WebAppsOperations: # pylint: disable=too-many-public-methods """WebAppsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -55,7 +54,7 @@ def list( ) -> AsyncIterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) @@ -63,6 +62,8 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -73,6 +74,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -82,6 +84,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -99,7 +102,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -113,7 +120,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -124,7 +131,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -137,6 +144,8 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -148,6 +157,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -159,6 +169,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -177,7 +188,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -191,7 +206,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace_async async def get( @@ -202,7 +217,7 @@ async def get( ) -> "_models.Site": """Gets the details of a web, mobile, or API app. - Description for 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 @@ -219,17 +234,24 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,7 +266,7 @@ async def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore async def _create_or_update_initial( @@ -260,6 +282,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -268,6 +291,7 @@ async def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -275,7 +299,11 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -293,7 +321,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -307,8 +335,8 @@ async def begin_create_or_update( """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. + 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 @@ -329,8 +357,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -342,6 +371,7 @@ async def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -366,13 +396,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async - async def delete( + async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -382,16 +411,16 @@ async def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -404,11 +433,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -416,7 +448,11 @@ async def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -427,7 +463,7 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -441,8 +477,8 @@ async def update( """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. + 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 @@ -462,6 +498,7 @@ async def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -470,6 +507,7 @@ async def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -477,7 +515,11 @@ async def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -496,7 +538,7 @@ async def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace_async @@ -509,13 +551,13 @@ async def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -528,18 +570,25 @@ async def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -554,11 +603,11 @@ async def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_config_to_production( + async def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -567,7 +616,7 @@ async def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -586,6 +635,7 @@ async def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -594,6 +644,7 @@ async def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -601,7 +652,11 @@ async def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +667,7 @@ async def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -625,7 +680,7 @@ async def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -645,6 +700,7 @@ async def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -653,6 +709,7 @@ async def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -660,7 +717,11 @@ async def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -675,7 +736,7 @@ async def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -687,7 +748,7 @@ def list_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -700,6 +761,8 @@ def list_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -712,6 +775,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -723,6 +787,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -740,7 +805,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -754,7 +823,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace_async async def get_backup_status( @@ -766,7 +835,7 @@ async def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -785,18 +854,25 @@ async def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -811,11 +887,11 @@ async def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup( + async def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -824,7 +900,7 @@ async def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -843,18 +919,25 @@ async def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -865,7 +948,7 @@ async def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -881,9 +964,9 @@ async def list_backup_status_secrets( 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. + 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 @@ -904,6 +987,7 @@ async def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -913,6 +997,7 @@ async def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -920,7 +1005,11 @@ async def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -935,10 +1024,10 @@ async def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - async def _restore_initial( + async def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -952,6 +1041,7 @@ async def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -961,6 +1051,7 @@ async def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -968,7 +1059,11 @@ async def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -978,11 +1073,11 @@ async def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore( + async def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -992,7 +1087,7 @@ async def begin_restore( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -1014,8 +1109,9 @@ async def begin_restore( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1028,6 +1124,7 @@ async def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1049,10 +1146,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_basic_publishing_credentials_policies( @@ -1063,8 +1159,7 @@ def list_basic_publishing_credentials_policies( ) -> AsyncIterable["_models.PublishingCredentialsPoliciesCollection"]: """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. + 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 @@ -1077,6 +1172,8 @@ def list_basic_publishing_credentials_policies( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PublishingCredentialsPoliciesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublishingCredentialsPoliciesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1089,6 +1186,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) @@ -1100,6 +1198,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1117,7 +1216,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1131,7 +1234,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + list_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async async def get_ftp_allowed( @@ -1142,7 +1245,7 @@ async def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -1159,17 +1262,24 @@ async def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1184,7 +1294,7 @@ async def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1197,7 +1307,7 @@ async def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -1217,6 +1327,7 @@ async def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1225,6 +1336,7 @@ async def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -1232,7 +1344,11 @@ async def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1247,7 +1363,7 @@ async def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -1259,7 +1375,7 @@ async def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -1276,17 +1392,24 @@ async def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1301,7 +1424,7 @@ async def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -1314,7 +1437,7 @@ async def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -1334,6 +1457,7 @@ async def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -1342,6 +1466,7 @@ async def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -1349,7 +1474,11 @@ async def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1364,7 +1493,7 @@ async def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -1376,7 +1505,7 @@ def list_configurations( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -1389,6 +1518,8 @@ def list_configurations( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1401,6 +1532,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -1412,6 +1544,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1429,7 +1562,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1443,7 +1580,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace_async async def update_application_settings( @@ -1455,7 +1592,7 @@ async def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -1474,6 +1611,7 @@ async def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -1482,6 +1620,7 @@ async def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -1489,7 +1628,11 @@ async def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1504,7 +1647,7 @@ async def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace_async @@ -1516,7 +1659,7 @@ async def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -1533,17 +1676,24 @@ async def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1558,7 +1708,7 @@ async def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -1571,7 +1721,7 @@ async def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -1590,6 +1740,7 @@ async def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -1598,6 +1749,7 @@ async def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -1605,7 +1757,11 @@ async def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1620,7 +1776,7 @@ async def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace_async @@ -1632,7 +1788,7 @@ async def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -1649,17 +1805,24 @@ async def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1674,7 +1837,7 @@ async def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace_async @@ -1686,7 +1849,7 @@ async def get_auth_settings_v2_without_secrets( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -1703,17 +1866,24 @@ async def get_auth_settings_v2_without_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_v2_without_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_without_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1728,7 +1898,7 @@ async def get_auth_settings_v2_without_secrets( return deserialized - get_auth_settings_v2_without_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + get_auth_settings_v2_without_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -1741,8 +1911,7 @@ async def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -1761,6 +1930,7 @@ async def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -1769,6 +1939,7 @@ async def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -1776,7 +1947,11 @@ async def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1791,7 +1966,7 @@ async def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -1803,7 +1978,7 @@ async def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -1820,17 +1995,24 @@ async def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1845,7 +2027,7 @@ async def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -1858,7 +2040,7 @@ async def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -1878,6 +2060,7 @@ async def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -1886,6 +2069,7 @@ async def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -1893,7 +2077,11 @@ async def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1908,7 +2096,7 @@ async def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -1920,7 +2108,7 @@ async def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -1937,17 +2125,24 @@ async def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1962,7 +2157,7 @@ async def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -1975,7 +2170,7 @@ async def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -1994,6 +2189,7 @@ async def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -2002,6 +2198,7 @@ async def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -2009,7 +2206,11 @@ async def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2024,11 +2225,11 @@ async def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration( + async def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2036,7 +2237,7 @@ async def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -2053,17 +2254,24 @@ async def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2074,7 +2282,7 @@ async def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace_async @@ -2086,7 +2294,7 @@ async def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -2103,17 +2311,24 @@ async def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2128,7 +2343,7 @@ async def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -2140,7 +2355,7 @@ def get_app_settings_key_vault_references( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -2153,6 +2368,8 @@ def get_app_settings_key_vault_references( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2165,6 +2382,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -2176,6 +2394,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2193,7 +2412,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2207,7 +2430,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async async def get_app_setting_key_vault_reference( @@ -2219,7 +2442,7 @@ async def get_app_setting_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2238,18 +2461,25 @@ async def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2264,7 +2494,7 @@ async def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -2276,7 +2506,7 @@ def get_site_connection_string_key_vault_references( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -2289,6 +2519,8 @@ def get_site_connection_string_key_vault_references( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2301,6 +2533,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -2312,6 +2545,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2329,7 +2563,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2343,7 +2581,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace_async async def get_site_connection_string_key_vault_reference( @@ -2355,7 +2593,7 @@ async def get_site_connection_string_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -2374,18 +2612,25 @@ async def get_site_connection_string_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_connection_string_key_vault_reference_request( resource_group_name=resource_group_name, name=name, connection_string_key=connection_string_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2400,7 +2645,7 @@ async def get_site_connection_string_key_vault_reference( return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace_async @@ -2413,7 +2658,7 @@ async def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -2432,6 +2677,7 @@ async def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -2440,6 +2686,7 @@ async def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -2447,7 +2694,11 @@ async def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2462,7 +2713,7 @@ async def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -2474,7 +2725,7 @@ async def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -2491,17 +2742,24 @@ async def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2516,7 +2774,7 @@ async def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -2528,7 +2786,7 @@ async def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -2545,17 +2803,24 @@ async def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2570,7 +2835,7 @@ async def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2583,7 +2848,7 @@ async def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -2603,6 +2868,7 @@ async def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -2611,6 +2877,7 @@ async def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -2618,7 +2885,11 @@ async def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2633,7 +2904,7 @@ async def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace_async @@ -2646,7 +2917,7 @@ async def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -2665,6 +2936,7 @@ async def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -2673,6 +2945,7 @@ async def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -2680,7 +2953,11 @@ async def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2695,7 +2972,7 @@ async def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace_async @@ -2707,7 +2984,7 @@ async def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -2724,17 +3001,24 @@ async def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2749,7 +3033,7 @@ async def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_initial( @@ -2764,17 +3048,24 @@ async def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2788,7 +3079,7 @@ async def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -2800,7 +3091,7 @@ async def begin_list_publishing_credentials( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -2818,7 +3109,8 @@ async def begin_list_publishing_credentials( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -2829,6 +3121,7 @@ async def begin_list_publishing_credentials( raw_result = await self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2852,10 +3145,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings( @@ -2867,7 +3159,7 @@ async def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -2886,6 +3178,7 @@ async def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -2894,6 +3187,7 @@ async def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -2901,7 +3195,11 @@ async def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2916,7 +3214,7 @@ async def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -2928,7 +3226,7 @@ async def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -2945,17 +3243,24 @@ async def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2970,7 +3275,7 @@ async def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -2982,8 +3287,7 @@ async def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -3000,17 +3304,24 @@ async def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3025,7 +3336,7 @@ async def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -3039,8 +3350,8 @@ async def update_slot_configuration_names( """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. + 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 @@ -3059,6 +3370,7 @@ async def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -3067,6 +3379,7 @@ async def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -3074,7 +3387,11 @@ async def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3089,7 +3406,7 @@ async def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace_async @@ -3102,8 +3419,8 @@ async def get_configuration( """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. + 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 @@ -3120,17 +3437,24 @@ async def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3145,7 +3469,7 @@ async def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -3158,7 +3482,7 @@ async def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -3177,6 +3501,7 @@ async def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -3185,6 +3510,7 @@ async def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -3192,7 +3518,11 @@ async def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3207,7 +3537,7 @@ async def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace_async @@ -3220,7 +3550,7 @@ async def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -3239,6 +3569,7 @@ async def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -3247,6 +3578,7 @@ async def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -3254,7 +3586,11 @@ async def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3269,7 +3605,7 @@ async def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -3282,8 +3618,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -3296,6 +3632,8 @@ def list_configuration_snapshot_info( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3308,6 +3646,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -3319,6 +3658,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3336,7 +3676,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3350,7 +3694,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot( @@ -3362,7 +3706,7 @@ async def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -3381,18 +3725,25 @@ async def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3407,11 +3758,11 @@ async def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot( + async def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3420,7 +3771,7 @@ async def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -3439,18 +3790,25 @@ async def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -3461,7 +3819,7 @@ async def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -3473,7 +3831,7 @@ async def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -3490,17 +3848,24 @@ async def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3516,7 +3881,7 @@ async def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace_async @@ -3528,7 +3893,7 @@ async def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -3545,17 +3910,24 @@ async def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3571,7 +3943,7 @@ async def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -3583,7 +3955,7 @@ def list_continuous_web_jobs( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -3596,6 +3968,8 @@ def list_continuous_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3608,6 +3982,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -3619,6 +3994,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3636,7 +4012,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3650,7 +4030,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job( @@ -3662,7 +4042,7 @@ async def get_continuous_web_job( ) -> "_models.ContinuousWebJob": """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3681,18 +4061,25 @@ async def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3707,11 +4094,11 @@ async def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job( + async def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3720,7 +4107,7 @@ async def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -3739,18 +4126,25 @@ async def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3761,11 +4155,11 @@ async def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job( + async def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3774,7 +4168,7 @@ async def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -3793,18 +4187,25 @@ async def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3815,11 +4216,11 @@ async def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job( + async def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3828,7 +4229,7 @@ async def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -3847,18 +4248,25 @@ async def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3869,7 +4277,7 @@ async def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -3881,7 +4289,7 @@ def list_deployments( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -3894,6 +4302,8 @@ def list_deployments( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3906,6 +4316,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -3917,6 +4328,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3934,7 +4346,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3948,7 +4364,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace_async async def get_deployment( @@ -3960,7 +4376,7 @@ async def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -3979,18 +4395,25 @@ async def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4005,7 +4428,7 @@ async def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -4019,7 +4442,7 @@ async def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -4040,6 +4463,7 @@ async def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -4049,6 +4473,7 @@ async def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -4056,7 +4481,11 @@ async def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4071,11 +4500,11 @@ async def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment( + async def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4084,7 +4513,7 @@ async def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -4103,18 +4532,25 @@ async def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4125,7 +4561,7 @@ async def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -4138,7 +4574,7 @@ async def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -4158,18 +4594,25 @@ async def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4184,7 +4627,7 @@ async def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -4198,8 +4641,8 @@ async def discover_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. - 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. + 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 @@ -4219,6 +4662,7 @@ async def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -4227,6 +4671,7 @@ async def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -4234,7 +4679,11 @@ async def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4249,7 +4698,7 @@ async def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -4261,7 +4710,7 @@ def list_domain_ownership_identifiers( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -4274,6 +4723,8 @@ def list_domain_ownership_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4286,6 +4737,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -4297,6 +4749,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4314,7 +4767,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4328,7 +4785,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier( @@ -4340,7 +4797,7 @@ async def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -4359,18 +4816,25 @@ async def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4385,7 +4849,7 @@ async def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4399,8 +4863,7 @@ async def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4421,6 +4884,7 @@ async def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4430,6 +4894,7 @@ async def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -4437,7 +4902,11 @@ async def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4452,11 +4921,11 @@ async def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier( + async def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4465,7 +4934,7 @@ async def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -4484,18 +4953,25 @@ async def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -4506,7 +4982,7 @@ async def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4520,8 +4996,7 @@ async def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -4542,6 +5017,7 @@ async def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -4551,6 +5027,7 @@ async def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -4558,7 +5035,11 @@ async def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4573,7 +5054,7 @@ async def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -4585,7 +5066,7 @@ async def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -4602,17 +5083,24 @@ async def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4627,7 +5115,7 @@ async def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_initial( @@ -4643,6 +5131,7 @@ async def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -4651,6 +5140,7 @@ async def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -4658,7 +5148,11 @@ async def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -4672,7 +5166,7 @@ async def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -4685,7 +5179,7 @@ async def begin_create_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -4706,8 +5200,9 @@ async def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -4719,6 +5214,7 @@ async def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4743,10 +5239,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log( @@ -4757,7 +5252,7 @@ async def get_ms_deploy_log( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -4774,17 +5269,24 @@ async def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4799,7 +5301,7 @@ async def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace_async @@ -4811,8 +5313,7 @@ async def get_one_deploy_status( ) -> Any: """Invoke onedeploy status API /api/deployments and gets the deployment status for the site. - Description for Invoke onedeploy status API /api/deployments and gets the deployment status for - the site. + Invoke onedeploy status API /api/deployments and gets the deployment status for the site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4829,17 +5330,24 @@ async def get_one_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_one_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_one_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4854,7 +5362,7 @@ async def get_one_deploy_status( return deserialized - get_one_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy'} # type: ignore + get_one_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy"} # type: ignore @distributed_trace_async @@ -4866,7 +5374,7 @@ async def create_one_deploy_operation( ) -> Any: """Invoke the OneDeploy publish web app extension. - Description for Invoke the OneDeploy publish web app extension. + Invoke the OneDeploy publish web app extension. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4883,17 +5391,24 @@ async def create_one_deploy_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_create_one_deploy_operation_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.create_one_deploy_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4908,7 +5423,7 @@ async def create_one_deploy_operation( return deserialized - create_one_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy'} # type: ignore + create_one_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy"} # type: ignore @distributed_trace @@ -4920,7 +5435,7 @@ def list_functions( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -4933,6 +5448,8 @@ def list_functions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4945,6 +5462,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -4956,6 +5474,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4973,7 +5492,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4987,7 +5510,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token( @@ -4998,7 +5521,7 @@ async def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -5015,17 +5538,24 @@ async def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5040,7 +5570,7 @@ async def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -5053,7 +5583,7 @@ async def get_function( ) -> "_models.FunctionEnvelope": """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -5072,18 +5602,25 @@ async def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5098,7 +5635,7 @@ async def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore async def _create_function_initial( @@ -5115,6 +5652,7 @@ async def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -5124,6 +5662,7 @@ async def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -5131,7 +5670,11 @@ async def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -5145,7 +5688,7 @@ async def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -5159,7 +5702,7 @@ async def begin_create_function( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -5182,8 +5725,9 @@ async def begin_create_function( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -5196,6 +5740,7 @@ async def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5220,13 +5765,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_function( + async def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5235,7 +5779,7 @@ async def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -5254,18 +5798,25 @@ async def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5276,7 +5827,7 @@ async def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -5291,7 +5842,7 @@ async def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -5314,6 +5865,7 @@ async def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5324,6 +5876,7 @@ async def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -5331,7 +5884,11 @@ async def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5350,11 +5907,11 @@ async def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret( + async def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5364,7 +5921,7 @@ async def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -5385,6 +5942,8 @@ async def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -5392,12 +5951,17 @@ async def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5408,7 +5972,7 @@ async def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -5421,7 +5985,7 @@ async def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -5440,18 +6004,25 @@ async def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5466,7 +6037,7 @@ async def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -5479,7 +6050,7 @@ async def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -5498,18 +6069,25 @@ async def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5524,7 +6102,7 @@ async def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -5536,7 +6114,7 @@ async def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -5553,17 +6131,24 @@ async def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5578,11 +6163,11 @@ async def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status( + async def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5590,7 +6175,7 @@ async def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -5607,17 +6192,24 @@ async def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5628,11 +6220,11 @@ async def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions( + async def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5640,7 +6232,7 @@ async def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -5657,17 +6249,24 @@ async def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5678,7 +6277,7 @@ async def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace_async @@ -5693,7 +6292,7 @@ async def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -5716,6 +6315,7 @@ async def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -5726,6 +6326,7 @@ async def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -5733,7 +6334,11 @@ async def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -5752,11 +6357,11 @@ async def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret( + async def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5766,7 +6371,7 @@ async def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -5787,6 +6392,8 @@ async def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -5794,12 +6401,17 @@ async def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -5810,7 +6422,7 @@ async def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -5822,7 +6434,7 @@ def list_host_name_bindings( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -5835,6 +6447,8 @@ def list_host_name_bindings( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5847,6 +6461,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -5858,6 +6473,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5875,7 +6491,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5889,7 +6509,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding( @@ -5901,7 +6521,7 @@ async def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -5920,18 +6540,25 @@ async def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5946,7 +6573,7 @@ async def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -5960,7 +6587,7 @@ async def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -5982,6 +6609,7 @@ async def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -5991,6 +6619,7 @@ async def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -5998,7 +6627,11 @@ async def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6013,11 +6646,11 @@ async def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding( + async def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6026,7 +6659,7 @@ async def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -6045,18 +6678,25 @@ async def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -6067,7 +6707,7 @@ async def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -6081,7 +6721,7 @@ async def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -6102,6 +6742,8 @@ async def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -6109,12 +6751,17 @@ async def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6129,7 +6776,7 @@ async def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6144,7 +6791,7 @@ async def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -6167,6 +6814,7 @@ async def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -6177,6 +6825,7 @@ async def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -6184,7 +6833,11 @@ async def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6199,11 +6852,11 @@ async def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection( + async def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6213,7 +6866,7 @@ async def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -6234,6 +6887,8 @@ async def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -6241,12 +6896,17 @@ async def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6257,7 +6917,7 @@ async def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6272,7 +6932,7 @@ async def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -6295,6 +6955,7 @@ async def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -6305,6 +6966,7 @@ async def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -6312,7 +6974,11 @@ async def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6327,7 +6993,7 @@ async def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -6339,7 +7005,7 @@ async def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -6356,17 +7022,24 @@ async def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6381,7 +7054,7 @@ async def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -6393,8 +7066,7 @@ async def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -6411,17 +7083,24 @@ async def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6436,7 +7115,7 @@ async def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace_async @@ -6449,7 +7128,7 @@ async def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -6468,18 +7147,25 @@ async def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6494,7 +7180,7 @@ async def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6508,8 +7194,7 @@ async def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6530,6 +7215,7 @@ async def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6539,6 +7225,7 @@ async def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -6546,7 +7233,11 @@ async def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6561,11 +7252,11 @@ async def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection( + async def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -6574,7 +7265,7 @@ async def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -6593,18 +7284,25 @@ async def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6615,7 +7313,7 @@ async def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -6629,8 +7327,7 @@ async def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -6651,6 +7348,7 @@ async def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -6660,6 +7358,7 @@ async def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -6667,7 +7366,11 @@ async def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6682,7 +7385,7 @@ async def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -6694,7 +7397,7 @@ def list_instance_identifiers( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -6707,6 +7410,8 @@ def list_instance_identifiers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -6719,6 +7424,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -6730,6 +7436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -6747,7 +7454,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6761,7 +7472,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace_async async def get_instance_info( @@ -6773,7 +7484,7 @@ async def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -6792,18 +7503,25 @@ async def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6818,7 +7536,7 @@ async def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -6831,7 +7549,7 @@ async def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -6850,18 +7568,25 @@ async def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -6876,7 +7601,7 @@ async def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_initial( @@ -6893,6 +7618,7 @@ async def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -6902,6 +7628,7 @@ async def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -6909,7 +7636,11 @@ async def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -6923,7 +7654,7 @@ async def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -6937,7 +7668,7 @@ async def begin_create_instance_ms_deploy_operation( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -6960,8 +7691,9 @@ async def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -6974,6 +7706,7 @@ async def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -6998,10 +7731,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log( @@ -7013,7 +7745,7 @@ async def get_instance_ms_deploy_log( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -7032,18 +7764,25 @@ async def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7058,7 +7797,7 @@ async def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -7072,8 +7811,8 @@ def list_instance_processes( """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. + 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 @@ -7089,6 +7828,8 @@ def list_instance_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7102,6 +7843,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -7114,6 +7856,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7131,7 +7874,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7145,7 +7892,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process( @@ -7158,8 +7905,7 @@ async def get_instance_process( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7181,6 +7927,8 @@ async def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -7188,12 +7936,17 @@ async def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7208,11 +7961,11 @@ async def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process( + async def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -7223,8 +7976,8 @@ async def delete_instance_process( """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. + 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 @@ -7246,6 +7999,8 @@ async def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -7253,12 +8008,17 @@ async def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -7269,7 +8029,7 @@ async def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -7283,8 +8043,7 @@ async def get_instance_process_dump( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -7306,6 +8065,8 @@ async def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -7313,12 +8074,17 @@ async def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7333,7 +8099,7 @@ async def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -7348,8 +8114,8 @@ def list_instance_process_modules( """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. + 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 @@ -7367,6 +8133,8 @@ def list_instance_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7381,6 +8149,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -7394,6 +8163,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7411,7 +8181,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7425,7 +8199,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module( @@ -7439,8 +8213,7 @@ async def get_instance_process_module( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -7464,6 +8237,8 @@ async def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -7472,12 +8247,17 @@ async def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7492,7 +8272,7 @@ async def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -7506,8 +8286,7 @@ def list_instance_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -7525,6 +8304,8 @@ def list_instance_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7539,6 +8320,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -7552,6 +8334,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7569,7 +8352,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7583,7 +8370,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable( @@ -7594,7 +8381,7 @@ async def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -7611,17 +8398,24 @@ async def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7636,7 +8430,7 @@ async def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -7648,7 +8442,7 @@ def list_site_backups( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -7661,6 +8455,8 @@ def list_site_backups( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -7673,6 +8469,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -7684,6 +8481,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -7701,7 +8499,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7715,7 +8517,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers( @@ -7726,7 +8528,7 @@ async def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -7743,17 +8545,24 @@ async def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7768,7 +8577,7 @@ async def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore async def _migrate_storage_initial( @@ -7785,6 +8594,7 @@ async def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -7793,6 +8603,7 @@ async def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -7801,7 +8612,11 @@ async def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7815,7 +8630,7 @@ async def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace_async @@ -7829,7 +8644,7 @@ async def begin_migrate_storage( ) -> AsyncLROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -7853,8 +8668,9 @@ async def begin_migrate_storage( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -7867,6 +8683,7 @@ async def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -7891,10 +8708,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore async def _migrate_my_sql_initial( self, @@ -7909,6 +8725,7 @@ async def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -7917,6 +8734,7 @@ async def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -7924,7 +8742,11 @@ async def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -7938,7 +8760,7 @@ async def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async @@ -7951,7 +8773,7 @@ async def begin_migrate_my_sql( ) -> AsyncLROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -7972,8 +8794,9 @@ async def begin_migrate_my_sql( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -7985,6 +8808,7 @@ async def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -8009,10 +8833,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace_async async def get_migrate_my_sql_status( @@ -8024,8 +8847,8 @@ async def get_migrate_my_sql_status( """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. + 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 @@ -8042,17 +8865,24 @@ async def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8067,7 +8897,7 @@ async def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -8079,7 +8909,7 @@ async def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -8096,17 +8926,24 @@ async def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8121,7 +8958,7 @@ async def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -8137,9 +8974,9 @@ async def create_or_update_swift_virtual_network_connection_with_check( 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 + 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. @@ -8159,6 +8996,7 @@ async def create_or_update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -8167,6 +9005,7 @@ async def create_or_update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check.metadata['url'], @@ -8174,7 +9013,11 @@ async def create_or_update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8189,11 +9032,11 @@ async def create_or_update_swift_virtual_network_connection_with_check( return deserialized - create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network( + async def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8201,7 +9044,7 @@ async def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -8218,17 +9061,24 @@ async def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8239,7 +9089,7 @@ async def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -8255,9 +9105,9 @@ async def update_swift_virtual_network_connection_with_check( 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 + 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. @@ -8277,6 +9127,7 @@ async def update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -8285,6 +9136,7 @@ async def update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_with_check.metadata['url'], @@ -8292,7 +9144,11 @@ async def update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8307,7 +9163,7 @@ async def update_swift_virtual_network_connection_with_check( return deserialized - update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -8320,7 +9176,7 @@ async def list_network_features( ) -> "_models.NetworkFeatures": """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -8339,18 +9195,25 @@ async def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8365,7 +9228,7 @@ async def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -8378,8 +9241,7 @@ async def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8398,18 +9260,25 @@ async def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8428,7 +9297,7 @@ async def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8443,17 +9312,17 @@ async def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -8466,11 +9335,14 @@ async def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8479,7 +9351,11 @@ async def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8494,7 +9370,7 @@ async def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_initial( @@ -8512,11 +9388,14 @@ async def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -8525,7 +9404,11 @@ async def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8543,7 +9426,7 @@ async def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -8558,17 +9441,17 @@ async def begin_start_web_site_network_trace_operation( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -8584,7 +9467,8 @@ async def begin_start_web_site_network_trace_operation( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_03_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -8598,6 +9482,7 @@ async def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -8621,13 +9506,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace( + async def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8635,7 +9519,7 @@ async def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -8652,17 +9536,24 @@ async def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8673,7 +9564,7 @@ async def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -8686,8 +9577,7 @@ async def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8706,18 +9596,25 @@ async def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8732,7 +9629,7 @@ async def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -8745,8 +9642,7 @@ async def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8765,18 +9661,25 @@ async def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -8795,7 +9698,7 @@ async def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -8808,8 +9711,7 @@ async def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -8828,18 +9730,25 @@ async def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8854,11 +9763,11 @@ async def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password( + async def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -8866,8 +9775,7 @@ async def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -8884,17 +9792,24 @@ async def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -8905,7 +9820,7 @@ async def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -8918,7 +9833,7 @@ def list_perf_mon_counters( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -8926,7 +9841,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -8935,6 +9850,8 @@ def list_perf_mon_counters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -8947,6 +9864,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -8959,6 +9877,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -8977,7 +9896,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -8991,7 +9914,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag( @@ -9002,7 +9925,7 @@ async def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -9019,17 +9942,24 @@ async def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9044,7 +9974,7 @@ async def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace_async @@ -9056,7 +9986,7 @@ async def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -9073,17 +10003,24 @@ async def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9098,7 +10035,7 @@ async def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace_async @@ -9111,7 +10048,7 @@ async def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -9130,18 +10067,25 @@ async def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9156,7 +10100,7 @@ async def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9170,7 +10114,7 @@ async def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -9191,6 +10135,7 @@ async def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -9200,6 +10145,7 @@ async def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -9207,7 +10153,11 @@ async def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9222,11 +10172,11 @@ async def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on( + async def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -9235,7 +10185,7 @@ async def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -9254,18 +10204,25 @@ async def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9276,7 +10233,7 @@ async def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9290,7 +10247,7 @@ async def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -9311,6 +10268,7 @@ async def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -9320,6 +10278,7 @@ async def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -9327,7 +10286,11 @@ async def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9342,7 +10305,7 @@ async def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -9355,8 +10318,8 @@ async def get_private_access( """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. + 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 @@ -9373,17 +10336,24 @@ async def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9398,7 +10368,7 @@ async def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -9412,8 +10382,8 @@ async def put_private_access_vnet( """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. + 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 @@ -9432,6 +10402,7 @@ async def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -9440,6 +10411,7 @@ async def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -9447,7 +10419,11 @@ async def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9462,7 +10438,7 @@ async def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -9474,7 +10450,7 @@ def get_private_endpoint_connection_list( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -9487,6 +10463,8 @@ def get_private_endpoint_connection_list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9499,6 +10477,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -9510,6 +10489,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9527,7 +10507,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9541,7 +10525,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection( @@ -9553,7 +10537,7 @@ async def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9572,18 +10556,25 @@ async def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9598,7 +10589,7 @@ async def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_initial( @@ -9615,6 +10606,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -9624,6 +10616,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -9631,7 +10624,11 @@ async def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -9649,7 +10646,7 @@ async def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -9663,7 +10660,7 @@ async def begin_approve_or_reject_private_endpoint_connection( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -9688,8 +10685,9 @@ async def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -9702,6 +10700,7 @@ async def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -9726,10 +10725,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_initial( self, @@ -9744,18 +10742,25 @@ async def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -9776,7 +10781,7 @@ async def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -9789,7 +10794,7 @@ async def begin_delete_private_endpoint_connection( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9809,7 +10814,8 @@ async def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -9821,6 +10827,7 @@ async def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -9844,10 +10851,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources( @@ -9858,7 +10864,7 @@ async def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -9875,17 +10881,24 @@ async def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9900,7 +10913,7 @@ async def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -9913,8 +10926,8 @@ def list_processes( """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. + 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 @@ -9927,6 +10940,8 @@ def list_processes( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -9939,6 +10954,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -9950,6 +10966,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -9967,7 +10984,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -9981,7 +11002,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace_async async def get_process( @@ -9993,8 +11014,7 @@ async def get_process( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -10013,18 +11033,25 @@ async def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10039,11 +11066,11 @@ async def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process( + async def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10053,8 +11080,8 @@ async def delete_process( """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. + 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 @@ -10073,18 +11100,25 @@ async def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -10095,7 +11129,7 @@ async def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -10108,8 +11142,7 @@ async def get_process_dump( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -10128,18 +11161,25 @@ async def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10154,7 +11194,7 @@ async def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -10168,8 +11208,8 @@ def list_process_modules( """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. + 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 @@ -10184,6 +11224,8 @@ def list_process_modules( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10197,6 +11239,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -10209,6 +11252,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10226,7 +11270,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10240,7 +11288,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module( @@ -10253,8 +11301,7 @@ async def get_process_module( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -10275,6 +11322,8 @@ async def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -10282,12 +11331,17 @@ async def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10302,7 +11356,7 @@ async def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -10315,8 +11369,7 @@ def list_process_threads( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -10331,6 +11384,8 @@ def list_process_threads( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10344,6 +11399,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -10356,6 +11412,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10373,7 +11430,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10387,7 +11448,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -10398,7 +11459,7 @@ def list_public_certificates( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -10411,6 +11472,8 @@ def list_public_certificates( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -10423,6 +11486,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -10434,6 +11498,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -10451,7 +11516,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10465,7 +11534,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate( @@ -10477,7 +11546,7 @@ async def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -10496,18 +11565,25 @@ async def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10522,7 +11598,7 @@ async def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -10536,7 +11612,7 @@ async def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -10558,6 +11634,7 @@ async def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -10567,6 +11644,7 @@ async def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -10574,7 +11652,11 @@ async def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10589,11 +11671,11 @@ async def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate( + async def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10602,7 +11684,7 @@ async def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -10621,18 +11703,25 @@ async def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -10643,7 +11732,7 @@ async def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -10656,7 +11745,7 @@ async def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -10677,6 +11766,7 @@ async def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -10685,6 +11775,7 @@ async def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -10692,7 +11783,11 @@ async def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10707,11 +11802,11 @@ async def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace_async - async def reset_production_slot_config( + async def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10720,8 +11815,8 @@ async def reset_production_slot_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. + 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 @@ -10738,17 +11833,24 @@ async def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10759,11 +11861,11 @@ async def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart( + async def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10773,17 +11875,18 @@ async def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -10796,11 +11899,14 @@ async def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -10808,7 +11914,11 @@ async def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -10819,10 +11929,10 @@ async def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - async def _restore_from_backup_blob_initial( + async def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10835,6 +11945,7 @@ async def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -10843,6 +11954,7 @@ async def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -10850,7 +11962,11 @@ async def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10860,11 +11976,11 @@ async def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob( + async def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10873,7 +11989,7 @@ async def begin_restore_from_backup_blob( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -10893,8 +12009,9 @@ async def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -10906,6 +12023,7 @@ async def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -10927,12 +12045,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_initial( + async def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10945,6 +12062,7 @@ async def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -10953,6 +12071,7 @@ async def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -10960,7 +12079,11 @@ async def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -10970,11 +12093,11 @@ async def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app( + async def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -10983,7 +12106,7 @@ async def begin_restore_from_deleted_app( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -11003,8 +12126,9 @@ async def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -11016,6 +12140,7 @@ async def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11037,12 +12162,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_initial( + async def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11055,6 +12179,7 @@ async def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -11063,6 +12188,7 @@ async def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -11070,7 +12196,11 @@ async def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11080,11 +12210,11 @@ async def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot( + async def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11093,7 +12223,7 @@ async def begin_restore_snapshot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -11114,8 +12244,9 @@ async def begin_restore_snapshot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -11127,6 +12258,7 @@ async def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11148,10 +12280,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -11162,7 +12293,7 @@ def list_site_extensions( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -11175,6 +12306,8 @@ def list_site_extensions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11187,6 +12320,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -11198,6 +12332,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11215,7 +12350,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11229,7 +12368,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension( @@ -11241,7 +12380,7 @@ async def get_site_extension( ) -> "_models.SiteExtensionInfo": """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -11260,18 +12399,25 @@ async def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11286,7 +12432,7 @@ async def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_initial( @@ -11302,18 +12448,25 @@ async def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -11331,7 +12484,7 @@ async def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -11344,7 +12497,7 @@ async def begin_install_site_extension( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -11366,7 +12519,8 @@ async def begin_install_site_extension( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -11378,6 +12532,7 @@ async def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -11401,13 +12556,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension( + async def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11416,7 +12570,7 @@ async def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -11435,18 +12589,25 @@ async def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -11457,7 +12618,7 @@ async def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -11469,7 +12630,7 @@ def list_slots( ) -> AsyncIterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -11481,6 +12642,8 @@ def list_slots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -11493,6 +12656,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -11504,6 +12668,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -11521,7 +12686,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11535,7 +12704,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace_async async def get_slot( @@ -11547,7 +12716,7 @@ async def get_slot( ) -> "_models.Site": """Gets the details of a web, mobile, or API app. - Description for 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 @@ -11566,18 +12735,25 @@ async def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11592,7 +12768,7 @@ async def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore async def _create_or_update_slot_initial( @@ -11609,6 +12785,7 @@ async def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -11618,6 +12795,7 @@ async def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -11625,7 +12803,11 @@ async def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11643,7 +12825,7 @@ async def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11658,8 +12840,8 @@ async def begin_create_or_update_slot( """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. + 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 @@ -11683,8 +12865,9 @@ async def begin_create_or_update_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -11697,6 +12880,7 @@ async def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -11721,13 +12905,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async - async def delete_slot( + async def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11738,7 +12921,7 @@ async def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -11747,10 +12930,10 @@ async def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -11763,12 +12946,15 @@ async def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -11776,7 +12962,11 @@ async def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -11787,7 +12977,7 @@ async def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11802,8 +12992,8 @@ async def update_slot( """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. + 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 @@ -11826,6 +13016,7 @@ async def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -11835,6 +13026,7 @@ async def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -11842,7 +13034,11 @@ async def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -11861,7 +13057,7 @@ async def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace_async @@ -11875,7 +13071,7 @@ async def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -11883,7 +13079,7 @@ async def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -11896,19 +13092,26 @@ async def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11923,11 +13126,11 @@ async def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace_async - async def apply_slot_configuration_slot( + async def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -11937,7 +13140,7 @@ async def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -11959,6 +13162,7 @@ async def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -11968,6 +13172,7 @@ async def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -11975,7 +13180,11 @@ async def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -11986,7 +13195,7 @@ async def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace_async @@ -12000,7 +13209,7 @@ async def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -12023,6 +13232,7 @@ async def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12032,6 +13242,7 @@ async def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -12039,7 +13250,11 @@ async def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12054,7 +13269,7 @@ async def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -12067,7 +13282,7 @@ def list_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -12083,6 +13298,8 @@ def list_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12096,6 +13313,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -12108,6 +13326,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12125,7 +13344,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12139,7 +13362,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace_async async def get_backup_status_slot( @@ -12152,7 +13375,7 @@ async def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -12174,6 +13397,8 @@ async def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -12181,12 +13406,17 @@ async def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12201,11 +13431,11 @@ async def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async - async def delete_backup_slot( + async def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12215,7 +13445,7 @@ async def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -12237,6 +13467,8 @@ async def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -12244,12 +13476,17 @@ async def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12260,7 +13497,7 @@ async def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace_async @@ -12277,9 +13514,9 @@ async def list_backup_status_secrets_slot( 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. + 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 @@ -12302,6 +13539,7 @@ async def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -12312,6 +13550,7 @@ async def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -12319,7 +13558,11 @@ async def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12334,10 +13577,10 @@ async def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - async def _restore_slot_initial( + async def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12352,6 +13595,7 @@ async def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -12362,6 +13606,7 @@ async def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -12369,7 +13614,11 @@ async def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -12379,11 +13628,11 @@ async def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace_async - async def begin_restore_slot( + async def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -12394,7 +13643,7 @@ async def begin_restore_slot( ) -> AsyncLROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -12419,8 +13668,9 @@ async def begin_restore_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -12434,6 +13684,7 @@ async def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -12455,10 +13706,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_basic_publishing_credentials_policies_slot( @@ -12470,8 +13720,7 @@ def list_basic_publishing_credentials_policies_slot( ) -> AsyncIterable["_models.PublishingCredentialsPoliciesCollection"]: """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. + 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 @@ -12486,6 +13735,8 @@ def list_basic_publishing_credentials_policies_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PublishingCredentialsPoliciesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublishingCredentialsPoliciesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12499,6 +13750,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_basic_publishing_credentials_policies_slot.metadata['url'], ) request = _convert_request(request) @@ -12511,6 +13763,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12528,7 +13781,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12542,7 +13799,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + list_basic_publishing_credentials_policies_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace_async async def get_ftp_allowed_slot( @@ -12554,7 +13811,7 @@ async def get_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -12573,18 +13830,25 @@ async def get_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ftp_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12599,7 +13863,7 @@ async def get_ftp_allowed_slot( return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -12613,7 +13877,7 @@ async def update_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -12635,6 +13899,7 @@ async def update_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -12644,6 +13909,7 @@ async def update_ftp_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed_slot.metadata['url'], @@ -12651,7 +13917,11 @@ async def update_ftp_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12666,7 +13936,7 @@ async def update_ftp_allowed_slot( return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace_async @@ -12679,7 +13949,7 @@ async def get_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -12698,18 +13968,25 @@ async def get_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_scm_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12724,7 +14001,7 @@ async def get_scm_allowed_slot( return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace_async @@ -12738,7 +14015,7 @@ async def update_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -12760,6 +14037,7 @@ async def update_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -12769,6 +14047,7 @@ async def update_scm_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed_slot.metadata['url'], @@ -12776,7 +14055,11 @@ async def update_scm_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12791,7 +14074,7 @@ async def update_scm_allowed_slot( return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -12804,7 +14087,7 @@ def list_configurations_slot( ) -> AsyncIterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -12820,6 +14103,8 @@ def list_configurations_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -12833,6 +14118,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -12845,6 +14131,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -12862,7 +14149,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12876,7 +14167,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace_async async def update_application_settings_slot( @@ -12889,7 +14180,7 @@ async def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -12911,6 +14202,7 @@ async def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -12920,6 +14212,7 @@ async def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -12927,7 +14220,11 @@ async def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -12942,7 +14239,7 @@ async def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace_async @@ -12955,7 +14252,7 @@ async def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -12975,18 +14272,25 @@ async def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13001,7 +14305,7 @@ async def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace_async @@ -13015,7 +14319,7 @@ async def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -13036,6 +14340,7 @@ async def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -13045,6 +14350,7 @@ async def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -13052,7 +14358,11 @@ async def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13067,7 +14377,7 @@ async def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace_async @@ -13080,7 +14390,7 @@ async def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -13100,18 +14410,25 @@ async def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13126,7 +14443,73 @@ async def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore + + + @distributed_trace_async + async def get_auth_settings_v2_without_secrets_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs: Any + ) -> "_models.SiteAuthSettingsV2": + """Gets site's Authentication / Authorization settings for apps via the V2 format. + + Gets site's Authentication / Authorization settings for apps via the V2 format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2021_03_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + + + request = build_get_auth_settings_v2_without_secrets_slot_request( + resource_group_name=resource_group_name, + name=name, + slot=slot, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_auth_settings_v2_without_secrets_slot.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_auth_settings_v2_without_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -13140,8 +14523,7 @@ async def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -13162,6 +14544,7 @@ async def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -13171,6 +14554,7 @@ async def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -13178,7 +14562,11 @@ async def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13193,7 +14581,7 @@ async def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace_async @@ -13206,7 +14594,7 @@ async def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -13226,18 +14614,25 @@ async def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13252,7 +14647,7 @@ async def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace_async @@ -13266,7 +14661,7 @@ async def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -13289,6 +14684,7 @@ async def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -13298,6 +14694,7 @@ async def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -13305,7 +14702,11 @@ async def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13320,7 +14721,7 @@ async def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace_async @@ -13333,7 +14734,7 @@ async def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -13353,18 +14754,25 @@ async def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13379,7 +14787,7 @@ async def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace_async @@ -13393,7 +14801,7 @@ async def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -13415,6 +14823,7 @@ async def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -13424,6 +14833,7 @@ async def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -13431,7 +14841,11 @@ async def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13446,11 +14860,11 @@ async def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async - async def delete_backup_configuration_slot( + async def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -13459,7 +14873,7 @@ async def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -13479,18 +14893,25 @@ async def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13501,7 +14922,7 @@ async def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace_async @@ -13514,7 +14935,7 @@ async def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -13534,18 +14955,25 @@ async def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13560,7 +14988,7 @@ async def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -13573,7 +15001,7 @@ def get_app_settings_key_vault_references_slot( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -13588,6 +15016,8 @@ def get_app_settings_key_vault_references_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13601,6 +15031,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -13613,6 +15044,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13630,7 +15062,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13644,7 +15080,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings"} # type: ignore @distributed_trace_async async def get_app_setting_key_vault_reference_slot( @@ -13657,7 +15093,7 @@ async def get_app_setting_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -13678,6 +15114,8 @@ async def get_app_setting_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_app_setting_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -13685,12 +15123,17 @@ async def get_app_setting_key_vault_reference_slot( app_setting_key=app_setting_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13705,7 +15148,7 @@ async def get_app_setting_key_vault_reference_slot( return deserialized - get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -13718,7 +15161,7 @@ def get_site_connection_string_key_vault_references_slot( ) -> AsyncIterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -13733,6 +15176,8 @@ def get_site_connection_string_key_vault_references_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -13746,6 +15191,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -13758,6 +15204,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -13775,7 +15222,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13789,7 +15240,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace_async async def get_site_connection_string_key_vault_reference_slot( @@ -13802,7 +15253,7 @@ async def get_site_connection_string_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -13823,6 +15274,8 @@ async def get_site_connection_string_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_connection_string_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -13830,12 +15283,17 @@ async def get_site_connection_string_key_vault_reference_slot( connection_string_key=connection_string_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13850,7 +15308,7 @@ async def get_site_connection_string_key_vault_reference_slot( return deserialized - get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace_async @@ -13864,7 +15322,7 @@ async def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -13886,6 +15344,7 @@ async def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -13895,6 +15354,7 @@ async def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -13902,7 +15362,11 @@ async def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13917,7 +15381,7 @@ async def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace_async @@ -13930,7 +15394,7 @@ async def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -13950,18 +15414,25 @@ async def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -13976,7 +15447,7 @@ async def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace_async @@ -13989,7 +15460,7 @@ async def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -14009,18 +15480,25 @@ async def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14035,7 +15513,7 @@ async def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -14049,7 +15527,7 @@ async def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -14072,6 +15550,7 @@ async def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -14081,6 +15560,7 @@ async def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -14088,7 +15568,11 @@ async def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14103,7 +15587,7 @@ async def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace_async @@ -14117,7 +15601,7 @@ async def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -14139,6 +15623,7 @@ async def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -14148,6 +15633,7 @@ async def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -14155,7 +15641,11 @@ async def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14170,7 +15660,7 @@ async def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace_async @@ -14183,7 +15673,7 @@ async def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -14203,18 +15693,25 @@ async def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14229,7 +15726,7 @@ async def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore async def _list_publishing_credentials_slot_initial( @@ -14245,18 +15742,25 @@ async def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14270,7 +15774,7 @@ async def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async @@ -14283,7 +15787,7 @@ async def begin_list_publishing_credentials_slot( ) -> AsyncLROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -14304,7 +15808,8 @@ async def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -14316,6 +15821,7 @@ async def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -14339,10 +15845,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace_async async def update_site_push_settings_slot( @@ -14355,7 +15860,7 @@ async def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -14376,6 +15881,7 @@ async def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -14385,6 +15891,7 @@ async def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -14392,7 +15899,11 @@ async def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14407,7 +15918,7 @@ async def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace_async @@ -14420,7 +15931,7 @@ async def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -14439,18 +15950,25 @@ async def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14465,7 +15983,7 @@ async def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace_async @@ -14479,8 +15997,8 @@ async def get_configuration_slot( """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. + 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 @@ -14500,18 +16018,25 @@ async def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14526,7 +16051,7 @@ async def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -14540,7 +16065,7 @@ async def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -14562,6 +16087,7 @@ async def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14571,6 +16097,7 @@ async def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -14578,7 +16105,11 @@ async def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14593,7 +16124,7 @@ async def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace_async @@ -14607,7 +16138,7 @@ async def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -14629,6 +16160,7 @@ async def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -14638,6 +16170,7 @@ async def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -14645,7 +16178,11 @@ async def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14660,7 +16197,7 @@ async def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -14674,8 +16211,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -14691,6 +16228,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -14704,6 +16243,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -14716,6 +16256,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -14733,7 +16274,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14747,7 +16292,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace_async async def get_configuration_snapshot_slot( @@ -14760,7 +16305,7 @@ async def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -14782,6 +16327,8 @@ async def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -14789,12 +16336,17 @@ async def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -14809,11 +16361,11 @@ async def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace_async - async def recover_site_configuration_snapshot_slot( + async def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -14823,7 +16375,7 @@ async def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -14845,6 +16397,8 @@ async def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -14852,12 +16406,17 @@ async def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -14868,7 +16427,7 @@ async def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace_async @@ -14881,7 +16440,7 @@ async def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -14900,18 +16459,25 @@ async def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14927,7 +16493,7 @@ async def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace_async @@ -14940,7 +16506,7 @@ async def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -14959,18 +16525,25 @@ async def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -14986,7 +16559,7 @@ async def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -14999,7 +16572,7 @@ def list_continuous_web_jobs_slot( ) -> AsyncIterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -15015,6 +16588,8 @@ def list_continuous_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15028,6 +16603,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -15040,6 +16616,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15057,7 +16634,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15071,7 +16652,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace_async async def get_continuous_web_job_slot( @@ -15084,7 +16665,7 @@ async def get_continuous_web_job_slot( ) -> "_models.ContinuousWebJob": """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -15106,6 +16687,8 @@ async def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15113,12 +16696,17 @@ async def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15133,11 +16721,11 @@ async def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_continuous_web_job_slot( + async def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15147,7 +16735,7 @@ async def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -15169,6 +16757,8 @@ async def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15176,12 +16766,17 @@ async def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15192,11 +16787,11 @@ async def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def start_continuous_web_job_slot( + async def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15206,7 +16801,7 @@ async def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -15228,6 +16823,8 @@ async def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15235,12 +16832,17 @@ async def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15251,11 +16853,11 @@ async def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace_async - async def stop_continuous_web_job_slot( + async def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15265,7 +16867,7 @@ async def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -15287,6 +16889,8 @@ async def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -15294,12 +16898,17 @@ async def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15310,7 +16919,7 @@ async def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -15323,7 +16932,7 @@ def list_deployments_slot( ) -> AsyncIterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -15339,6 +16948,8 @@ def list_deployments_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15352,6 +16963,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -15364,6 +16976,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15381,7 +16994,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15395,7 +17012,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace_async async def get_deployment_slot( @@ -15408,7 +17025,7 @@ async def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -15430,6 +17047,8 @@ async def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -15437,12 +17056,17 @@ async def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15457,7 +17081,7 @@ async def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -15472,7 +17096,7 @@ async def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -15496,6 +17120,7 @@ async def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -15506,6 +17131,7 @@ async def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -15513,7 +17139,11 @@ async def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15528,11 +17158,11 @@ async def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async - async def delete_deployment_slot( + async def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15542,7 +17172,7 @@ async def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -15564,6 +17194,8 @@ async def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -15571,12 +17203,17 @@ async def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15587,7 +17224,7 @@ async def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace_async @@ -15601,7 +17238,7 @@ async def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -15624,6 +17261,8 @@ async def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -15631,12 +17270,17 @@ async def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15651,7 +17295,7 @@ async def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace_async @@ -15666,8 +17310,8 @@ async def discover_backup_slot( """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. + 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 @@ -15690,6 +17334,7 @@ async def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -15699,6 +17344,7 @@ async def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -15706,7 +17352,11 @@ async def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15721,7 +17371,7 @@ async def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -15734,7 +17384,7 @@ def list_domain_ownership_identifiers_slot( ) -> AsyncIterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -15750,6 +17400,8 @@ def list_domain_ownership_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15763,6 +17415,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -15775,6 +17428,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15792,7 +17446,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15806,7 +17464,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace_async async def get_domain_ownership_identifier_slot( @@ -15819,7 +17477,7 @@ async def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -15841,6 +17499,8 @@ async def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -15848,12 +17508,17 @@ async def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15868,7 +17533,7 @@ async def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -15883,8 +17548,7 @@ async def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -15908,6 +17572,7 @@ async def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -15918,6 +17583,7 @@ async def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -15925,7 +17591,11 @@ async def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15940,11 +17610,11 @@ async def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async - async def delete_domain_ownership_identifier_slot( + async def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -15954,7 +17624,7 @@ async def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -15976,6 +17646,8 @@ async def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -15983,12 +17655,17 @@ async def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -15999,7 +17676,7 @@ async def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -16014,8 +17691,7 @@ async def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -16039,6 +17715,7 @@ async def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -16049,6 +17726,7 @@ async def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -16056,7 +17734,11 @@ async def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16071,7 +17753,7 @@ async def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace_async @@ -16084,7 +17766,7 @@ async def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -16103,18 +17785,25 @@ async def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16129,7 +17818,7 @@ async def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore async def _create_ms_deploy_operation_slot_initial( @@ -16146,6 +17835,7 @@ async def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -16155,6 +17845,7 @@ async def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -16162,7 +17853,11 @@ async def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -16176,7 +17871,7 @@ async def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -16190,7 +17885,7 @@ async def begin_create_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -16213,8 +17908,9 @@ async def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -16227,6 +17923,7 @@ async def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16251,10 +17948,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_ms_deploy_log_slot( @@ -16266,7 +17962,7 @@ async def get_ms_deploy_log_slot( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -16285,18 +17981,25 @@ async def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16311,7 +18014,7 @@ async def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -16324,7 +18027,7 @@ def list_instance_functions_slot( ) -> AsyncIterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -16339,6 +18042,8 @@ def list_instance_functions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16352,6 +18057,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -16364,6 +18070,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16381,7 +18088,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16395,7 +18106,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace_async async def get_functions_admin_token_slot( @@ -16407,7 +18118,7 @@ async def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -16426,18 +18137,25 @@ async def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16452,7 +18170,7 @@ async def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace_async @@ -16466,7 +18184,7 @@ async def get_instance_function_slot( ) -> "_models.FunctionEnvelope": """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -16487,6 +18205,8 @@ async def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -16494,12 +18214,17 @@ async def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16514,7 +18239,7 @@ async def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore async def _create_instance_function_slot_initial( @@ -16532,6 +18257,7 @@ async def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -16542,6 +18268,7 @@ async def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -16549,7 +18276,11 @@ async def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -16563,7 +18294,7 @@ async def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -16578,7 +18309,7 @@ async def begin_create_instance_function_slot( ) -> AsyncLROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -16603,8 +18334,9 @@ async def begin_create_instance_function_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -16618,6 +18350,7 @@ async def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16642,13 +18375,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async - async def delete_instance_function_slot( + async def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16658,7 +18390,7 @@ async def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -16679,6 +18411,8 @@ async def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -16686,12 +18420,17 @@ async def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16702,7 +18441,7 @@ async def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace_async @@ -16718,7 +18457,7 @@ async def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -16743,6 +18482,7 @@ async def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -16754,6 +18494,7 @@ async def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -16761,7 +18502,11 @@ async def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -16780,11 +18525,11 @@ async def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async - async def delete_function_secret_slot( + async def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16795,7 +18540,7 @@ async def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -16818,6 +18563,8 @@ async def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -16826,12 +18573,17 @@ async def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -16842,7 +18594,7 @@ async def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace_async @@ -16856,7 +18608,7 @@ async def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -16877,6 +18629,8 @@ async def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -16884,12 +18638,17 @@ async def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16904,7 +18663,7 @@ async def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace_async @@ -16918,7 +18677,7 @@ async def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -16939,6 +18698,8 @@ async def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -16946,12 +18707,17 @@ async def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16966,7 +18732,7 @@ async def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace_async @@ -16979,7 +18745,7 @@ async def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -16998,18 +18764,25 @@ async def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17024,11 +18797,11 @@ async def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace_async - async def list_sync_status_slot( + async def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17037,7 +18810,7 @@ async def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -17056,18 +18829,25 @@ async def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -17078,11 +18858,11 @@ async def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace_async - async def sync_functions_slot( + async def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17091,7 +18871,7 @@ async def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -17110,18 +18890,25 @@ async def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -17132,7 +18919,7 @@ async def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace_async @@ -17148,7 +18935,7 @@ async def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -17173,6 +18960,7 @@ async def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -17184,6 +18972,7 @@ async def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -17191,7 +18980,11 @@ async def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -17210,11 +19003,11 @@ async def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace_async - async def delete_host_secret_slot( + async def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17225,7 +19018,7 @@ async def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -17248,6 +19041,8 @@ async def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -17256,12 +19051,17 @@ async def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -17272,7 +19072,7 @@ async def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -17285,7 +19085,7 @@ def list_host_name_bindings_slot( ) -> AsyncIterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -17301,6 +19101,8 @@ def list_host_name_bindings_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17314,6 +19116,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -17326,6 +19129,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17343,7 +19147,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17357,7 +19165,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace_async async def get_host_name_binding_slot( @@ -17370,7 +19178,7 @@ async def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -17392,6 +19200,8 @@ async def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -17399,12 +19209,17 @@ async def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17419,7 +19234,7 @@ async def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -17434,7 +19249,7 @@ async def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -17459,6 +19274,7 @@ async def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -17469,6 +19285,7 @@ async def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -17476,7 +19293,11 @@ async def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17491,11 +19312,11 @@ async def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async - async def delete_host_name_binding_slot( + async def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17505,7 +19326,7 @@ async def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -17527,6 +19348,8 @@ async def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -17534,12 +19357,17 @@ async def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -17550,7 +19378,7 @@ async def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace_async @@ -17565,7 +19393,7 @@ async def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -17588,6 +19416,8 @@ async def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -17596,12 +19426,17 @@ async def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17616,7 +19451,7 @@ async def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17632,7 +19467,7 @@ async def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -17657,6 +19492,7 @@ async def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -17668,6 +19504,7 @@ async def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -17675,7 +19512,11 @@ async def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17690,11 +19531,11 @@ async def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async - async def delete_hybrid_connection_slot( + async def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17705,7 +19546,7 @@ async def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -17728,6 +19569,8 @@ async def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -17736,12 +19579,17 @@ async def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17752,7 +19600,7 @@ async def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17768,7 +19616,7 @@ async def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -17793,6 +19641,7 @@ async def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -17804,6 +19653,7 @@ async def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -17811,7 +19661,11 @@ async def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17826,7 +19680,7 @@ async def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace_async @@ -17839,7 +19693,7 @@ async def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -17858,18 +19712,25 @@ async def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17884,7 +19745,7 @@ async def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace_async @@ -17897,8 +19758,7 @@ async def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -17918,18 +19778,25 @@ async def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17944,7 +19811,7 @@ async def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace_async @@ -17958,7 +19825,7 @@ async def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -17980,6 +19847,8 @@ async def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -17987,12 +19856,17 @@ async def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18007,7 +19881,7 @@ async def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -18022,8 +19896,7 @@ async def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -18047,6 +19920,7 @@ async def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -18057,6 +19931,7 @@ async def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -18064,7 +19939,11 @@ async def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18079,11 +19958,11 @@ async def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async - async def delete_relay_service_connection_slot( + async def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18093,7 +19972,7 @@ async def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -18115,6 +19994,8 @@ async def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -18122,12 +20003,17 @@ async def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18138,7 +20024,7 @@ async def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace_async @@ -18153,8 +20039,7 @@ async def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -18178,6 +20063,7 @@ async def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -18188,6 +20074,7 @@ async def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -18195,7 +20082,11 @@ async def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18210,7 +20101,7 @@ async def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -18223,7 +20114,7 @@ def list_instance_identifiers_slot( ) -> AsyncIterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -18239,6 +20130,8 @@ def list_instance_identifiers_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18252,6 +20145,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -18264,6 +20158,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18281,7 +20176,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18295,7 +20194,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace_async async def get_instance_info_slot( @@ -18308,7 +20207,7 @@ async def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -18330,6 +20229,8 @@ async def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -18337,12 +20238,17 @@ async def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18357,7 +20263,7 @@ async def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace_async @@ -18371,7 +20277,7 @@ async def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -18392,6 +20298,8 @@ async def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -18399,12 +20307,17 @@ async def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18419,7 +20332,7 @@ async def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore async def _create_instance_ms_deploy_operation_slot_initial( @@ -18437,6 +20350,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -18447,6 +20361,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -18454,7 +20369,11 @@ async def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -18468,7 +20387,7 @@ async def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async @@ -18483,7 +20402,7 @@ async def begin_create_instance_ms_deploy_operation_slot( ) -> AsyncLROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -18508,8 +20427,9 @@ async def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -18523,6 +20443,7 @@ async def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -18547,10 +20468,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace_async async def get_instance_ms_deploy_log_slot( @@ -18563,7 +20483,7 @@ async def get_instance_ms_deploy_log_slot( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -18584,6 +20504,8 @@ async def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -18591,12 +20513,17 @@ async def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18611,7 +20538,7 @@ async def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -18626,8 +20553,8 @@ def list_instance_processes_slot( """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. + 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 @@ -18646,6 +20573,8 @@ def list_instance_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18660,6 +20589,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -18673,6 +20603,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18690,7 +20621,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18704,7 +20639,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace_async async def get_instance_process_slot( @@ -18718,8 +20653,7 @@ async def get_instance_process_slot( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -18744,6 +20678,8 @@ async def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -18752,12 +20688,17 @@ async def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18772,11 +20713,11 @@ async def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_instance_process_slot( + async def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -18788,8 +20729,8 @@ async def delete_instance_process_slot( """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. + 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 @@ -18814,6 +20755,8 @@ async def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -18822,12 +20765,17 @@ async def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -18838,7 +20786,7 @@ async def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -18853,8 +20801,7 @@ async def get_instance_process_dump_slot( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -18879,6 +20826,8 @@ async def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -18887,12 +20836,17 @@ async def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18907,7 +20861,7 @@ async def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -18923,8 +20877,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -18945,6 +20899,8 @@ def list_instance_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18960,6 +20916,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -18974,6 +20931,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18991,7 +20949,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19005,7 +20967,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_instance_process_module_slot( @@ -19020,8 +20982,7 @@ async def get_instance_process_module_slot( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -19048,6 +21009,8 @@ async def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -19057,12 +21020,17 @@ async def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19077,7 +21045,7 @@ async def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -19092,8 +21060,7 @@ def list_instance_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -19114,6 +21081,8 @@ def list_instance_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19129,6 +21098,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -19143,6 +21113,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19160,7 +21131,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19174,7 +21149,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace_async async def is_cloneable_slot( @@ -19186,7 +21161,7 @@ async def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -19206,18 +21181,25 @@ async def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19232,7 +21214,7 @@ async def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -19245,7 +21227,7 @@ def list_site_backups_slot( ) -> AsyncIterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -19261,6 +21243,8 @@ def list_site_backups_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19274,6 +21258,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -19286,6 +21271,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19303,7 +21289,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19317,7 +21307,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace_async async def list_sync_function_triggers_slot( @@ -19329,7 +21319,7 @@ async def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -19348,18 +21338,25 @@ async def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19374,7 +21371,7 @@ async def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace_async @@ -19388,8 +21385,8 @@ async def get_migrate_my_sql_status_slot( """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. + 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 @@ -19408,18 +21405,25 @@ async def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19434,7 +21438,7 @@ async def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace_async @@ -19447,7 +21451,7 @@ async def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -19467,18 +21471,25 @@ async def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19493,7 +21504,7 @@ async def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -19510,9 +21521,9 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( 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 + 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. @@ -19535,6 +21546,7 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -19544,6 +21556,7 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check_slot.metadata['url'], @@ -19551,7 +21564,11 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19566,11 +21583,11 @@ async def create_or_update_swift_virtual_network_connection_with_check_slot( return deserialized - create_or_update_swift_virtual_network_connection_with_check_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async - async def delete_swift_virtual_network_slot( + async def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19579,7 +21596,7 @@ async def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -19599,18 +21616,25 @@ async def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19621,7 +21645,7 @@ async def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -19638,9 +21662,9 @@ async def update_swift_virtual_network_connection_with_check_slot( 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 + 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. @@ -19663,6 +21687,7 @@ async def update_swift_virtual_network_connection_with_check_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -19672,6 +21697,7 @@ async def update_swift_virtual_network_connection_with_check_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_with_check_slot.metadata['url'], @@ -19679,7 +21705,11 @@ async def update_swift_virtual_network_connection_with_check_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19694,7 +21724,7 @@ async def update_swift_virtual_network_connection_with_check_slot( return deserialized - update_swift_virtual_network_connection_with_check_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_with_check_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace_async @@ -19708,7 +21738,7 @@ async def list_network_features_slot( ) -> "_models.NetworkFeatures": """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -19730,6 +21760,8 @@ async def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -19737,12 +21769,17 @@ async def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19757,7 +21794,7 @@ async def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace_async @@ -19771,8 +21808,7 @@ async def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -19794,6 +21830,8 @@ async def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -19801,12 +21839,17 @@ async def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19825,7 +21868,7 @@ async def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -19841,7 +21884,7 @@ async def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -19849,11 +21892,11 @@ async def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -19866,12 +21909,15 @@ async def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -19880,7 +21926,11 @@ async def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19895,7 +21945,7 @@ async def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore async def _start_web_site_network_trace_operation_slot_initial( @@ -19914,12 +21964,15 @@ async def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -19928,7 +21981,11 @@ async def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -19946,7 +22003,7 @@ async def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async @@ -19962,7 +22019,7 @@ async def begin_start_web_site_network_trace_operation_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -19970,11 +22027,11 @@ async def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -19990,7 +22047,8 @@ async def begin_start_web_site_network_trace_operation_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_03_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -20005,6 +22063,7 @@ async def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -20028,13 +22087,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace_async - async def stop_web_site_network_trace_slot( + async def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20043,7 +22101,7 @@ async def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -20062,18 +22120,25 @@ async def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20084,7 +22149,7 @@ async def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace_async @@ -20098,8 +22163,7 @@ async def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -20121,6 +22185,8 @@ async def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -20128,12 +22194,17 @@ async def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20148,7 +22219,7 @@ async def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace_async @@ -20162,8 +22233,7 @@ async def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -20185,6 +22255,8 @@ async def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -20192,12 +22264,17 @@ async def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -20216,7 +22293,7 @@ async def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace_async @@ -20230,8 +22307,7 @@ async def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -20253,6 +22329,8 @@ async def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -20260,12 +22338,17 @@ async def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20280,11 +22363,11 @@ async def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace_async - async def generate_new_site_publishing_password_slot( + async def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20293,8 +22376,7 @@ async def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -20314,18 +22396,25 @@ async def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20336,7 +22425,7 @@ async def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -20350,7 +22439,7 @@ def list_perf_mon_counters_slot( ) -> AsyncIterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -20360,7 +22449,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -20369,6 +22458,8 @@ def list_perf_mon_counters_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20382,6 +22473,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -20395,6 +22487,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -20413,7 +22506,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20427,7 +22524,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace_async async def get_site_php_error_log_flag_slot( @@ -20439,7 +22536,7 @@ async def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -20458,18 +22555,25 @@ async def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20484,7 +22588,7 @@ async def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace_async @@ -20497,7 +22601,7 @@ async def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -20517,18 +22621,25 @@ async def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20543,7 +22654,7 @@ async def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace_async @@ -20557,7 +22668,7 @@ async def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -20579,6 +22690,8 @@ async def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -20586,12 +22699,17 @@ async def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20606,7 +22724,7 @@ async def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20621,7 +22739,7 @@ async def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -20645,6 +22763,7 @@ async def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -20655,6 +22774,7 @@ async def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -20662,7 +22782,11 @@ async def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20677,11 +22801,11 @@ async def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async - async def delete_premier_add_on_slot( + async def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20691,7 +22815,7 @@ async def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -20713,6 +22837,8 @@ async def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -20720,12 +22846,17 @@ async def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20736,7 +22867,7 @@ async def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20751,7 +22882,7 @@ async def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -20775,6 +22906,7 @@ async def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -20785,6 +22917,7 @@ async def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -20792,7 +22925,11 @@ async def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20807,7 +22944,7 @@ async def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace_async @@ -20821,8 +22958,8 @@ async def get_private_access_slot( """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. + 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 @@ -20841,18 +22978,25 @@ async def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20867,7 +23011,7 @@ async def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace_async @@ -20882,8 +23026,8 @@ async def put_private_access_vnet_slot( """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. + 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 @@ -20904,6 +23048,7 @@ async def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -20913,6 +23058,7 @@ async def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -20920,7 +23066,11 @@ async def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20935,7 +23085,7 @@ async def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -20948,7 +23098,7 @@ def get_private_endpoint_connection_list_slot( ) -> AsyncIterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -20963,6 +23113,8 @@ def get_private_endpoint_connection_list_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20976,6 +23128,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list_slot.metadata['url'], ) request = _convert_request(request) @@ -20988,6 +23141,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21005,7 +23159,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21019,7 +23177,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections"} # type: ignore @distributed_trace_async async def get_private_endpoint_connection_slot( @@ -21032,7 +23190,7 @@ async def get_private_endpoint_connection_slot( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -21053,6 +23211,8 @@ async def get_private_endpoint_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_endpoint_connection_slot_request( resource_group_name=resource_group_name, @@ -21060,12 +23220,17 @@ async def get_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21080,7 +23245,7 @@ async def get_private_endpoint_connection_slot( return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _approve_or_reject_private_endpoint_connection_slot_initial( @@ -21098,6 +23263,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -21108,6 +23274,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'], @@ -21115,7 +23282,11 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -21133,7 +23304,7 @@ async def _approve_or_reject_private_endpoint_connection_slot_initial( return deserialized - _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -21148,7 +23319,7 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( ) -> AsyncLROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -21175,8 +23346,9 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -21190,6 +23362,7 @@ async def begin_approve_or_reject_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -21214,10 +23387,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore async def _delete_private_endpoint_connection_slot_initial( self, @@ -21233,6 +23405,8 @@ async def _delete_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_private_endpoint_connection_slot_request_initial( resource_group_name=resource_group_name, @@ -21240,12 +23414,17 @@ async def _delete_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -21266,7 +23445,7 @@ async def _delete_private_endpoint_connection_slot_initial( return deserialized - _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async @@ -21280,7 +23459,7 @@ async def begin_delete_private_endpoint_connection_slot( ) -> AsyncLROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -21302,7 +23481,8 @@ async def begin_delete_private_endpoint_connection_slot( :rtype: ~azure.core.polling.AsyncLROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -21315,6 +23495,7 @@ async def begin_delete_private_endpoint_connection_slot( name=name, private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -21338,10 +23519,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace_async async def get_private_link_resources_slot( @@ -21353,7 +23533,7 @@ async def get_private_link_resources_slot( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -21372,18 +23552,25 @@ async def get_private_link_resources_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_link_resources_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21398,7 +23585,7 @@ async def get_private_link_resources_slot( return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + get_private_link_resources_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources"} # type: ignore @distributed_trace @@ -21412,8 +23599,8 @@ def list_processes_slot( """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. + 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 @@ -21429,6 +23616,8 @@ def list_processes_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21442,6 +23631,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -21454,6 +23644,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21471,7 +23662,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21485,7 +23680,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace_async async def get_process_slot( @@ -21498,8 +23693,7 @@ async def get_process_slot( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21521,6 +23715,8 @@ async def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -21528,12 +23724,17 @@ async def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21548,11 +23749,11 @@ async def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async - async def delete_process_slot( + async def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21563,8 +23764,8 @@ async def delete_process_slot( """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. + 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 @@ -21586,6 +23787,8 @@ async def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -21593,12 +23796,17 @@ async def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21609,7 +23817,7 @@ async def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace_async @@ -21623,8 +23831,7 @@ async def get_process_dump_slot( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -21646,6 +23853,8 @@ async def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -21653,12 +23862,17 @@ async def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21673,7 +23887,7 @@ async def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -21688,8 +23902,8 @@ def list_process_modules_slot( """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. + 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 @@ -21707,6 +23921,8 @@ def list_process_modules_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21721,6 +23937,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -21734,6 +23951,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21751,7 +23969,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21765,7 +23987,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace_async async def get_process_module_slot( @@ -21779,8 +24001,7 @@ async def get_process_module_slot( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -21804,6 +24025,8 @@ async def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -21812,12 +24035,17 @@ async def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21832,7 +24060,7 @@ async def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -21846,8 +24074,7 @@ def list_process_threads_slot( ) -> AsyncIterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -21865,6 +24092,8 @@ def list_process_threads_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21879,6 +24108,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -21892,6 +24122,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21909,7 +24140,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21923,7 +24158,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -21935,7 +24170,7 @@ def list_public_certificates_slot( ) -> AsyncIterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -21951,6 +24186,8 @@ def list_public_certificates_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21964,6 +24201,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -21976,6 +24214,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21993,7 +24232,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22007,7 +24250,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace_async async def get_public_certificate_slot( @@ -22020,7 +24263,7 @@ async def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -22042,6 +24285,8 @@ async def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -22049,12 +24294,17 @@ async def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22069,7 +24319,7 @@ async def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -22084,7 +24334,7 @@ async def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -22109,6 +24359,7 @@ async def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -22119,6 +24370,7 @@ async def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -22126,7 +24378,11 @@ async def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22141,11 +24397,11 @@ async def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async - async def delete_public_certificate_slot( + async def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22155,7 +24411,7 @@ async def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -22177,6 +24433,8 @@ async def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -22184,12 +24442,17 @@ async def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -22200,7 +24463,7 @@ async def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace_async @@ -22214,7 +24477,7 @@ async def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -22238,6 +24501,7 @@ async def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -22247,6 +24511,7 @@ async def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -22254,7 +24519,11 @@ async def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22269,11 +24538,11 @@ async def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace_async - async def reset_slot_configuration_slot( + async def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22283,8 +24552,8 @@ async def reset_slot_configuration_slot( """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. + 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 @@ -22304,18 +24573,25 @@ async def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22326,11 +24602,11 @@ async def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace_async - async def restart_slot( + async def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22341,7 +24617,7 @@ async def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -22351,10 +24627,11 @@ async def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -22367,12 +24644,15 @@ async def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -22380,7 +24660,11 @@ async def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22391,10 +24675,10 @@ async def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - async def _restore_from_backup_blob_slot_initial( + async def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22408,6 +24692,7 @@ async def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -22417,6 +24702,7 @@ async def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -22424,7 +24710,11 @@ async def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22434,11 +24724,11 @@ async def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace_async - async def begin_restore_from_backup_blob_slot( + async def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22448,7 +24738,7 @@ async def begin_restore_from_backup_blob_slot( ) -> AsyncLROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -22471,8 +24761,9 @@ async def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22485,6 +24776,7 @@ async def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22506,12 +24798,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - async def _restore_from_deleted_app_slot_initial( + async def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22525,6 +24816,7 @@ async def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -22534,6 +24826,7 @@ async def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -22541,7 +24834,11 @@ async def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22551,11 +24848,11 @@ async def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace_async - async def begin_restore_from_deleted_app_slot( + async def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22565,7 +24862,7 @@ async def begin_restore_from_deleted_app_slot( ) -> AsyncLROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -22587,8 +24884,9 @@ async def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22601,6 +24899,7 @@ async def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22622,12 +24921,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - async def _restore_snapshot_slot_initial( + async def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22641,6 +24939,7 @@ async def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -22650,6 +24949,7 @@ async def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -22657,7 +24957,11 @@ async def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -22667,11 +24971,11 @@ async def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace_async - async def begin_restore_snapshot_slot( + async def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22681,7 +24985,7 @@ async def begin_restore_snapshot_slot( ) -> AsyncLROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -22704,8 +25008,9 @@ async def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -22718,6 +25023,7 @@ async def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22739,10 +25045,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -22754,7 +25059,7 @@ def list_site_extensions_slot( ) -> AsyncIterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -22770,6 +25075,8 @@ def list_site_extensions_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22783,6 +25090,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -22795,6 +25103,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22812,7 +25121,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22826,7 +25139,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace_async async def get_site_extension_slot( @@ -22839,7 +25152,7 @@ async def get_site_extension_slot( ) -> "_models.SiteExtensionInfo": """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -22861,6 +25174,8 @@ async def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -22868,12 +25183,17 @@ async def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22888,7 +25208,7 @@ async def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore async def _install_site_extension_slot_initial( @@ -22905,6 +25225,8 @@ async def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -22912,12 +25234,17 @@ async def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -22935,7 +25262,7 @@ async def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async @@ -22949,7 +25276,7 @@ async def begin_install_site_extension_slot( ) -> AsyncLROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -22974,7 +25301,8 @@ async def begin_install_site_extension_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -22987,6 +25315,7 @@ async def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23010,13 +25339,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace_async - async def delete_site_extension_slot( + async def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23026,7 +25354,7 @@ async def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -23048,6 +25376,8 @@ async def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -23055,12 +25385,17 @@ async def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -23071,7 +25406,7 @@ async def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -23085,7 +25420,7 @@ def list_slot_differences_slot( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -23103,6 +25438,7 @@ def list_slot_differences_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -23119,6 +25455,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -23134,6 +25471,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -23153,7 +25491,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23167,9 +25509,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - async def _swap_slot_initial( + async def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23183,6 +25525,7 @@ async def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -23192,6 +25535,7 @@ async def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -23199,7 +25543,11 @@ async def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23209,11 +25557,11 @@ async def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot( + async def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23223,7 +25571,7 @@ async def begin_swap_slot( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -23246,8 +25594,9 @@ async def begin_swap_slot( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -23260,6 +25609,7 @@ async def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23281,10 +25631,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -23296,7 +25645,7 @@ def list_snapshots_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -23310,6 +25659,8 @@ def list_snapshots_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23323,6 +25674,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -23335,6 +25687,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23352,7 +25705,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23366,7 +25723,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -23378,7 +25735,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -23392,6 +25749,8 @@ def list_snapshots_from_dr_secondary_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23405,6 +25764,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -23417,6 +25777,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23434,7 +25795,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23448,7 +25813,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control_slot( @@ -23460,7 +25825,7 @@ async def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -23480,18 +25845,25 @@ async def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23513,7 +25885,7 @@ async def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_slot_initial( @@ -23530,6 +25902,7 @@ async def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23539,6 +25912,7 @@ async def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -23546,7 +25920,11 @@ async def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23567,7 +25945,7 @@ async def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23581,7 +25959,7 @@ async def begin_create_or_update_source_control_slot( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -23606,8 +25984,9 @@ async def begin_create_or_update_source_control_slot( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -23620,6 +25999,7 @@ async def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23644,13 +26024,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control_slot( + async def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23660,7 +26039,7 @@ async def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -23669,7 +26048,7 @@ async def delete_source_control_slot( :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: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -23682,19 +26061,26 @@ async def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23705,7 +26091,7 @@ async def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -23719,7 +26105,7 @@ async def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -23741,6 +26127,7 @@ async def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -23750,6 +26137,7 @@ async def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -23757,7 +26145,11 @@ async def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -23779,11 +26171,11 @@ async def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start_slot( + async def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23792,7 +26184,7 @@ async def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -23812,18 +26204,25 @@ async def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23834,7 +26233,7 @@ async def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore async def _start_network_trace_slot_initial( @@ -23853,12 +26252,15 @@ async def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -23867,7 +26269,11 @@ async def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -23885,7 +26291,7 @@ async def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -23901,7 +26307,7 @@ async def begin_start_network_trace_slot( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -23909,11 +26315,11 @@ async def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -23929,7 +26335,8 @@ async def begin_start_network_trace_slot( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_03_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -23944,6 +26351,7 @@ async def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -23967,13 +26375,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop_slot( + async def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23982,7 +26389,7 @@ async def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -24002,18 +26409,25 @@ async def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24024,11 +26438,11 @@ async def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace_slot( + async def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24037,7 +26451,7 @@ async def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -24056,18 +26470,25 @@ async def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24078,11 +26499,11 @@ async def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository_slot( + async def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24091,7 +26512,7 @@ async def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -24110,18 +26531,25 @@ async def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24132,11 +26560,11 @@ async def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers_slot( + async def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24145,7 +26573,7 @@ async def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -24164,18 +26592,25 @@ async def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -24186,7 +26621,7 @@ async def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -24199,7 +26634,7 @@ def list_triggered_web_jobs_slot( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -24215,6 +26650,8 @@ def list_triggered_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24228,6 +26665,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -24240,6 +26678,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24257,7 +26696,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24271,7 +26714,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job_slot( @@ -24284,7 +26727,7 @@ async def get_triggered_web_job_slot( ) -> "_models.TriggeredWebJob": """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -24306,6 +26749,8 @@ async def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24313,12 +26758,17 @@ async def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24333,11 +26783,11 @@ async def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job_slot( + async def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24347,7 +26797,7 @@ async def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -24369,6 +26819,8 @@ async def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24376,12 +26828,17 @@ async def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24392,7 +26849,7 @@ async def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -24406,7 +26863,7 @@ def list_triggered_web_job_history_slot( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -24424,6 +26881,8 @@ def list_triggered_web_job_history_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24438,6 +26897,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -24451,6 +26911,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -24468,7 +26929,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24482,7 +26947,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history_slot( @@ -24496,8 +26961,7 @@ async def get_triggered_web_job_history_slot( ) -> "_models.TriggeredJobHistory": """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -24521,6 +26985,8 @@ async def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -24529,12 +26995,17 @@ async def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24549,11 +27020,11 @@ async def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job_slot( + async def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24563,7 +27034,7 @@ async def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -24585,6 +27056,8 @@ async def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -24592,12 +27065,17 @@ async def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24608,7 +27086,7 @@ async def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -24622,7 +27100,7 @@ def list_usages_slot( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -24634,7 +27112,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -24643,6 +27121,8 @@ def list_usages_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24656,6 +27136,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -24669,6 +27150,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24687,7 +27169,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24701,7 +27187,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections_slot( @@ -24713,7 +27199,7 @@ async def list_vnet_connections_slot( ) -> List["_models.VnetInfoResource"]: """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. + 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 @@ -24733,18 +27219,25 @@ async def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24759,7 +27252,7 @@ async def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -24773,7 +27266,7 @@ async def get_vnet_connection_slot( ) -> "_models.VnetInfoResource": """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. + 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 @@ -24795,6 +27288,8 @@ async def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -24802,12 +27297,17 @@ async def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24822,7 +27322,7 @@ async def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24838,8 +27338,8 @@ async def create_or_update_vnet_connection_slot( """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). + 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 @@ -24863,6 +27363,7 @@ async def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfoResource') @@ -24873,6 +27374,7 @@ async def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -24880,7 +27382,11 @@ async def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24895,11 +27401,11 @@ async def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection_slot( + async def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24909,8 +27415,7 @@ async def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -24932,6 +27437,8 @@ async def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -24939,12 +27446,17 @@ async def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24955,7 +27467,7 @@ async def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -24971,8 +27483,8 @@ async def update_vnet_connection_slot( """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). + 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 @@ -24996,6 +27508,7 @@ async def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfoResource') @@ -25006,6 +27519,7 @@ async def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -25013,7 +27527,11 @@ async def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25028,7 +27546,7 @@ async def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -25043,7 +27561,7 @@ async def get_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Gets an app's Virtual Network gateway. - Description for 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 @@ -25067,6 +27585,8 @@ async def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -25075,12 +27595,17 @@ async def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25095,7 +27620,7 @@ async def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25111,7 +27636,7 @@ async def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -25137,6 +27662,7 @@ async def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25148,6 +27674,7 @@ async def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -25155,7 +27682,11 @@ async def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25170,7 +27701,7 @@ async def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -25186,7 +27717,7 @@ async def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -25212,6 +27743,7 @@ async def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -25223,6 +27755,7 @@ async def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -25230,7 +27763,11 @@ async def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25245,7 +27782,7 @@ async def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -25258,7 +27795,7 @@ def list_web_jobs_slot( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -25273,6 +27810,8 @@ def list_web_jobs_slot( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25286,6 +27825,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -25298,6 +27838,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25315,7 +27856,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25329,7 +27874,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job_slot( @@ -25342,7 +27887,7 @@ async def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -25364,6 +27909,8 @@ async def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -25371,12 +27918,17 @@ async def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25391,7 +27943,7 @@ async def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -25404,7 +27956,7 @@ def list_slot_differences_from_production( ) -> AsyncIterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -25419,6 +27971,7 @@ def list_slot_differences_from_production( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -25434,6 +27987,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -25448,6 +28002,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -25467,7 +28022,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25481,9 +28040,9 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - async def _swap_slot_with_production_initial( + async def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25496,6 +28055,7 @@ async def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -25504,6 +28064,7 @@ async def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -25511,7 +28072,11 @@ async def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25521,11 +28086,11 @@ async def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace_async - async def begin_swap_slot_with_production( + async def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25534,7 +28099,7 @@ async def begin_swap_slot_with_production( ) -> AsyncLROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -25554,8 +28119,9 @@ async def begin_swap_slot_with_production( :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -25567,6 +28133,7 @@ async def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25588,10 +28155,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -25602,7 +28168,7 @@ def list_snapshots( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -25614,6 +28180,8 @@ def list_snapshots( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25626,6 +28194,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -25637,6 +28206,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25654,7 +28224,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25668,7 +28242,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -25679,7 +28253,7 @@ def list_snapshots_from_dr_secondary( ) -> AsyncIterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -25691,6 +28265,8 @@ def list_snapshots_from_dr_secondary( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25703,6 +28279,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -25714,6 +28291,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25731,7 +28309,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25745,7 +28327,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace_async async def get_source_control( @@ -25756,7 +28338,7 @@ async def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -25773,17 +28355,24 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25805,7 +28394,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore async def _create_or_update_source_control_initial( @@ -25821,6 +28410,7 @@ async def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -25829,6 +28419,7 @@ async def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -25836,7 +28427,11 @@ async def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -25857,7 +28452,7 @@ async def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -25870,7 +28465,7 @@ async def begin_create_or_update_source_control( ) -> AsyncLROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -25892,8 +28487,9 @@ async def begin_create_or_update_source_control( ~azure.core.polling.AsyncLROPoller[~azure.mgmt.web.v2021_03_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -25905,6 +28501,7 @@ async def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25929,13 +28526,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def delete_source_control( + async def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25944,13 +28540,13 @@ async def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 additional_flags: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -25963,18 +28559,25 @@ async def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25985,7 +28588,7 @@ async def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async @@ -25998,7 +28601,7 @@ async def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -26017,6 +28620,7 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -26025,6 +28629,7 @@ async def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -26032,7 +28637,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -26054,11 +28663,11 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace_async - async def start( + async def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26066,7 +28675,7 @@ async def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -26083,17 +28692,24 @@ async def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26104,7 +28720,7 @@ async def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore async def _start_network_trace_initial( @@ -26122,11 +28738,14 @@ async def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -26135,7 +28754,11 @@ async def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26153,7 +28776,7 @@ async def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async @@ -26168,17 +28791,17 @@ async def begin_start_network_trace( ) -> AsyncLROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -26194,7 +28817,8 @@ async def begin_start_network_trace( ~azure.core.polling.AsyncLROPoller[list[~azure.mgmt.web.v2021_03_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -26208,6 +28832,7 @@ async def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -26231,13 +28856,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace_async - async def stop( + async def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26245,7 +28869,7 @@ async def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -26262,17 +28886,24 @@ async def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26283,11 +28914,11 @@ async def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace_async - async def stop_network_trace( + async def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26295,7 +28926,7 @@ async def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -26312,17 +28943,24 @@ async def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -26333,11 +28971,11 @@ async def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace_async - async def sync_repository( + async def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26345,7 +28983,7 @@ async def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -26362,17 +29000,24 @@ async def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26383,11 +29028,11 @@ async def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace_async - async def sync_function_triggers( + async def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26395,7 +29040,7 @@ async def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -26412,17 +29057,24 @@ async def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -26433,7 +29085,7 @@ async def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -26445,7 +29097,7 @@ def list_triggered_web_jobs( ) -> AsyncIterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -26458,6 +29110,8 @@ def list_triggered_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26470,6 +29124,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -26481,6 +29136,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26498,7 +29154,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26512,7 +29172,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace_async async def get_triggered_web_job( @@ -26524,7 +29184,7 @@ async def get_triggered_web_job( ) -> "_models.TriggeredWebJob": """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -26543,18 +29203,25 @@ async def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26569,11 +29236,11 @@ async def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace_async - async def delete_triggered_web_job( + async def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26582,7 +29249,7 @@ async def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -26601,18 +29268,25 @@ async def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -26623,7 +29297,7 @@ async def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -26636,7 +29310,7 @@ def list_triggered_web_job_history( ) -> AsyncIterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -26651,6 +29325,8 @@ def list_triggered_web_job_history( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26664,6 +29340,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -26676,6 +29353,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26693,7 +29371,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26707,7 +29389,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace_async async def get_triggered_web_job_history( @@ -26720,8 +29402,7 @@ async def get_triggered_web_job_history( ) -> "_models.TriggeredJobHistory": """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -26742,6 +29423,8 @@ async def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -26749,12 +29432,17 @@ async def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26769,11 +29457,11 @@ async def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace_async - async def run_triggered_web_job( + async def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26782,7 +29470,7 @@ async def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -26801,18 +29489,25 @@ async def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26823,7 +29518,7 @@ async def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -26836,7 +29531,7 @@ def list_usages( ) -> AsyncIterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -26845,7 +29540,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -26854,6 +29549,8 @@ def list_usages( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26866,6 +29563,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -26878,6 +29576,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -26896,7 +29595,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26910,7 +29613,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace_async async def list_vnet_connections( @@ -26921,7 +29624,7 @@ async def list_vnet_connections( ) -> List["_models.VnetInfoResource"]: """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. + 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 @@ -26938,17 +29641,24 @@ async def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26963,7 +29673,7 @@ async def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace_async @@ -26976,7 +29686,7 @@ async def get_vnet_connection( ) -> "_models.VnetInfoResource": """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. + 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 @@ -26995,18 +29705,25 @@ async def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27021,7 +29738,7 @@ async def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -27036,8 +29753,8 @@ async def create_or_update_vnet_connection( """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). + 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 @@ -27058,6 +29775,7 @@ async def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfoResource') @@ -27067,6 +29785,7 @@ async def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -27074,7 +29793,11 @@ async def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27089,11 +29812,11 @@ async def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async - async def delete_vnet_connection( + async def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27102,8 +29825,7 @@ async def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -27122,18 +29844,25 @@ async def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27144,7 +29873,7 @@ async def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -27159,8 +29888,8 @@ async def update_vnet_connection( """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). + 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 @@ -27181,6 +29910,7 @@ async def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfoResource') @@ -27190,6 +29920,7 @@ async def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -27197,7 +29928,11 @@ async def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27212,7 +29947,7 @@ async def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace_async @@ -27226,7 +29961,7 @@ async def get_vnet_connection_gateway( ) -> "_models.VnetGateway": """Gets an app's Virtual Network gateway. - Description for 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 @@ -27247,6 +29982,8 @@ async def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -27254,12 +29991,17 @@ async def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27274,7 +30016,7 @@ async def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -27289,7 +30031,7 @@ async def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -27312,6 +30054,7 @@ async def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -27322,6 +30065,7 @@ async def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -27329,7 +30073,11 @@ async def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27344,7 +30092,7 @@ async def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace_async @@ -27359,7 +30107,7 @@ async def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -27382,6 +30130,7 @@ async def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -27392,6 +30141,7 @@ async def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -27399,7 +30149,11 @@ async def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27414,7 +30168,7 @@ async def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -27426,7 +30180,7 @@ def list_web_jobs( ) -> AsyncIterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -27438,6 +30192,8 @@ def list_web_jobs( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27450,6 +30206,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -27461,6 +30218,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27478,7 +30236,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27492,7 +30254,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace_async async def get_web_job( @@ -27504,7 +30266,7 @@ async def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -27523,18 +30285,25 @@ async def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27549,5 +30318,5 @@ async def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_web_site_management_client_operations.py index 3843d2be7295..8029ee2e84a4 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/aio/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -33,7 +32,7 @@ async def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -46,14 +45,21 @@ async def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -68,7 +74,7 @@ async def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace_async @@ -79,7 +85,7 @@ async def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2021_03_01.models.User @@ -94,11 +100,13 @@ async def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -106,7 +114,11 @@ async def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +133,7 @@ async def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -131,7 +143,7 @@ def list_source_controls( ) -> AsyncIterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -140,6 +152,8 @@ def list_source_controls( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -149,6 +163,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -157,6 +172,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -174,7 +190,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -188,7 +208,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace_async async def get_source_control( @@ -198,7 +218,7 @@ async def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -213,15 +233,22 @@ async def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -236,7 +263,7 @@ async def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace_async @@ -248,7 +275,7 @@ async def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -265,12 +292,14 @@ async def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -278,7 +307,11 @@ async def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -293,7 +326,7 @@ async def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -305,11 +338,11 @@ def list_billing_meters( ) -> AsyncIterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -318,6 +351,8 @@ def list_billing_meters( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -328,6 +363,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -339,6 +375,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -358,7 +395,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -372,7 +413,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace_async async def check_name_availability( @@ -384,13 +425,13 @@ async def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2021_03_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -403,6 +444,7 @@ async def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -410,6 +452,7 @@ async def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -417,7 +460,11 @@ async def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -432,7 +479,7 @@ async def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -451,6 +498,8 @@ def list_custom_host_name_sites( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.CustomHostnameSitesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameSitesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -461,6 +510,7 @@ def prepare_request(next_link=None): request = build_list_custom_host_name_sites_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_custom_host_name_sites.metadata['url'], ) request = _convert_request(request) @@ -470,6 +520,7 @@ def prepare_request(next_link=None): request = build_list_custom_host_name_sites_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -487,7 +538,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -501,7 +556,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_custom_host_name_sites.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites'} # type: ignore + list_custom_host_name_sites.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites"} # type: ignore @distributed_trace_async async def get_subscription_deployment_locations( @@ -510,7 +565,7 @@ async def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -523,15 +578,22 @@ async def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -546,7 +608,7 @@ async def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -560,18 +622,18 @@ def list_geo_regions( ) -> AsyncIterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2021_03_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) @@ -579,6 +641,8 @@ def list_geo_regions( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -589,6 +653,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -602,6 +667,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -623,7 +689,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -637,7 +707,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -647,7 +717,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> AsyncIterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier @@ -658,6 +728,7 @@ def list_site_identifiers_assigned_to_host_name( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -671,6 +742,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -683,6 +755,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -702,7 +775,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -716,7 +793,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -725,7 +802,7 @@ def list_premier_add_on_offers( ) -> AsyncIterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -734,6 +811,8 @@ def list_premier_add_on_offers( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.web.v2021_03_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -744,6 +823,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -753,6 +833,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -770,7 +851,11 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -784,7 +869,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace_async async def list_skus( @@ -793,7 +878,7 @@ async def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -806,15 +891,22 @@ async def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -829,7 +921,7 @@ async def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace_async @@ -841,8 +933,8 @@ async def verify_hosting_environment_vnet( """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. + 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.v2021_03_01.models.VnetParameters @@ -857,12 +949,14 @@ async def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -870,7 +964,11 @@ async def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -885,11 +983,11 @@ async def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace_async - async def move( + async def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -897,7 +995,7 @@ async def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -914,6 +1012,7 @@ async def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -921,6 +1020,7 @@ async def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -928,7 +1028,11 @@ async def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -939,7 +1043,7 @@ async def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace_async @@ -951,7 +1055,7 @@ async def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -968,6 +1072,7 @@ async def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -975,6 +1080,7 @@ async def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -982,7 +1088,11 @@ async def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -997,11 +1107,11 @@ async def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace_async - async def validate_move( + async def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1009,7 +1119,7 @@ async def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -1026,6 +1136,7 @@ async def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1033,6 +1144,7 @@ async def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1040,7 +1152,11 @@ async def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1051,5 +1167,5 @@ async def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_certificate_orders_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_certificate_orders_operations.py index 902cbc3bb9fc..a88b8eb02fde 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_certificate_orders_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_certificate_orders_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,33 +68,33 @@ def build_validate_purchase_information_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -105,30 +106,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,31 +141,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -177,35 +180,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -218,31 +221,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -256,35 +260,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -297,31 +301,32 @@ def build_list_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -333,10 +338,11 @@ def build_get_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -344,21 +350,21 @@ def build_get_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -373,12 +379,12 @@ def build_create_or_update_certificate_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -386,23 +392,23 @@ def build_create_or_update_certificate_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -416,10 +422,11 @@ def build_delete_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -427,21 +434,21 @@ def build_delete_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -456,12 +463,12 @@ def build_update_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -469,23 +476,23 @@ def build_update_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -501,35 +508,35 @@ def build_reissue_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -545,35 +552,35 @@ def build_renew_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -586,31 +593,32 @@ def build_resend_email_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -624,35 +632,35 @@ def build_resend_request_emails_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -668,35 +676,35 @@ def build_retrieve_site_seal_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -709,31 +717,32 @@ def build_verify_domain_ownership_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -744,31 +753,32 @@ def build_retrieve_certificate_actions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -779,35 +789,36 @@ def build_retrieve_certificate_email_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceCertificateOrdersOperations(object): +class AppServiceCertificateOrdersOperations(object): # pylint: disable=too-many-public-methods """AppServiceCertificateOrdersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -836,7 +847,7 @@ def list( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """List all certificate orders in a subscription. - Description for List all certificate orders in a subscription. + List all certificate orders in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceCertificateOrderCollection or the result @@ -845,6 +856,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -855,6 +868,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -864,6 +878,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -881,7 +896,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -895,17 +914,17 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace - def validate_purchase_information( + def validate_purchase_information( # pylint: disable=inconsistent-return-statements self, app_service_certificate_order: "_models.AppServiceCertificateOrder", **kwargs: Any ) -> None: """Validate information for a certificate order. - Description for 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: @@ -921,12 +940,14 @@ def validate_purchase_information( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_certificate_order, 'AppServiceCertificateOrder') request = build_validate_purchase_information_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_purchase_information.metadata['url'], @@ -934,7 +955,11 @@ def validate_purchase_information( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -945,7 +970,7 @@ def validate_purchase_information( if cls: return cls(pipeline_response, None, {}) - validate_purchase_information.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation'} # type: ignore + validate_purchase_information.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation"} # type: ignore @distributed_trace @@ -956,7 +981,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceCertificateOrderCollection"]: """Get certificate orders in a resource group. - Description for 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 @@ -967,6 +992,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateOrderCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrderCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -978,6 +1005,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -988,6 +1016,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1005,7 +1034,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1019,7 +1052,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders"} # type: ignore @distributed_trace def get( @@ -1030,7 +1063,7 @@ def get( ) -> "_models.AppServiceCertificateOrder": """Get a certificate order. - Description for 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 @@ -1047,17 +1080,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1072,7 +1112,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore def _create_or_update_initial( @@ -1088,6 +1128,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') @@ -1096,6 +1137,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1103,7 +1145,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1121,7 +1167,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1134,7 +1180,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceCertificateOrder"]: """Create or update a certificate purchase order. - Description for 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 @@ -1157,8 +1203,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateOrder] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateOrder"] lro_delay = kwargs.pop( 'polling_interval', @@ -1170,6 +1217,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, certificate_distinguished_name=certificate_distinguished_name, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1194,13 +1242,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1208,7 +1255,7 @@ def delete( ) -> None: """Delete an existing certificate order. - Description for 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 @@ -1225,17 +1272,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1246,7 +1300,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1259,7 +1313,7 @@ def update( ) -> "_models.AppServiceCertificateOrder": """Create or update a certificate purchase order. - Description for 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 @@ -1279,6 +1333,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrderPatchResource') @@ -1287,6 +1342,7 @@ def update( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1294,7 +1350,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1309,7 +1369,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}"} # type: ignore @distributed_trace @@ -1321,7 +1381,7 @@ def list_certificates( ) -> Iterable["_models.AppServiceCertificateCollection"]: """List all certificates associated with a certificate order. - Description for 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 @@ -1334,6 +1394,8 @@ def list_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1346,6 +1408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_certificates.metadata['url'], ) request = _convert_request(request) @@ -1357,6 +1420,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1374,7 +1438,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1388,7 +1456,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates'} # type: ignore + list_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates"} # type: ignore @distributed_trace def get_certificate( @@ -1400,7 +1468,7 @@ def get_certificate( ) -> "_models.AppServiceCertificateResource": """Get the certificate associated with a certificate order. - Description for 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 @@ -1419,18 +1487,25 @@ def get_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1445,7 +1520,7 @@ def get_certificate( return deserialized - get_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + get_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore def _create_or_update_certificate_initial( @@ -1462,6 +1537,7 @@ def _create_or_update_certificate_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') @@ -1471,6 +1547,7 @@ def _create_or_update_certificate_initial( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_certificate_initial.metadata['url'], @@ -1478,7 +1555,11 @@ def _create_or_update_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -1496,7 +1577,7 @@ def _create_or_update_certificate_initial( return deserialized - _create_or_update_certificate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + _create_or_update_certificate_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1510,7 +1591,7 @@ def begin_create_or_update_certificate( ) -> LROPoller["_models.AppServiceCertificateResource"]: """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1534,8 +1615,9 @@ def begin_create_or_update_certificate( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.AppServiceCertificateResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceCertificateResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1548,6 +1630,7 @@ def begin_create_or_update_certificate( certificate_order_name=certificate_order_name, name=name, key_vault_certificate=key_vault_certificate, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1572,13 +1655,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + begin_create_or_update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def delete_certificate( + def delete_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1587,7 +1669,7 @@ def delete_certificate( ) -> None: """Delete the certificate associated with a certificate order. - Description for 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 @@ -1606,18 +1688,25 @@ def delete_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_certificate_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1628,7 +1717,7 @@ def delete_certificate( if cls: return cls(pipeline_response, None, {}) - delete_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + delete_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace @@ -1642,7 +1731,7 @@ def update_certificate( ) -> "_models.AppServiceCertificateResource": """Creates or updates a certificate and associates with key vault secret. - Description for Creates or updates a certificate and associates with key vault secret. + 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 @@ -1664,6 +1753,7 @@ def update_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key_vault_certificate, 'AppServiceCertificatePatchResource') @@ -1673,6 +1763,7 @@ def update_certificate( certificate_order_name=certificate_order_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_certificate.metadata['url'], @@ -1680,7 +1771,11 @@ def update_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1695,11 +1790,11 @@ def update_certificate( return deserialized - update_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}'} # type: ignore + update_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}"} # type: ignore @distributed_trace - def reissue( + def reissue( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1708,7 +1803,7 @@ def reissue( ) -> None: """Reissue an existing certificate order. - Description for 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 @@ -1728,6 +1823,7 @@ def reissue( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reissue_certificate_order_request, 'ReissueCertificateOrderRequest') @@ -1736,6 +1832,7 @@ def reissue( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reissue.metadata['url'], @@ -1743,7 +1840,11 @@ def reissue( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1754,11 +1855,11 @@ def reissue( if cls: return cls(pipeline_response, None, {}) - reissue.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue'} # type: ignore + reissue.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1767,7 +1868,7 @@ def renew( ) -> None: """Renew an existing certificate order. - Description for 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 @@ -1787,6 +1888,7 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(renew_certificate_order_request, 'RenewCertificateOrderRequest') @@ -1795,6 +1897,7 @@ def renew( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.renew.metadata['url'], @@ -1802,7 +1905,11 @@ def renew( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1813,11 +1920,11 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew"} # type: ignore @distributed_trace - def resend_email( + def resend_email( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1825,7 +1932,7 @@ def resend_email( ) -> None: """Resend certificate email. - Description for 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 @@ -1842,17 +1949,24 @@ def resend_email( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_resend_email_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.resend_email.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1863,11 +1977,11 @@ def resend_email( if cls: return cls(pipeline_response, None, {}) - resend_email.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail'} # type: ignore + resend_email.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail"} # type: ignore @distributed_trace - def resend_request_emails( + def resend_request_emails( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -1896,6 +2010,7 @@ def resend_request_emails( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(name_identifier, 'NameIdentifier') @@ -1904,6 +2019,7 @@ def resend_request_emails( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.resend_request_emails.metadata['url'], @@ -1911,7 +2027,11 @@ def resend_request_emails( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1922,7 +2042,7 @@ def resend_request_emails( if cls: return cls(pipeline_response, None, {}) - resend_request_emails.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails'} # type: ignore + resend_request_emails.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails"} # type: ignore @distributed_trace @@ -1960,6 +2080,7 @@ def retrieve_site_seal( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_seal_request, 'SiteSealRequest') @@ -1968,6 +2089,7 @@ def retrieve_site_seal( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.retrieve_site_seal.metadata['url'], @@ -1975,7 +2097,11 @@ def retrieve_site_seal( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1990,11 +2116,11 @@ def retrieve_site_seal( return deserialized - retrieve_site_seal.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal'} # type: ignore + retrieve_site_seal.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal"} # type: ignore @distributed_trace - def verify_domain_ownership( + def verify_domain_ownership( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, certificate_order_name: str, @@ -2002,7 +2128,7 @@ def verify_domain_ownership( ) -> None: """Verify domain ownership for this certificate order. - Description for 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 @@ -2019,17 +2145,24 @@ def verify_domain_ownership( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_verify_domain_ownership_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.verify_domain_ownership.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2040,7 +2173,7 @@ def verify_domain_ownership( if cls: return cls(pipeline_response, None, {}) - verify_domain_ownership.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership'} # type: ignore + verify_domain_ownership.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership"} # type: ignore @distributed_trace @@ -2052,7 +2185,7 @@ def retrieve_certificate_actions( ) -> List["_models.CertificateOrderAction"]: """Retrieve the list of certificate actions. - Description for 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 @@ -2069,17 +2202,24 @@ def retrieve_certificate_actions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_retrieve_certificate_actions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_actions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2094,7 +2234,7 @@ def retrieve_certificate_actions( return deserialized - retrieve_certificate_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions'} # type: ignore + retrieve_certificate_actions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions"} # type: ignore @distributed_trace @@ -2106,7 +2246,7 @@ def retrieve_certificate_email_history( ) -> List["_models.CertificateEmail"]: """Retrieve email history. - Description for 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 @@ -2123,17 +2263,24 @@ def retrieve_certificate_email_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_retrieve_certificate_email_history_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.retrieve_certificate_email_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2148,5 +2295,5 @@ def retrieve_certificate_email_history( return deserialized - retrieve_certificate_email_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory'} # type: ignore + retrieve_certificate_email_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_environments_operations.py index fb8915d3145f..66a98fc9fc22 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,33 +183,34 @@ def build_delete_request_initial( force_delete: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_delete is not None: - query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceDelete'] = _SERIALIZER.query("force_delete", force_delete, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capacities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -296,31 +301,32 @@ def build_get_vip_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -334,35 +340,35 @@ def build_change_vnet_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -375,31 +381,32 @@ def build_get_ase_v3_networking_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -413,35 +420,35 @@ def build_update_ase_networking_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -454,31 +461,32 @@ def build_list_diagnostics_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -490,10 +498,11 @@ def build_get_diagnostics_item_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -501,21 +510,21 @@ def build_get_diagnostics_item_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -526,31 +535,32 @@ def build_get_inbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -561,31 +571,32 @@ def build_list_multi_role_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -596,31 +607,32 @@ def build_get_multi_role_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -634,35 +646,35 @@ def build_create_or_update_multi_role_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -678,35 +690,35 @@ def build_update_multi_role_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -720,10 +732,11 @@ def build_list_multi_role_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -731,21 +744,21 @@ def build_list_multi_role_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -756,31 +769,32 @@ def build_list_multi_role_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -791,31 +805,32 @@ def build_list_multi_role_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -826,31 +841,32 @@ def build_list_multi_role_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -861,31 +877,32 @@ def build_list_operations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -896,31 +913,32 @@ def build_get_outbound_network_dependencies_endpoints_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -931,31 +949,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -967,10 +986,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -978,21 +998,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1027,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1020,23 +1040,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1050,10 +1070,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1061,21 +1082,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1086,31 +1107,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1121,31 +1143,32 @@ def build_reboot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1156,31 +1179,32 @@ def build_resume_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1191,31 +1215,32 @@ def build_list_app_service_plans_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1228,33 +1253,34 @@ def build_list_web_apps_request( properties_to_include: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if properties_to_include is not None: - query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['propertiesToInclude'] = _SERIALIZER.query("properties_to_include", properties_to_include, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1265,31 +1291,32 @@ def build_suspend_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1302,33 +1329,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1339,31 +1367,32 @@ def build_list_worker_pools_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1375,10 +1404,11 @@ def build_get_worker_pool_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1386,21 +1416,21 @@ def build_get_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1415,12 +1445,12 @@ def build_create_or_update_worker_pool_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1428,23 +1458,23 @@ def build_create_or_update_worker_pool_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1461,12 +1491,12 @@ def build_update_worker_pool_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1474,23 +1504,23 @@ def build_update_worker_pool_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1505,10 +1535,11 @@ def build_list_worker_pool_instance_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1517,21 +1548,21 @@ def build_list_worker_pool_instance_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1543,10 +1574,11 @@ def build_list_web_worker_metric_definitions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1554,21 +1586,21 @@ def build_list_web_worker_metric_definitions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1580,10 +1612,11 @@ def build_list_worker_pool_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1591,21 +1624,21 @@ def build_list_worker_pool_skus_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1617,10 +1650,11 @@ def build_list_web_worker_usages_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1628,25 +1662,25 @@ def build_list_web_worker_usages_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServiceEnvironmentsOperations(object): +class AppServiceEnvironmentsOperations(object): # pylint: disable=too-many-public-methods """AppServiceEnvironmentsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1675,7 +1709,7 @@ def list( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments for a subscription. - Description for Get all App Service Environments for a subscription. + Get all App Service Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AppServiceEnvironmentCollection or the result of @@ -1684,6 +1718,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1694,6 +1730,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -1703,6 +1740,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1720,7 +1758,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1734,7 +1776,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1744,7 +1786,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServiceEnvironmentCollection"]: """Get all App Service Environments in a resource group. - Description for 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 @@ -1755,6 +1797,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServiceEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1766,6 +1810,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1776,6 +1821,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1793,7 +1839,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1807,7 +1857,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments"} # type: ignore @distributed_trace def get( @@ -1818,7 +1868,7 @@ def get( ) -> "_models.AppServiceEnvironmentResource": """Get the properties of an App Service Environment. - Description for 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 @@ -1835,17 +1885,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1860,7 +1917,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -1876,6 +1933,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') @@ -1884,6 +1942,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1891,7 +1950,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -1912,7 +1975,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -1925,7 +1988,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServiceEnvironmentResource"]: """Create or update an App Service Environment. - Description for 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 @@ -1948,8 +2011,9 @@ def begin_create_or_update( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.AppServiceEnvironmentResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServiceEnvironmentResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1961,6 +2025,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, hosting_environment_envelope=hosting_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1985,12 +2050,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2003,18 +2067,25 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, force_delete=force_delete, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -2024,11 +2095,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2037,7 +2108,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete an App Service Environment. - Description for 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 @@ -2058,7 +2129,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2070,6 +2142,7 @@ def begin_delete( resource_group_name=resource_group_name, name=name, force_delete=force_delete, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2090,10 +2163,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -2105,7 +2177,7 @@ def update( ) -> "_models.AppServiceEnvironmentResource": """Create or update an App Service Environment. - Description for 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 @@ -2125,6 +2197,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentPatchResource') @@ -2133,6 +2206,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -2140,7 +2214,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -2162,7 +2240,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}"} # type: ignore @distributed_trace @@ -2174,7 +2252,7 @@ def list_capacities( ) -> Iterable["_models.StampCapacityCollection"]: """Get the used, available, and total worker capacity an App Service Environment. - Description for Get the used, available, and total worker capacity an App Service Environment. + 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 @@ -2187,6 +2265,8 @@ def list_capacities( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StampCapacityCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StampCapacityCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2199,6 +2279,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capacities.metadata['url'], ) request = _convert_request(request) @@ -2210,6 +2291,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2227,7 +2309,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2241,7 +2327,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_capacities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute'} # type: ignore + list_capacities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute"} # type: ignore @distributed_trace def get_vip_info( @@ -2252,7 +2338,7 @@ def get_vip_info( ) -> "_models.AddressResponse": """Get IP addresses assigned to an App Service Environment. - Description for 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 @@ -2269,17 +2355,24 @@ def get_vip_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vip_info_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vip_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2294,7 +2387,7 @@ def get_vip_info( return deserialized - get_vip_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} # type: ignore + get_vip_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip"} # type: ignore def _change_vnet_initial( @@ -2310,6 +2403,7 @@ def _change_vnet_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(vnet_info, 'VirtualNetworkProfile') @@ -2318,6 +2412,7 @@ def _change_vnet_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._change_vnet_initial.metadata['url'], @@ -2325,7 +2420,11 @@ def _change_vnet_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2343,7 +2442,7 @@ def _change_vnet_initial( return deserialized - _change_vnet_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + _change_vnet_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2356,7 +2455,7 @@ def begin_change_vnet( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Move an App Service Environment to a different VNET. - Description for 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 @@ -2379,6 +2478,7 @@ def begin_change_vnet( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] @@ -2394,6 +2494,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.begin_change_vnet.metadata['url'], @@ -2408,6 +2509,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -2427,7 +2529,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2438,7 +2544,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -2450,6 +2556,7 @@ def get_next(next_link=None): resource_group_name=resource_group_name, name=name, vnet_info=vnet_info, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2460,8 +2567,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -2477,10 +2583,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} # type: ignore + begin_change_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork"} # type: ignore @distributed_trace @@ -2492,7 +2597,7 @@ def get_ase_v3_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Get networking configuration of an App Service Environment. - Description for Get networking configuration of an App Service Environment. + 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 @@ -2509,17 +2614,24 @@ def get_ase_v3_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ase_v3_networking_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ase_v3_networking_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2534,7 +2646,7 @@ def get_ase_v3_networking_configuration( return deserialized - get_ase_v3_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + get_ase_v3_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace @@ -2547,7 +2659,7 @@ def update_ase_networking_configuration( ) -> "_models.AseV3NetworkingConfiguration": """Update networking configuration of an App Service Environment. - Description for Update networking configuration of an App Service Environment. + 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 @@ -2567,6 +2679,7 @@ def update_ase_networking_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ase_networking_configuration, 'AseV3NetworkingConfiguration') @@ -2575,6 +2688,7 @@ def update_ase_networking_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ase_networking_configuration.metadata['url'], @@ -2582,7 +2696,11 @@ def update_ase_networking_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2597,7 +2715,7 @@ def update_ase_networking_configuration( return deserialized - update_ase_networking_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking'} # type: ignore + update_ase_networking_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/networking"} # type: ignore @distributed_trace @@ -2609,7 +2727,7 @@ def list_diagnostics( ) -> List["_models.HostingEnvironmentDiagnostics"]: """Get diagnostic information for an App Service Environment. - Description for 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 @@ -2626,17 +2744,24 @@ def list_diagnostics( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_diagnostics_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_diagnostics.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2651,7 +2776,7 @@ def list_diagnostics( return deserialized - list_diagnostics.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics'} # type: ignore + list_diagnostics.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics"} # type: ignore @distributed_trace @@ -2664,7 +2789,7 @@ def get_diagnostics_item( ) -> "_models.HostingEnvironmentDiagnostics": """Get a diagnostics item for an App Service Environment. - Description for 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 @@ -2683,18 +2808,25 @@ def get_diagnostics_item( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_diagnostics_item_request( resource_group_name=resource_group_name, name=name, diagnostics_name=diagnostics_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostics_item.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2709,7 +2841,7 @@ def get_diagnostics_item( return deserialized - get_diagnostics_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}'} # type: ignore + get_diagnostics_item.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}"} # type: ignore @distributed_trace @@ -2721,8 +2853,7 @@ def get_inbound_network_dependencies_endpoints( ) -> Iterable["_models.InboundEnvironmentEndpointCollection"]: """Get the network endpoints of all inbound dependencies of an App Service Environment. - Description for Get the network endpoints of all inbound dependencies of an App Service - Environment. + 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 @@ -2735,6 +2866,8 @@ def get_inbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.InboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2747,6 +2880,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_inbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -2758,6 +2892,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2775,7 +2910,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2789,7 +2928,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_inbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints'} # type: ignore + get_inbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def list_multi_role_pools( @@ -2800,7 +2939,7 @@ def list_multi_role_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all multi-role pools. - Description for 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 @@ -2812,6 +2951,8 @@ def list_multi_role_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2824,6 +2965,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pools.metadata['url'], ) request = _convert_request(request) @@ -2835,6 +2977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2852,7 +2995,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2866,7 +3013,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools'} # type: ignore + list_multi_role_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools"} # type: ignore @distributed_trace def get_multi_role_pool( @@ -2877,7 +3024,7 @@ def get_multi_role_pool( ) -> "_models.WorkerPoolResource": """Get properties of a multi-role pool. - Description for 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 @@ -2894,17 +3041,24 @@ def get_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_multi_role_pool_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_multi_role_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2919,7 +3073,7 @@ def get_multi_role_pool( return deserialized - get_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + get_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore def _create_or_update_multi_role_pool_initial( @@ -2935,6 +3089,7 @@ def _create_or_update_multi_role_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -2943,6 +3098,7 @@ def _create_or_update_multi_role_pool_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_multi_role_pool_initial.metadata['url'], @@ -2950,7 +3106,11 @@ def _create_or_update_multi_role_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2968,7 +3128,7 @@ def _create_or_update_multi_role_pool_initial( return deserialized - _create_or_update_multi_role_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + _create_or_update_multi_role_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -2981,7 +3141,7 @@ def begin_create_or_update_multi_role_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a multi-role pool. - Description for 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 @@ -3002,8 +3162,9 @@ def begin_create_or_update_multi_role_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3015,6 +3176,7 @@ def begin_create_or_update_multi_role_pool( resource_group_name=resource_group_name, name=name, multi_role_pool_envelope=multi_role_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3039,10 +3201,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + begin_create_or_update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace def update_multi_role_pool( @@ -3054,7 +3215,7 @@ def update_multi_role_pool( ) -> "_models.WorkerPoolResource": """Create or update a multi-role pool. - Description for 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 @@ -3073,6 +3234,7 @@ def update_multi_role_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') @@ -3081,6 +3243,7 @@ def update_multi_role_pool( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_multi_role_pool.metadata['url'], @@ -3088,7 +3251,11 @@ def update_multi_role_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3107,7 +3274,7 @@ def update_multi_role_pool( return deserialized - update_multi_role_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default'} # type: ignore + update_multi_role_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default"} # type: ignore @distributed_trace @@ -3121,8 +3288,8 @@ def list_multi_role_pool_instance_metric_definitions( """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. + 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 @@ -3137,6 +3304,8 @@ def list_multi_role_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3150,6 +3319,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3162,6 +3332,7 @@ def prepare_request(next_link=None): name=name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3179,7 +3350,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3193,7 +3368,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions'} # type: ignore + list_multi_role_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_metric_definitions( @@ -3204,7 +3379,7 @@ def list_multi_role_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a multi-role pool of an App Service Environment. - Description for Get metric definitions for a multi-role pool of an App Service Environment. + 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 @@ -3217,6 +3392,8 @@ def list_multi_role_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3229,6 +3406,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -3240,6 +3418,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3257,7 +3436,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3271,7 +3454,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions'} # type: ignore + list_multi_role_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions"} # type: ignore @distributed_trace def list_multi_role_pool_skus( @@ -3282,7 +3465,7 @@ def list_multi_role_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a multi-role pool. - Description for 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 @@ -3293,6 +3476,8 @@ def list_multi_role_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3305,6 +3490,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -3316,6 +3502,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3333,7 +3520,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,7 +3538,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus'} # type: ignore + list_multi_role_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus"} # type: ignore @distributed_trace def list_multi_role_usages( @@ -3358,7 +3549,7 @@ def list_multi_role_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a multi-role pool of an App Service Environment. - Description for Get usage metrics for a multi-role pool of an App Service Environment. + 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 @@ -3369,6 +3560,8 @@ def list_multi_role_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3381,6 +3574,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_multi_role_usages.metadata['url'], ) request = _convert_request(request) @@ -3392,6 +3586,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3409,7 +3604,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3423,7 +3622,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_multi_role_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages'} # type: ignore + list_multi_role_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages"} # type: ignore @distributed_trace def list_operations( @@ -3434,7 +3633,7 @@ def list_operations( ) -> List["_models.Operation"]: """List all currently running operations on the App Service Environment. - Description for List all currently running operations on the App Service Environment. + 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 @@ -3451,17 +3650,24 @@ def list_operations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_operations_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3476,7 +3682,7 @@ def list_operations( return deserialized - list_operations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations'} # type: ignore + list_operations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations"} # type: ignore @distributed_trace @@ -3488,8 +3694,7 @@ def get_outbound_network_dependencies_endpoints( ) -> Iterable["_models.OutboundEnvironmentEndpointCollection"]: """Get the network endpoints of all outbound dependencies of an App Service Environment. - Description for Get the network endpoints of all outbound dependencies of an App Service - Environment. + 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 @@ -3502,6 +3707,8 @@ def get_outbound_network_dependencies_endpoints( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.OutboundEnvironmentEndpointCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3514,6 +3721,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_outbound_network_dependencies_endpoints.metadata['url'], ) request = _convert_request(request) @@ -3525,6 +3733,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3542,7 +3751,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3556,7 +3769,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints'} # type: ignore + get_outbound_network_dependencies_endpoints.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints"} # type: ignore @distributed_trace def get_private_endpoint_connection_list( @@ -3567,7 +3780,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoints associated with a hosting environment. - Description for Gets the list of private endpoints associated with a hosting environment. + 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 @@ -3580,6 +3793,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3592,6 +3807,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -3603,6 +3819,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3620,7 +3837,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3634,7 +3855,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -3646,7 +3867,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3665,18 +3886,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3691,7 +3919,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -3708,6 +3936,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -3717,6 +3946,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -3724,7 +3954,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3742,7 +3976,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -3756,7 +3990,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -3781,8 +4015,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3795,6 +4030,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3819,10 +4055,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -3837,18 +4072,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -3869,7 +4111,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -3882,7 +4124,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3902,7 +4144,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -3914,6 +4157,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -3937,10 +4181,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -3951,7 +4194,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -3968,17 +4211,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3993,11 +4243,11 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateLinkResources"} # type: ignore @distributed_trace - def reboot( + def reboot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4005,7 +4255,7 @@ def reboot( ) -> None: """Reboot all machines in an App Service Environment. - Description for 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 @@ -4022,17 +4272,24 @@ def reboot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reboot_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [202]: @@ -4043,7 +4300,7 @@ def reboot( if cls: return cls(pipeline_response, None, {}) - reboot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot'} # type: ignore + reboot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot"} # type: ignore def _resume_initial( @@ -4058,17 +4315,24 @@ def _resume_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_resume_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._resume_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4086,7 +4350,7 @@ def _resume_initial( return deserialized - _resume_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + _resume_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -4098,7 +4362,7 @@ def begin_resume( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Resume an App Service Environment. - Description for 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 @@ -4119,6 +4383,8 @@ def begin_resume( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4131,6 +4397,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_resume.metadata['url'], ) request = _convert_request(request) @@ -4142,6 +4409,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4159,7 +4427,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4170,7 +4442,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4181,6 +4453,7 @@ def get_next(next_link=None): raw_result = self._resume_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4190,8 +4463,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4207,10 +4479,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_resume.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume'} # type: ignore + begin_resume.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume"} # type: ignore @distributed_trace @@ -4222,7 +4493,7 @@ def list_app_service_plans( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in an App Service Environment. - Description for Get all App Service plans in an App Service Environment. + 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 @@ -4235,6 +4506,8 @@ def list_app_service_plans( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4247,6 +4520,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_plans.metadata['url'], ) request = _convert_request(request) @@ -4258,6 +4532,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4275,7 +4550,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4289,7 +4568,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_plans.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms'} # type: ignore + list_app_service_plans.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms"} # type: ignore @distributed_trace def list_web_apps( @@ -4301,19 +4580,22 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps in an App Service Environment. - Description for 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. + :param properties_to_include: Comma separated list of app properties to include. Default value + is None. :type properties_to_include: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4326,6 +4608,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=self.list_web_apps.metadata['url'], ) @@ -4338,6 +4621,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, properties_to_include=properties_to_include, template_url=next_link, ) @@ -4356,7 +4640,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4370,7 +4658,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites"} # type: ignore def _suspend_initial( self, @@ -4384,17 +4672,24 @@ def _suspend_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_suspend_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._suspend_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4412,7 +4707,7 @@ def _suspend_initial( return deserialized - _suspend_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + _suspend_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4424,7 +4719,7 @@ def begin_suspend( ) -> LROPoller[ItemPaged["_models.WebAppCollection"]]: """Suspend an App Service Environment. - Description for 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 @@ -4445,6 +4740,8 @@ def begin_suspend( :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4457,6 +4754,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.begin_suspend.metadata['url'], ) request = _convert_request(request) @@ -4468,6 +4766,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4485,7 +4784,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4496,7 +4799,7 @@ def get_next(next_link=None): return pipeline_response - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] lro_delay = kwargs.pop( 'polling_interval', @@ -4507,6 +4810,7 @@ def get_next(next_link=None): raw_result = self._suspend_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4516,8 +4820,7 @@ def get_long_running_output(pipeline_response): def internal_get_next(next_link=None): if next_link is None: return pipeline_response - else: - return get_next(next_link) + return get_next(next_link) return ItemPaged( internal_get_next, extract_data @@ -4533,10 +4836,9 @@ def internal_get_next(next_link=None): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_suspend.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend'} # type: ignore + begin_suspend.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend"} # type: ignore @distributed_trace @@ -4549,7 +4851,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Get global usage metrics of an App Service Environment. - Description for 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 @@ -4558,7 +4860,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -4567,6 +4869,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4579,6 +4883,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -4591,6 +4896,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -4609,7 +4915,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4623,7 +4933,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages"} # type: ignore @distributed_trace def list_worker_pools( @@ -4634,7 +4944,7 @@ def list_worker_pools( ) -> Iterable["_models.WorkerPoolCollection"]: """Get all worker pools of an App Service Environment. - Description for 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 @@ -4646,6 +4956,8 @@ def list_worker_pools( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WorkerPoolCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4658,6 +4970,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pools.metadata['url'], ) request = _convert_request(request) @@ -4669,6 +4982,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4686,7 +5000,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4700,7 +5018,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pools.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools'} # type: ignore + list_worker_pools.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools"} # type: ignore @distributed_trace def get_worker_pool( @@ -4712,7 +5030,7 @@ def get_worker_pool( ) -> "_models.WorkerPoolResource": """Get properties of a worker pool. - Description for 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 @@ -4731,18 +5049,25 @@ def get_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_worker_pool_request( resource_group_name=resource_group_name, name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_worker_pool.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4757,7 +5082,7 @@ def get_worker_pool( return deserialized - get_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + get_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore def _create_or_update_worker_pool_initial( @@ -4774,6 +5099,7 @@ def _create_or_update_worker_pool_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4783,6 +5109,7 @@ def _create_or_update_worker_pool_initial( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_worker_pool_initial.metadata['url'], @@ -4790,7 +5117,11 @@ def _create_or_update_worker_pool_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4808,7 +5139,7 @@ def _create_or_update_worker_pool_initial( return deserialized - _create_or_update_worker_pool_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + _create_or_update_worker_pool_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4822,7 +5153,7 @@ def begin_create_or_update_worker_pool( ) -> LROPoller["_models.WorkerPoolResource"]: """Create or update a worker pool. - Description for 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 @@ -4845,8 +5176,9 @@ def begin_create_or_update_worker_pool( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.WorkerPoolResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkerPoolResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4859,6 +5191,7 @@ def begin_create_or_update_worker_pool( name=name, worker_pool_name=worker_pool_name, worker_pool_envelope=worker_pool_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4883,10 +5216,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + begin_create_or_update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace def update_worker_pool( @@ -4899,7 +5231,7 @@ def update_worker_pool( ) -> "_models.WorkerPoolResource": """Create or update a worker pool. - Description for 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 @@ -4920,6 +5252,7 @@ def update_worker_pool( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') @@ -4929,6 +5262,7 @@ def update_worker_pool( name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_worker_pool.metadata['url'], @@ -4936,7 +5270,11 @@ def update_worker_pool( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4955,7 +5293,7 @@ def update_worker_pool( return deserialized - update_worker_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}'} # type: ignore + update_worker_pool.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}"} # type: ignore @distributed_trace @@ -4969,8 +5307,7 @@ def list_worker_pool_instance_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a specific instance of a worker pool of an App Service Environment. - Description for Get metric definitions for a specific instance of a worker pool of an App - Service Environment. + 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 @@ -4987,6 +5324,8 @@ def list_worker_pool_instance_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5001,6 +5340,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_instance_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -5014,6 +5354,7 @@ def prepare_request(next_link=None): worker_pool_name=worker_pool_name, instance=instance, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5031,7 +5372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5045,7 +5390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_instance_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions'} # type: ignore + list_worker_pool_instance_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions"} # type: ignore @distributed_trace def list_web_worker_metric_definitions( @@ -5057,7 +5402,7 @@ def list_web_worker_metric_definitions( ) -> Iterable["_models.ResourceMetricDefinitionCollection"]: """Get metric definitions for a worker pool of an App Service Environment. - Description for Get metric definitions for a worker pool of an App Service Environment. + 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 @@ -5072,6 +5417,8 @@ def list_web_worker_metric_definitions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceMetricDefinitionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceMetricDefinitionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5085,6 +5432,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_metric_definitions.metadata['url'], ) request = _convert_request(request) @@ -5097,6 +5445,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5114,7 +5463,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5128,7 +5481,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_metric_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions'} # type: ignore + list_web_worker_metric_definitions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions"} # type: ignore @distributed_trace def list_worker_pool_skus( @@ -5140,7 +5493,7 @@ def list_worker_pool_skus( ) -> Iterable["_models.SkuInfoCollection"]: """Get available SKUs for scaling a worker pool. - Description for 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 @@ -5153,6 +5506,8 @@ def list_worker_pool_skus( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SkuInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5166,6 +5521,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_worker_pool_skus.metadata['url'], ) request = _convert_request(request) @@ -5178,6 +5534,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5195,7 +5552,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5209,7 +5570,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_worker_pool_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus'} # type: ignore + list_worker_pool_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus"} # type: ignore @distributed_trace def list_web_worker_usages( @@ -5221,7 +5582,7 @@ def list_web_worker_usages( ) -> Iterable["_models.UsageCollection"]: """Get usage metrics for a worker pool of an App Service Environment. - Description for Get usage metrics for a worker pool of an App Service Environment. + 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 @@ -5234,6 +5595,8 @@ def list_web_worker_usages( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.UsageCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.UsageCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5247,6 +5610,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_worker_usages.metadata['url'], ) request = _convert_request(request) @@ -5259,6 +5623,7 @@ def prepare_request(next_link=None): name=name, worker_pool_name=worker_pool_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5276,7 +5641,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5290,4 +5659,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_worker_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages'} # type: ignore + list_web_worker_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_plans_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_plans_operations.py index 8eb2be65076f..0b195d6f4cdd 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_plans_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_app_service_plans_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -35,31 +35,32 @@ def build_list_request( detailed: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if detailed is not None: - query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['detailed'] = _SERIALIZER.query("detailed", detailed, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -69,30 +70,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -182,31 +185,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,35 +224,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -261,31 +265,32 @@ def build_list_capabilities_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +303,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -310,21 +316,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -337,10 +343,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -349,21 +356,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -376,10 +383,11 @@ def build_list_hybrid_connection_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -388,21 +396,21 @@ def build_list_hybrid_connection_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -415,10 +423,11 @@ def build_list_web_apps_by_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -427,21 +436,21 @@ def build_list_web_apps_by_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -452,31 +461,32 @@ def build_get_hybrid_connection_plan_limit_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -487,31 +497,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -524,33 +535,34 @@ def build_restart_web_apps_request( soft_restart: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -565,37 +577,38 @@ def build_list_web_apps_request( top: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if skip_token is not None: - query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + _query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) if top is not None: - query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,31 +619,32 @@ def build_get_server_farm_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -643,33 +657,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -680,31 +695,32 @@ def build_list_vnets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -716,10 +732,11 @@ def build_get_vnet_from_server_farm_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -727,21 +744,21 @@ def build_get_vnet_from_server_farm_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -754,10 +771,11 @@ def build_get_vnet_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -766,21 +784,21 @@ def build_get_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -796,12 +814,12 @@ def build_update_vnet_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -810,23 +828,23 @@ def build_update_vnet_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -840,10 +858,11 @@ def build_list_routes_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -851,21 +870,21 @@ def build_list_routes_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -878,10 +897,11 @@ def build_get_route_for_vnet_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -890,21 +910,21 @@ def build_get_route_for_vnet_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -920,12 +940,12 @@ def build_create_or_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -934,23 +954,23 @@ def build_create_or_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -965,10 +985,11 @@ def build_delete_vnet_route_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -977,21 +998,21 @@ def build_delete_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1007,12 +1028,12 @@ def build_update_vnet_route_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1021,23 +1042,23 @@ def build_update_vnet_route_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1051,10 +1072,11 @@ def build_reboot_worker_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1062,25 +1084,25 @@ def build_reboot_worker_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class AppServicePlansOperations(object): +class AppServicePlansOperations(object): # pylint: disable=too-many-public-methods """AppServicePlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1110,7 +1132,7 @@ def list( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans for a subscription. - Description for Get all App Service plans for a subscription. + Get all App Service plans for a subscription. :param detailed: Specify :code:`true` to return all App Service plan properties. The default is :code:`false`, which returns a subset of the properties. @@ -1123,6 +1145,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1133,6 +1157,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=self.list.metadata['url'], ) @@ -1143,6 +1168,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, detailed=detailed, template_url=next_link, ) @@ -1161,7 +1187,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1175,7 +1205,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def list_by_resource_group( @@ -1185,7 +1215,7 @@ def list_by_resource_group( ) -> Iterable["_models.AppServicePlanCollection"]: """Get all App Service plans in a resource group. - Description for 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 @@ -1196,6 +1226,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.AppServicePlanCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlanCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1207,6 +1239,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -1217,6 +1250,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1234,7 +1268,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1248,7 +1286,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms"} # type: ignore @distributed_trace def get( @@ -1259,7 +1297,7 @@ def get( ) -> "_models.AppServicePlan": """Get an App Service plan. - Description for 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 @@ -1276,17 +1314,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1301,7 +1346,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore def _create_or_update_initial( @@ -1317,6 +1362,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlan') @@ -1325,6 +1371,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1332,7 +1379,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1350,7 +1401,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1363,7 +1414,7 @@ def begin_create_or_update( ) -> LROPoller["_models.AppServicePlan"]: """Creates or updates an App Service Plan. - Description for 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 @@ -1384,8 +1435,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.AppServicePlan] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AppServicePlan"] lro_delay = kwargs.pop( 'polling_interval', @@ -1397,6 +1449,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, app_service_plan=app_service_plan, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1421,13 +1474,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1435,7 +1487,7 @@ def delete( ) -> None: """Delete an App Service plan. - Description for 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 @@ -1452,17 +1504,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1473,7 +1532,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1486,7 +1545,7 @@ def update( ) -> "_models.AppServicePlan": """Creates or updates an App Service Plan. - Description for 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 @@ -1505,6 +1564,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_service_plan, 'AppServicePlanPatchResource') @@ -1513,6 +1573,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1520,7 +1581,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1539,7 +1604,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}"} # type: ignore @distributed_trace @@ -1551,7 +1616,7 @@ def list_capabilities( ) -> List["_models.Capability"]: """List all capabilities of an App Service plan. - Description for 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 @@ -1568,17 +1633,24 @@ def list_capabilities( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_capabilities_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_capabilities.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1593,7 +1665,7 @@ def list_capabilities( return deserialized - list_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities'} # type: ignore + list_capabilities.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities"} # type: ignore @distributed_trace @@ -1607,7 +1679,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieve a Hybrid Connection in use in an App Service plan. - Description for Retrieve a Hybrid Connection in use in an App Service plan. + 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 @@ -1628,6 +1700,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1635,12 +1709,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1655,11 +1734,11 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -1669,7 +1748,7 @@ def delete_hybrid_connection( ) -> None: """Delete a Hybrid Connection in use in an App Service plan. - Description for Delete a Hybrid Connection in use in an App Service plan. + 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 @@ -1690,6 +1769,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -1697,12 +1778,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1713,7 +1799,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -1727,7 +1813,7 @@ def list_hybrid_connection_keys( ) -> "_models.HybridConnectionKey": """Get the send key name and value of a Hybrid Connection. - Description for Get the send key name and value of a Hybrid Connection. + 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 @@ -1748,6 +1834,8 @@ def list_hybrid_connection_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_hybrid_connection_keys_request( resource_group_name=resource_group_name, @@ -1755,12 +1843,17 @@ def list_hybrid_connection_keys( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connection_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1775,7 +1868,7 @@ def list_hybrid_connection_keys( return deserialized - list_hybrid_connection_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys'} # type: ignore + list_hybrid_connection_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys"} # type: ignore @distributed_trace @@ -1789,7 +1882,7 @@ def list_web_apps_by_hybrid_connection( ) -> Iterable["_models.ResourceCollection"]: """Get all apps that use a Hybrid Connection in an App Service Plan. - Description for Get all apps that use a Hybrid Connection in an App Service Plan. + 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 @@ -1804,6 +1897,8 @@ def list_web_apps_by_hybrid_connection( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1818,6 +1913,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_apps_by_hybrid_connection.metadata['url'], ) request = _convert_request(request) @@ -1831,6 +1927,7 @@ def prepare_request(next_link=None): namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1848,7 +1945,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1862,7 +1963,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps_by_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites'} # type: ignore + list_web_apps_by_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites"} # type: ignore @distributed_trace def get_hybrid_connection_plan_limit( @@ -1873,7 +1974,7 @@ def get_hybrid_connection_plan_limit( ) -> "_models.HybridConnectionLimits": """Get the maximum number of Hybrid Connections allowed in an App Service plan. - Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + 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 @@ -1890,17 +1991,24 @@ def get_hybrid_connection_plan_limit( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hybrid_connection_plan_limit_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_plan_limit.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1915,7 +2023,7 @@ def get_hybrid_connection_plan_limit( return deserialized - get_hybrid_connection_plan_limit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit'} # type: ignore + get_hybrid_connection_plan_limit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit"} # type: ignore @distributed_trace @@ -1927,7 +2035,7 @@ def list_hybrid_connections( ) -> Iterable["_models.HybridConnectionCollection"]: """Retrieve all Hybrid Connections in use in an App Service plan. - Description for Retrieve all Hybrid Connections in use in an App Service plan. + 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 @@ -1940,6 +2048,8 @@ def list_hybrid_connections( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.HybridConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HybridConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1952,6 +2062,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) @@ -1963,6 +2074,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1980,7 +2092,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1994,10 +2110,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace - def restart_web_apps( + def restart_web_apps( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2006,7 +2122,7 @@ def restart_web_apps( ) -> None: """Restart all apps in an App Service plan. - Description for 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 @@ -2027,18 +2143,25 @@ def restart_web_apps( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_restart_web_apps_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, template_url=self.restart_web_apps.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2049,7 +2172,7 @@ def restart_web_apps( if cls: return cls(pipeline_response, None, {}) - restart_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites'} # type: ignore + restart_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites"} # type: ignore @distributed_trace @@ -2064,7 +2187,7 @@ def list_web_apps( ) -> Iterable["_models.WebAppCollection"]: """Get all apps associated with an App Service plan. - Description for 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 @@ -2072,18 +2195,21 @@ def list_web_apps( :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. + Otherwise, the resulting list contains web apps from the start of the list. Default value is + None. :type skip_token: str :param filter: Supported filter: $filter=state eq running. Returns only web apps that are - currently running. + currently running. Default value is None. :type filter: str - :param top: List page size. If specified, results are paged. + :param top: List page size. If specified, results are paged. Default value is None. :type top: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2096,6 +2222,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2110,6 +2237,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, skip_token=skip_token, filter=filter, top=top, @@ -2130,7 +2258,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2144,7 +2276,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_apps.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites'} # type: ignore + list_web_apps.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites"} # type: ignore @distributed_trace def get_server_farm_skus( @@ -2155,7 +2287,7 @@ def get_server_farm_skus( ) -> Any: """Gets all selectable SKUs for a given App Service Plan. - Description for 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 @@ -2172,17 +2304,24 @@ def get_server_farm_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_server_farm_skus_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_server_farm_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2197,7 +2336,7 @@ def get_server_farm_skus( return deserialized - get_server_farm_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus'} # type: ignore + get_server_farm_skus.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus"} # type: ignore @distributed_trace @@ -2210,14 +2349,15 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets server farm usage information. - Description for 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'). + syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). Default value is + None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -2226,6 +2366,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2238,6 +2380,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -2250,6 +2393,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -2268,7 +2412,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2282,7 +2430,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/usages"} # type: ignore @distributed_trace def list_vnets( @@ -2293,7 +2441,7 @@ def list_vnets( ) -> List["_models.VnetInfoResource"]: """Get all Virtual Networks associated with an App Service plan. - Description for 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 @@ -2310,17 +2458,24 @@ def list_vnets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_vnets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2335,7 +2490,7 @@ def list_vnets( return deserialized - list_vnets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections'} # type: ignore + list_vnets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -2348,7 +2503,7 @@ def get_vnet_from_server_farm( ) -> "_models.VnetInfoResource": """Get a Virtual Network associated with an App Service plan. - Description for 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 @@ -2367,18 +2522,25 @@ def get_vnet_from_server_farm( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_from_server_farm_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_from_server_farm.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2393,7 +2555,7 @@ def get_vnet_from_server_farm( return deserialized - get_vnet_from_server_farm.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_from_server_farm.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -2407,7 +2569,7 @@ def get_vnet_gateway( ) -> "_models.VnetGateway": """Get a Virtual Network gateway. - Description for 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 @@ -2428,6 +2590,8 @@ def get_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_gateway_request( resource_group_name=resource_group_name, @@ -2435,12 +2599,17 @@ def get_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2455,7 +2624,7 @@ def get_vnet_gateway( return deserialized - get_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2470,7 +2639,7 @@ def update_vnet_gateway( ) -> "_models.VnetGateway": """Update a Virtual Network gateway. - Description for 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 @@ -2493,6 +2662,7 @@ def update_vnet_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -2503,6 +2673,7 @@ def update_vnet_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_gateway.metadata['url'], @@ -2510,7 +2681,11 @@ def update_vnet_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2525,7 +2700,7 @@ def update_vnet_gateway( return deserialized - update_vnet_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -2538,8 +2713,7 @@ def list_routes_for_vnet( ) -> List["_models.VnetRoute"]: """Get all routes that are associated with a Virtual Network in an App Service plan. - Description for Get all routes that are associated with a Virtual Network in an App Service - plan. + 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 @@ -2558,18 +2732,25 @@ def list_routes_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_routes_for_vnet_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_routes_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2584,7 +2765,7 @@ def list_routes_for_vnet( return deserialized - list_routes_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes'} # type: ignore + list_routes_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes"} # type: ignore @distributed_trace @@ -2598,7 +2779,7 @@ def get_route_for_vnet( ) -> List["_models.VnetRoute"]: """Get a Virtual Network route in an App Service plan. - Description for Get a Virtual Network route in an App Service plan. + 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 @@ -2619,6 +2800,8 @@ def get_route_for_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_route_for_vnet_request( resource_group_name=resource_group_name, @@ -2626,12 +2809,17 @@ def get_route_for_vnet( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_route_for_vnet.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2646,7 +2834,7 @@ def get_route_for_vnet( return deserialized - get_route_for_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + get_route_for_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2661,7 +2849,7 @@ def create_or_update_vnet_route( ) -> "_models.VnetRoute": """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2684,6 +2872,7 @@ def create_or_update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2694,6 +2883,7 @@ def create_or_update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_route.metadata['url'], @@ -2701,7 +2891,11 @@ def create_or_update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2716,11 +2910,11 @@ def create_or_update_vnet_route( return deserialized - create_or_update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + create_or_update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def delete_vnet_route( + def delete_vnet_route( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2730,7 +2924,7 @@ def delete_vnet_route( ) -> None: """Delete a Virtual Network route in an App Service plan. - Description for 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 @@ -2751,6 +2945,8 @@ def delete_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_vnet_route_request( resource_group_name=resource_group_name, @@ -2758,12 +2954,17 @@ def delete_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_route.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2774,7 +2975,7 @@ def delete_vnet_route( if cls: return cls(pipeline_response, None, {}) - delete_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + delete_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace @@ -2789,7 +2990,7 @@ def update_vnet_route( ) -> "_models.VnetRoute": """Create or update a Virtual Network route in an App Service plan. - Description for Create or update a Virtual Network route in an App Service plan. + 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 @@ -2812,6 +3013,7 @@ def update_vnet_route( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(route, 'VnetRoute') @@ -2822,6 +3024,7 @@ def update_vnet_route( vnet_name=vnet_name, route_name=route_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_route.metadata['url'], @@ -2829,7 +3032,11 @@ def update_vnet_route( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2844,11 +3051,11 @@ def update_vnet_route( return deserialized - update_vnet_route.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}'} # type: ignore + update_vnet_route.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}"} # type: ignore @distributed_trace - def reboot_worker( + def reboot_worker( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2857,7 +3064,7 @@ def reboot_worker( ) -> None: """Reboot a worker machine in an App Service plan. - Description for 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 @@ -2876,18 +3083,25 @@ def reboot_worker( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reboot_worker_request( resource_group_name=resource_group_name, name=name, worker_name=worker_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reboot_worker.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -2898,5 +3112,5 @@ def reboot_worker( if cls: return cls(pipeline_response, None, {}) - reboot_worker.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot'} # type: ignore + reboot_worker.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificate_orders_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificate_orders_diagnostics_operations.py index 75880938bf2f..83782b70f9fa 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificate_orders_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificate_orders_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_app_service_certificate_order_detector_response_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_app_service_certificate_order_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "certificateOrderName": _SERIALIZER.url("certificate_order_name", certificate_order_name, 'str'), @@ -84,27 +86,27 @@ def build_get_app_service_certificate_order_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,7 +141,7 @@ def list_app_service_certificate_order_detector_response( ) -> Iterable["_models.DetectorResponseCollection"]: """Microsoft.CertificateRegistration to get the list of detectors for this RP. - Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + 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 @@ -152,6 +154,8 @@ def list_app_service_certificate_order_detector_response( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -164,6 +168,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_app_service_certificate_order_detector_response.metadata['url'], ) request = _convert_request(request) @@ -175,6 +180,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -192,7 +198,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -206,7 +216,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors'} # type: ignore + list_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors"} # type: ignore @distributed_trace def get_app_service_certificate_order_detector_response( @@ -221,8 +231,7 @@ def get_app_service_certificate_order_detector_response( ) -> "_models.DetectorResponse": """Microsoft.CertificateRegistration call to get a detector response from App Lens. - Description for Microsoft.CertificateRegistration call to get a detector response from App - Lens. + 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 @@ -230,11 +239,11 @@ def get_app_service_certificate_order_detector_response( :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. + :param start_time: The start time for detector response. Default value is None. :type start_time: ~datetime.datetime - :param end_time: The end time for the detector response. + :param end_time: The end time for the detector response. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: The time grain for the detector response. + :param time_grain: The time grain for the detector response. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -247,12 +256,15 @@ def get_app_service_certificate_order_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_app_service_certificate_order_detector_response_request( resource_group_name=resource_group_name, certificate_order_name=certificate_order_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -261,7 +273,11 @@ def get_app_service_certificate_order_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -276,5 +292,5 @@ def get_app_service_certificate_order_detector_response( return deserialized - get_app_service_certificate_order_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}'} # type: ignore + get_app_service_certificate_order_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificate_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificate_registration_provider_operations.py index 8f481fcfbd6b..3aee541cf312 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificate_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificate_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.CertificateRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.CertificateRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.CertificateRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.CertificateRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificates_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificates_operations.py index db516ce872bf..9e67e48b8bc3 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificates_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_certificates_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,30 +68,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -101,31 +103,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -139,35 +142,35 @@ def build_create_or_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -180,31 +183,32 @@ def build_delete_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -218,35 +222,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -282,10 +286,10 @@ def list( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates for a subscription. - Description for Get all certificates for a subscription. + Get all certificates for a subscription. :param filter: Return only information specified in the filter (using OData syntax). For - example: $filter=KeyVaultId eq 'KeyVaultId'. + example: $filter=KeyVaultId eq 'KeyVaultId'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CertificateCollection or the result of @@ -293,6 +297,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -303,6 +309,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list.metadata['url'], ) @@ -313,6 +320,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -331,7 +339,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -345,7 +357,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def list_by_resource_group( @@ -355,7 +367,7 @@ def list_by_resource_group( ) -> Iterable["_models.CertificateCollection"]: """Get all certificates in a resource group. - Description for 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 @@ -365,6 +377,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -376,6 +390,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -386,6 +401,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -403,7 +419,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -417,7 +437,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates"} # type: ignore @distributed_trace def get( @@ -428,7 +448,7 @@ def get( ) -> "_models.Certificate": """Get a certificate. - Description for 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 @@ -445,17 +465,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -470,7 +497,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -483,7 +510,7 @@ def create_or_update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -502,6 +529,7 @@ def create_or_update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'Certificate') @@ -510,6 +538,7 @@ def create_or_update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update.metadata['url'], @@ -517,7 +546,11 @@ def create_or_update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -532,11 +565,11 @@ def create_or_update( return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -544,7 +577,7 @@ def delete( ) -> None: """Delete a certificate. - Description for 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 @@ -561,17 +594,24 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -582,7 +622,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore @distributed_trace @@ -595,7 +635,7 @@ def update( ) -> "_models.Certificate": """Create or update a certificate. - Description for 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 @@ -614,6 +654,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(certificate_envelope, 'CertificatePatchResource') @@ -622,6 +663,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -629,7 +671,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -644,5 +690,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_container_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_container_apps_operations.py index 6809fcc48526..0e65b2a0dd85 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_container_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_container_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_by_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -178,31 +181,32 @@ def build_delete_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -212,30 +216,31 @@ def build_list_secrets_request( name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), "name": _SERIALIZER.url("name", name, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -276,6 +281,8 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -286,6 +293,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_subscription.metadata['url'], ) request = _convert_request(request) @@ -295,6 +303,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -312,7 +321,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -326,7 +339,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps'} # type: ignore + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps"} # type: ignore @distributed_trace def list_by_resource_group( @@ -346,6 +359,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ContainerAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -357,6 +372,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -367,6 +383,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -384,7 +401,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -398,7 +419,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps"} # type: ignore @distributed_trace def get( @@ -426,17 +447,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -451,7 +479,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore def _create_or_update_initial( @@ -467,6 +495,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(container_app_envelope, 'ContainerApp') @@ -475,6 +504,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -482,7 +512,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -500,7 +534,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore @distributed_trace @@ -513,7 +547,7 @@ def begin_create_or_update( ) -> LROPoller["_models.ContainerApp"]: """Create or update a Container App. - Description for Create or update a Container App. + Create or update a Container App. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -534,8 +568,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.ContainerApp] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerApp"] lro_delay = kwargs.pop( 'polling_interval', @@ -547,6 +582,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, container_app_envelope=container_app_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -571,12 +607,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -588,17 +623,24 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -608,11 +650,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -620,7 +662,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete a Container App. - Description for Delete a Container App. + Delete a Container App. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -638,7 +680,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -649,6 +692,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -669,10 +713,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}"} # type: ignore @distributed_trace def list_secrets( @@ -697,16 +740,23 @@ def list_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_secrets_request( subscription_id=self._config.subscription_id, name=name, + api_version=api_version, template_url=self.list_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -721,5 +771,5 @@ def list_secrets( return deserialized - list_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets'} # type: ignore + list_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_container_apps_revisions_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_container_apps_revisions_operations.py index 0560ea24c82c..c92591a44d68 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_container_apps_revisions_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_container_apps_revisions_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -32,31 +32,32 @@ def build_list_revisions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,10 +69,11 @@ def build_get_revision_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), @@ -79,21 +81,21 @@ def build_get_revision_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -105,10 +107,11 @@ def build_activate_revision_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), @@ -116,21 +119,21 @@ def build_activate_revision_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -142,10 +145,11 @@ def build_deactivate_revision_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), @@ -153,21 +157,21 @@ def build_deactivate_revision_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,10 +183,11 @@ def build_restart_revision_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "containerAppName": _SERIALIZER.url("container_app_name", container_app_name, 'str'), @@ -190,21 +195,21 @@ def build_restart_revision_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -250,6 +255,8 @@ def list_revisions( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.RevisionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RevisionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -262,6 +269,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, container_app_name=container_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_revisions.metadata['url'], ) request = _convert_request(request) @@ -273,6 +281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, container_app_name=container_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -290,7 +299,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -304,7 +317,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_revisions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions'} # type: ignore + list_revisions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions"} # type: ignore @distributed_trace def get_revision( @@ -335,18 +348,25 @@ def get_revision( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_revision_request( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_revision.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -361,11 +381,11 @@ def get_revision( return deserialized - get_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}'} # type: ignore + get_revision.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}"} # type: ignore @distributed_trace - def activate_revision( + def activate_revision( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, container_app_name: str, @@ -393,18 +413,25 @@ def activate_revision( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_activate_revision_request( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.activate_revision.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -415,11 +442,11 @@ def activate_revision( if cls: return cls(pipeline_response, None, {}) - activate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate'} # type: ignore + activate_revision.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/activate"} # type: ignore @distributed_trace - def deactivate_revision( + def deactivate_revision( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, container_app_name: str, @@ -447,18 +474,25 @@ def deactivate_revision( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_deactivate_revision_request( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.deactivate_revision.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -469,11 +503,11 @@ def deactivate_revision( if cls: return cls(pipeline_response, None, {}) - deactivate_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate'} # type: ignore + deactivate_revision.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/deactivate"} # type: ignore @distributed_trace - def restart_revision( + def restart_revision( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, container_app_name: str, @@ -501,18 +535,25 @@ def restart_revision( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_restart_revision_request( resource_group_name=resource_group_name, container_app_name=container_app_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.restart_revision.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -523,5 +564,5 @@ def restart_revision( if cls: return cls(pipeline_response, None, {}) - restart_revision.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart'} # type: ignore + restart_revision.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{containerAppName}/revisions/{name}/restart"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_deleted_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_deleted_web_apps_operations.py index b955ea34965d..08962c3f312d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_deleted_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_deleted_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_get_deleted_web_app_by_location_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -153,7 +156,7 @@ def list( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + Get all deleted apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DeletedWebAppCollection or the result of @@ -162,6 +165,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -172,6 +177,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -181,6 +187,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -198,7 +205,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -212,7 +223,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites"} # type: ignore @distributed_trace def list_by_location( @@ -222,7 +233,7 @@ def list_by_location( ) -> Iterable["_models.DeletedWebAppCollection"]: """Get all deleted apps for a subscription at location. - Description for Get all deleted apps for a subscription at location. + Get all deleted apps for a subscription at location. :param location: :type location: str @@ -233,6 +244,8 @@ def list_by_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DeletedWebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedWebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -244,6 +257,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_location.metadata['url'], ) request = _convert_request(request) @@ -254,6 +268,7 @@ def prepare_request(next_link=None): request = build_list_by_location_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -271,7 +286,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -285,7 +304,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites'} # type: ignore + list_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites"} # type: ignore @distributed_trace def get_deleted_web_app_by_location( @@ -296,7 +315,7 @@ def get_deleted_web_app_by_location( ) -> "_models.DeletedSite": """Get deleted app for a subscription at location. - Description for Get deleted app for a subscription at location. + Get deleted app for a subscription at location. :param location: :type location: str @@ -313,17 +332,24 @@ def get_deleted_web_app_by_location( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deleted_web_app_by_location_request( location=location, deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_by_location.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,5 +364,5 @@ def get_deleted_web_app_by_location( return deserialized - get_deleted_web_app_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_diagnostics_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_diagnostics_operations.py index 2a463048ff8d..01b703c46f59 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_diagnostics_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_diagnostics_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +7,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,7 +18,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,31 +33,32 @@ def build_list_hosting_environment_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -73,10 +74,11 @@ def build_get_hosting_environment_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -84,27 +86,27 @@ def build_get_hosting_environment_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,31 +117,32 @@ def build_list_site_detector_responses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,10 +158,11 @@ def build_get_site_detector_response_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -166,27 +170,27 @@ def build_get_site_detector_response_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -197,31 +201,32 @@ def build_list_site_diagnostic_categories_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -233,10 +238,11 @@ def build_get_site_diagnostic_category_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -244,21 +250,21 @@ def build_get_site_diagnostic_category_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -270,10 +276,11 @@ def build_list_site_analyses_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -281,21 +288,21 @@ def build_list_site_analyses_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -308,10 +315,11 @@ def build_get_site_analysis_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -320,21 +328,21 @@ def build_get_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -351,10 +359,11 @@ def build_execute_site_analysis_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -363,27 +372,27 @@ def build_execute_site_analysis_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -395,10 +404,11 @@ def build_list_site_detectors_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -406,21 +416,21 @@ def build_list_site_detectors_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -433,10 +443,11 @@ def build_get_site_detector_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -445,21 +456,21 @@ def build_get_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -476,10 +487,11 @@ def build_execute_site_detector_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -488,27 +500,27 @@ def build_execute_site_detector_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -520,10 +532,11 @@ def build_list_site_detector_responses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -531,21 +544,21 @@ def build_list_site_detector_responses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -562,10 +575,11 @@ def build_get_site_detector_response_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -574,27 +588,27 @@ def build_get_site_detector_response_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -606,10 +620,11 @@ def build_list_site_diagnostic_categories_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -617,21 +632,21 @@ def build_list_site_diagnostic_categories_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -644,10 +659,11 @@ def build_get_site_diagnostic_category_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -656,21 +672,21 @@ def build_get_site_diagnostic_category_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -683,10 +699,11 @@ def build_list_site_analyses_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -695,21 +712,21 @@ def build_list_site_analyses_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -723,10 +740,11 @@ def build_get_site_analysis_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -736,21 +754,21 @@ def build_get_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -768,10 +786,11 @@ def build_execute_site_analysis_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -781,27 +800,27 @@ def build_execute_site_analysis_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -814,10 +833,11 @@ def build_list_site_detectors_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -826,21 +846,21 @@ def build_list_site_detectors_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -854,10 +874,11 @@ def build_get_site_detector_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -867,21 +888,21 @@ def build_get_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -899,10 +920,11 @@ def build_execute_site_detector_slot_request( time_grain: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -912,31 +934,31 @@ def build_execute_site_detector_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if start_time is not None: - query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') + _query_parameters['startTime'] = _SERIALIZER.query("start_time", start_time, 'iso-8601') if end_time is not None: - query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') + _query_parameters['endTime'] = _SERIALIZER.query("end_time", end_time, 'iso-8601') if time_grain is not None: - query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['timeGrain'] = _SERIALIZER.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class DiagnosticsOperations(object): +class DiagnosticsOperations(object): # pylint: disable=too-many-public-methods """DiagnosticsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -967,7 +989,7 @@ def list_hosting_environment_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Hosting Environment Detector Responses. - Description for 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 @@ -980,6 +1002,8 @@ def list_hosting_environment_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -992,6 +1016,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hosting_environment_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1003,6 +1028,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1020,7 +1046,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1034,7 +1064,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_hosting_environment_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors'} # type: ignore + list_hosting_environment_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors"} # type: ignore @distributed_trace def get_hosting_environment_detector_response( @@ -1049,7 +1079,7 @@ def get_hosting_environment_detector_response( ) -> "_models.DetectorResponse": """Get Hosting Environment Detector Response. - Description for 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 @@ -1057,11 +1087,11 @@ def get_hosting_environment_detector_response( :type name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1074,12 +1104,15 @@ def get_hosting_environment_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hosting_environment_detector_response_request( resource_group_name=resource_group_name, name=name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1088,7 +1121,11 @@ def get_hosting_environment_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1103,7 +1140,7 @@ def get_hosting_environment_detector_response( return deserialized - get_hosting_environment_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}'} # type: ignore + get_hosting_environment_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1115,7 +1152,7 @@ def list_site_detector_responses( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1128,6 +1165,8 @@ def list_site_detector_responses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1140,6 +1179,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses.metadata['url'], ) request = _convert_request(request) @@ -1151,6 +1191,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1168,7 +1209,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1182,7 +1227,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors'} # type: ignore + list_site_detector_responses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors"} # type: ignore @distributed_trace def get_site_detector_response( @@ -1197,7 +1242,7 @@ def get_site_detector_response( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1205,11 +1250,11 @@ def get_site_detector_response( :type site_name: str :param detector_name: Detector Resource Name. :type detector_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1222,12 +1267,15 @@ def get_site_detector_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_detector_response_request( resource_group_name=resource_group_name, site_name=site_name, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1236,7 +1284,11 @@ def get_site_detector_response( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1251,7 +1303,7 @@ def get_site_detector_response( return deserialized - get_site_detector_response.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}'} # type: ignore + get_site_detector_response.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1263,7 +1315,7 @@ def list_site_diagnostic_categories( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -1276,6 +1328,8 @@ def list_site_diagnostic_categories( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1288,6 +1342,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories.metadata['url'], ) request = _convert_request(request) @@ -1299,6 +1354,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1316,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1330,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics'} # type: ignore + list_site_diagnostic_categories.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category( @@ -1342,7 +1402,7 @@ def get_site_diagnostic_category( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -1361,18 +1421,25 @@ def get_site_diagnostic_category( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_diagnostic_category_request( resource_group_name=resource_group_name, site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1387,7 +1454,7 @@ def get_site_diagnostic_category( return deserialized - get_site_diagnostic_category.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -1400,7 +1467,7 @@ def list_site_analyses( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -1415,6 +1482,8 @@ def list_site_analyses( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1428,6 +1497,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses.metadata['url'], ) request = _convert_request(request) @@ -1440,6 +1510,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1457,7 +1528,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,7 +1546,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis( @@ -1484,7 +1559,7 @@ def get_site_analysis( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -1505,6 +1580,8 @@ def get_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_analysis_request( resource_group_name=resource_group_name, @@ -1512,12 +1589,17 @@ def get_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1532,7 +1614,7 @@ def get_site_analysis( return deserialized - get_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -1549,7 +1631,7 @@ def execute_site_analysis( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1559,11 +1641,11 @@ def execute_site_analysis( :type diagnostic_category: str :param analysis_name: Analysis Resource Name. :type analysis_name: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -1576,6 +1658,8 @@ def execute_site_analysis( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_execute_site_analysis_request( resource_group_name=resource_group_name, @@ -1583,6 +1667,7 @@ def execute_site_analysis( diagnostic_category=diagnostic_category, analysis_name=analysis_name, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1591,7 +1676,11 @@ def execute_site_analysis( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1606,7 +1695,7 @@ def execute_site_analysis( return deserialized - execute_site_analysis.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -1619,7 +1708,7 @@ def list_site_detectors( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1634,6 +1723,8 @@ def list_site_detectors( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1647,6 +1738,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors.metadata['url'], ) request = _convert_request(request) @@ -1659,6 +1751,7 @@ def prepare_request(next_link=None): site_name=site_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1676,7 +1769,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1690,7 +1787,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector( @@ -1703,7 +1800,7 @@ def get_site_detector( ) -> "_models.DetectorDefinitionResource": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1724,6 +1821,8 @@ def get_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_detector_request( resource_group_name=resource_group_name, @@ -1731,12 +1830,17 @@ def get_site_detector( diagnostic_category=diagnostic_category, detector_name=detector_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1751,7 +1855,7 @@ def get_site_detector( return deserialized - get_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1768,7 +1872,7 @@ def execute_site_detector( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -1778,11 +1882,11 @@ def execute_site_detector( :type detector_name: str :param diagnostic_category: Category Name. :type diagnostic_category: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -1795,6 +1899,8 @@ def execute_site_detector( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_execute_site_detector_request( resource_group_name=resource_group_name, @@ -1802,6 +1908,7 @@ def execute_site_detector( detector_name=detector_name, diagnostic_category=diagnostic_category, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1810,7 +1917,11 @@ def execute_site_detector( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1825,7 +1936,7 @@ def execute_site_detector( return deserialized - execute_site_detector.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore @distributed_trace @@ -1838,7 +1949,7 @@ def list_site_detector_responses_slot( ) -> Iterable["_models.DetectorResponseCollection"]: """List Site Detector Responses. - Description for 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 @@ -1853,6 +1964,8 @@ def list_site_detector_responses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DetectorResponseCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DetectorResponseCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1866,6 +1979,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detector_responses_slot.metadata['url'], ) request = _convert_request(request) @@ -1878,6 +1992,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1895,7 +2010,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1909,7 +2028,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detector_responses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors'} # type: ignore + list_site_detector_responses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors"} # type: ignore @distributed_trace def get_site_detector_response_slot( @@ -1925,7 +2044,7 @@ def get_site_detector_response_slot( ) -> "_models.DetectorResponse": """Get site detector response. - Description for 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 @@ -1935,11 +2054,11 @@ def get_site_detector_response_slot( :type detector_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DetectorResponse, or the result of cls(response) @@ -1952,6 +2071,8 @@ def get_site_detector_response_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_detector_response_slot_request( resource_group_name=resource_group_name, @@ -1959,6 +2080,7 @@ def get_site_detector_response_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -1967,7 +2089,11 @@ def get_site_detector_response_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1982,7 +2108,7 @@ def get_site_detector_response_slot( return deserialized - get_site_detector_response_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}'} # type: ignore + get_site_detector_response_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -1995,7 +2121,7 @@ def list_site_diagnostic_categories_slot( ) -> Iterable["_models.DiagnosticCategoryCollection"]: """Get Diagnostics Categories. - Description for 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 @@ -2010,6 +2136,8 @@ def list_site_diagnostic_categories_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticCategoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticCategoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2023,6 +2151,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_diagnostic_categories_slot.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2164,7 @@ def prepare_request(next_link=None): site_name=site_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2182,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2200,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_diagnostic_categories_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics'} # type: ignore + list_site_diagnostic_categories_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics"} # type: ignore @distributed_trace def get_site_diagnostic_category_slot( @@ -2079,7 +2213,7 @@ def get_site_diagnostic_category_slot( ) -> "_models.DiagnosticCategory": """Get Diagnostics Category. - Description for 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 @@ -2100,6 +2234,8 @@ def get_site_diagnostic_category_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_diagnostic_category_slot_request( resource_group_name=resource_group_name, @@ -2107,12 +2243,17 @@ def get_site_diagnostic_category_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_diagnostic_category_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2127,7 +2268,7 @@ def get_site_diagnostic_category_slot( return deserialized - get_site_diagnostic_category_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}'} # type: ignore + get_site_diagnostic_category_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}"} # type: ignore @distributed_trace @@ -2141,7 +2282,7 @@ def list_site_analyses_slot( ) -> Iterable["_models.DiagnosticAnalysisCollection"]: """Get Site Analyses. - Description for 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 @@ -2158,6 +2299,8 @@ def list_site_analyses_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticAnalysisCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticAnalysisCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2172,6 +2315,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_analyses_slot.metadata['url'], ) request = _convert_request(request) @@ -2185,6 +2329,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2202,7 +2347,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2216,7 +2365,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_analyses_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses'} # type: ignore + list_site_analyses_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses"} # type: ignore @distributed_trace def get_site_analysis_slot( @@ -2230,7 +2379,7 @@ def get_site_analysis_slot( ) -> "_models.AnalysisDefinition": """Get Site Analysis. - Description for 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 @@ -2253,6 +2402,8 @@ def get_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2261,12 +2412,17 @@ def get_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_analysis_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2281,7 +2437,7 @@ def get_site_analysis_slot( return deserialized - get_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}'} # type: ignore + get_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}"} # type: ignore @distributed_trace @@ -2299,7 +2455,7 @@ def execute_site_analysis_slot( ) -> "_models.DiagnosticAnalysis": """Execute Analysis. - Description for Execute Analysis. + Execute Analysis. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2311,11 +2467,11 @@ def execute_site_analysis_slot( :type analysis_name: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticAnalysis, or the result of cls(response) @@ -2328,6 +2484,8 @@ def execute_site_analysis_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_execute_site_analysis_slot_request( resource_group_name=resource_group_name, @@ -2336,6 +2494,7 @@ def execute_site_analysis_slot( analysis_name=analysis_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2344,7 +2503,11 @@ def execute_site_analysis_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2359,7 +2522,7 @@ def execute_site_analysis_slot( return deserialized - execute_site_analysis_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute'} # type: ignore + execute_site_analysis_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute"} # type: ignore @distributed_trace @@ -2373,7 +2536,7 @@ def list_site_detectors_slot( ) -> Iterable["_models.DiagnosticDetectorCollection"]: """Get Detectors. - Description for Get Detectors. + Get Detectors. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2390,6 +2553,8 @@ def list_site_detectors_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DiagnosticDetectorCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticDetectorCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2404,6 +2569,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_detectors_slot.metadata['url'], ) request = _convert_request(request) @@ -2417,6 +2583,7 @@ def prepare_request(next_link=None): diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2434,7 +2601,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2448,7 +2619,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_detectors_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors'} # type: ignore + list_site_detectors_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors"} # type: ignore @distributed_trace def get_site_detector_slot( @@ -2462,7 +2633,7 @@ def get_site_detector_slot( ) -> "_models.DetectorDefinitionResource": """Get Detector. - Description for Get Detector. + Get Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2485,6 +2656,8 @@ def get_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2493,12 +2666,17 @@ def get_site_detector_slot( detector_name=detector_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_detector_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2513,7 +2691,7 @@ def get_site_detector_slot( return deserialized - get_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}'} # type: ignore + get_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}"} # type: ignore @distributed_trace @@ -2531,7 +2709,7 @@ def execute_site_detector_slot( ) -> "_models.DiagnosticDetectorResponse": """Execute Detector. - Description for Execute Detector. + Execute Detector. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2543,11 +2721,11 @@ def execute_site_detector_slot( :type diagnostic_category: str :param slot: Slot Name. :type slot: str - :param start_time: Start Time. + :param start_time: Start Time. Default value is None. :type start_time: ~datetime.datetime - :param end_time: End Time. + :param end_time: End Time. Default value is None. :type end_time: ~datetime.datetime - :param time_grain: Time Grain. + :param time_grain: Time Grain. Default value is None. :type time_grain: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticDetectorResponse, or the result of cls(response) @@ -2560,6 +2738,8 @@ def execute_site_detector_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_execute_site_detector_slot_request( resource_group_name=resource_group_name, @@ -2568,6 +2748,7 @@ def execute_site_detector_slot( diagnostic_category=diagnostic_category, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, start_time=start_time, end_time=end_time, time_grain=time_grain, @@ -2576,7 +2757,11 @@ def execute_site_detector_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2591,5 +2776,5 @@ def execute_site_detector_slot( return deserialized - execute_site_detector_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute'} # type: ignore + execute_site_detector_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_domain_registration_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_domain_registration_provider_operations.py index 236848278bc7..f96655c5da76 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_domain_registration_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_domain_registration_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request @@ -29,24 +29,25 @@ def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.DomainRegistration/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.DomainRegistration/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -80,8 +81,8 @@ def list_operations( """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. + Implements Csm operations Api to exposes the list of available Csm Apis under the resource + provider. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -89,6 +90,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -98,6 +101,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -106,6 +110,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -123,7 +128,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -137,4 +146,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.DomainRegistration/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.DomainRegistration/operations"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_domains_operations.py index c173bb79ee13..8094208387de 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -36,33 +36,33 @@ def build_check_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -73,29 +73,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -104,29 +105,30 @@ def build_get_control_center_sso_request_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -138,33 +140,33 @@ def build_list_recommendations_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -176,30 +178,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -210,31 +213,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -248,35 +252,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -291,33 +295,34 @@ def build_delete_request( force_hard_delete_domain: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if force_hard_delete_domain is not None: - query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['forceHardDeleteDomain'] = _SERIALIZER.query("force_hard_delete_domain", force_hard_delete_domain, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,35 +336,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -372,31 +377,32 @@ def build_list_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -408,10 +414,11 @@ def build_get_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -419,21 +426,21 @@ def build_get_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -448,12 +455,12 @@ def build_create_or_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -461,23 +468,23 @@ def build_create_or_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -491,10 +498,11 @@ def build_delete_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -502,21 +510,21 @@ def build_delete_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -531,12 +539,12 @@ def build_update_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), @@ -544,23 +552,23 @@ def build_update_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -573,31 +581,32 @@ def build_renew_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -608,31 +617,32 @@ def build_transfer_out_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "domainName": _SERIALIZER.url("domain_name", domain_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -666,7 +676,7 @@ def check_availability( ) -> "_models.DomainAvailabilityCheckResult": """Check if a domain is available for registration. - Description for Check if a domain is available for registration. + Check if a domain is available for registration. :param identifier: Name of the domain. :type identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier @@ -681,12 +691,14 @@ def check_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(identifier, 'NameIdentifier') request = build_check_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_availability.metadata['url'], @@ -694,7 +706,11 @@ def check_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -709,7 +725,7 @@ def check_availability( return deserialized - check_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability'} # type: ignore + check_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability"} # type: ignore @distributed_trace @@ -719,13 +735,15 @@ def list( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a subscription. - Description for Get all domains in a subscription. + Get all domains in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either DomainCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -736,6 +754,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -745,6 +764,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -762,7 +782,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -776,7 +800,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get_control_center_sso_request( @@ -785,7 +809,7 @@ def get_control_center_sso_request( ) -> "_models.DomainControlCenterSsoRequest": """Generate a single sign-on request for the domain management portal. - Description for Generate a single sign-on request for the domain management portal. + Generate a single sign-on request for the domain management portal. :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainControlCenterSsoRequest, or the result of cls(response) @@ -798,15 +822,22 @@ def get_control_center_sso_request( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_control_center_sso_request_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_control_center_sso_request.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -821,7 +852,7 @@ def get_control_center_sso_request( return deserialized - get_control_center_sso_request.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest'} # type: ignore + get_control_center_sso_request.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest"} # type: ignore @distributed_trace @@ -832,7 +863,7 @@ def list_recommendations( ) -> Iterable["_models.NameIdentifierCollection"]: """Get domain name recommendations based on keywords. - Description for Get domain name recommendations based on keywords. + Get domain name recommendations based on keywords. :param parameters: Search parameters for domain name recommendations. :type parameters: ~azure.mgmt.web.v2021_03_01.models.DomainRecommendationSearchParameters @@ -843,6 +874,7 @@ def list_recommendations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.NameIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.NameIdentifierCollection"] @@ -856,6 +888,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_recommendations.metadata['url'], @@ -868,6 +901,7 @@ def prepare_request(next_link=None): request = build_list_recommendations_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -887,7 +921,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -901,7 +939,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommendations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations'} # type: ignore + list_recommendations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations"} # type: ignore @distributed_trace def list_by_resource_group( @@ -911,7 +949,7 @@ def list_by_resource_group( ) -> Iterable["_models.DomainCollection"]: """Get all domains in a resource group. - Description for 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 @@ -920,6 +958,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -931,6 +971,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -941,6 +982,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -958,7 +1000,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -972,7 +1018,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains"} # type: ignore @distributed_trace def get( @@ -983,7 +1029,7 @@ def get( ) -> "_models.Domain": """Get a domain. - Description for 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 @@ -1000,17 +1046,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1025,7 +1078,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore def _create_or_update_initial( @@ -1041,6 +1094,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'Domain') @@ -1049,6 +1103,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -1056,7 +1111,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1074,7 +1133,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1087,7 +1146,7 @@ def begin_create_or_update( ) -> LROPoller["_models.Domain"]: """Creates or updates a domain. - Description for 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 @@ -1107,8 +1166,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.Domain] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Domain"] lro_delay = kwargs.pop( 'polling_interval', @@ -1120,6 +1180,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, domain_name=domain_name, domain=domain, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -1144,13 +1205,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1159,7 +1219,7 @@ def delete( ) -> None: """Delete a domain. - Description for 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 @@ -1179,18 +1239,25 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, force_hard_delete_domain=force_hard_delete_domain, template_url=self.delete.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1201,7 +1268,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1214,7 +1281,7 @@ def update( ) -> "_models.Domain": """Creates or updates a domain. - Description for 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 @@ -1233,6 +1300,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain, 'DomainPatchResource') @@ -1241,6 +1309,7 @@ def update( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -1248,7 +1317,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -1267,7 +1340,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}"} # type: ignore @distributed_trace @@ -1279,7 +1352,7 @@ def list_ownership_identifiers( ) -> Iterable["_models.DomainOwnershipIdentifierCollection"]: """Lists domain ownership identifiers. - Description for 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 @@ -1292,6 +1365,8 @@ def list_ownership_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DomainOwnershipIdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DomainOwnershipIdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1304,6 +1379,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -1315,6 +1391,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1332,7 +1409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1346,7 +1427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers'} # type: ignore + list_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_ownership_identifier( @@ -1358,7 +1439,7 @@ def get_ownership_identifier( ) -> "_models.DomainOwnershipIdentifier": """Get ownership identifier for domain. - Description for 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 @@ -1377,18 +1458,25 @@ def get_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1403,7 +1491,7 @@ def get_ownership_identifier( return deserialized - get_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + get_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1418,8 +1506,8 @@ def create_or_update_ownership_identifier( """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. + 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 @@ -1440,6 +1528,7 @@ def create_or_update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1449,6 +1538,7 @@ def create_or_update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_ownership_identifier.metadata['url'], @@ -1456,7 +1546,11 @@ def create_or_update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1471,11 +1565,11 @@ def create_or_update_ownership_identifier( return deserialized - create_or_update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + create_or_update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def delete_ownership_identifier( + def delete_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1484,7 +1578,7 @@ def delete_ownership_identifier( ) -> None: """Delete ownership identifier for domain. - Description for 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 @@ -1503,18 +1597,25 @@ def delete_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_ownership_identifier_request( resource_group_name=resource_group_name, domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -1525,7 +1626,7 @@ def delete_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + delete_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace @@ -1540,8 +1641,8 @@ def update_ownership_identifier( """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. + 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 @@ -1562,6 +1663,7 @@ def update_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'DomainOwnershipIdentifier') @@ -1571,6 +1673,7 @@ def update_ownership_identifier( domain_name=domain_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ownership_identifier.metadata['url'], @@ -1578,7 +1681,11 @@ def update_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1593,11 +1700,11 @@ def update_ownership_identifier( return deserialized - update_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}'} # type: ignore + update_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}"} # type: ignore @distributed_trace - def renew( + def renew( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, domain_name: str, @@ -1605,7 +1712,7 @@ def renew( ) -> None: """Renew a domain. - Description for 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 @@ -1622,17 +1729,24 @@ def renew( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_renew_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.renew.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -1643,7 +1757,7 @@ def renew( if cls: return cls(pipeline_response, None, {}) - renew.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew'} # type: ignore + renew.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/renew"} # type: ignore @distributed_trace @@ -1672,17 +1786,24 @@ def transfer_out( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_transfer_out_request( resource_group_name=resource_group_name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.transfer_out.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1697,5 +1818,5 @@ def transfer_out( return deserialized - transfer_out.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut'} # type: ignore + transfer_out.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_global_operations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_global_operations_operations.py index 994e065065e1..5be649b2cf75 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_global_operations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_global_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, List, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse @@ -15,7 +16,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,30 +30,31 @@ def build_get_deleted_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}") path_format_arguments = { "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_deleted_web_app_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "deletedSiteId": _SERIALIZER.url("deleted_site_id", deleted_site_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -97,31 +99,32 @@ def build_get_subscription_operation_with_async_response_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -155,7 +158,7 @@ def get_deleted_web_app( ) -> "_models.DeletedSite": """Get deleted app for a subscription. - Description for Get deleted app for a subscription. + 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 @@ -170,16 +173,23 @@ def get_deleted_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deleted_web_app_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -194,7 +204,7 @@ def get_deleted_web_app( return deserialized - get_deleted_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}'} # type: ignore + get_deleted_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}"} # type: ignore @distributed_trace @@ -205,7 +215,7 @@ def get_deleted_web_app_snapshots( ) -> List["_models.Snapshot"]: """Get all deleted apps for a subscription. - Description for Get all deleted apps for a subscription. + 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 @@ -220,16 +230,23 @@ def get_deleted_web_app_snapshots( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deleted_web_app_snapshots_request( deleted_site_id=deleted_site_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deleted_web_app_snapshots.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -244,11 +261,11 @@ def get_deleted_web_app_snapshots( return deserialized - get_deleted_web_app_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots'} # type: ignore + get_deleted_web_app_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots"} # type: ignore @distributed_trace - def get_subscription_operation_with_async_response( + def get_subscription_operation_with_async_response( # pylint: disable=inconsistent-return-statements self, location: str, operation_id: str, @@ -256,7 +273,7 @@ def get_subscription_operation_with_async_response( ) -> None: """Gets an operation in a subscription and given region. - Description for Gets an operation in a subscription and given region. + Gets an operation in a subscription and given region. :param location: Location name. :type location: str @@ -273,17 +290,24 @@ def get_subscription_operation_with_async_response( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_subscription_operation_with_async_response_request( location=location, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_operation_with_async_response.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -294,5 +318,5 @@ def get_subscription_operation_with_async_response( if cls: return cls(pipeline_response, None, {}) - get_subscription_operation_with_async_response.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}'} # type: ignore + get_subscription_operation_with_async_response.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_kube_environments_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_kube_environments_operations.py index b725aa643363..ccb8f190c4b2 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_kube_environments_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_kube_environments_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_by_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -65,30 +66,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,31 +101,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -178,31 +181,32 @@ def build_delete_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -216,35 +220,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -279,7 +283,7 @@ def list_by_subscription( ) -> Iterable["_models.KubeEnvironmentCollection"]: """Get all Kubernetes Environments for a subscription. - Description for Get all Kubernetes Environments for a subscription. + Get all Kubernetes Environments for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either KubeEnvironmentCollection or the result of @@ -288,6 +292,8 @@ def list_by_subscription( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -298,6 +304,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_subscription.metadata['url'], ) request = _convert_request(request) @@ -307,6 +314,7 @@ def prepare_request(next_link=None): request = build_list_by_subscription_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -324,7 +332,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -338,7 +350,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def list_by_resource_group( @@ -348,7 +360,7 @@ def list_by_resource_group( ) -> Iterable["_models.KubeEnvironmentCollection"]: """Get all the Kubernetes Environments in a resource group. - Description for Get all the Kubernetes Environments in a resource group. + 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 @@ -359,6 +371,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.KubeEnvironmentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironmentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -370,6 +384,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -380,6 +395,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -397,7 +413,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -411,7 +431,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments"} # type: ignore @distributed_trace def get( @@ -422,7 +442,7 @@ def get( ) -> "_models.KubeEnvironment": """Get the properties of a Kubernetes Environment. - Description for Get the properties of a Kubernetes Environment. + 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 @@ -439,17 +459,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -464,7 +491,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore def _create_or_update_initial( @@ -480,6 +507,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironment') @@ -488,6 +516,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -495,7 +524,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -513,7 +546,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace @@ -526,7 +559,7 @@ def begin_create_or_update( ) -> LROPoller["_models.KubeEnvironment"]: """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -547,8 +580,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.KubeEnvironment] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.KubeEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -560,6 +594,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, kube_environment_envelope=kube_environment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -584,12 +619,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore - def _delete_initial( + def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -601,17 +635,24 @@ def _delete_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -621,11 +662,11 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace - def begin_delete( + def begin_delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -633,7 +674,7 @@ def begin_delete( ) -> LROPoller[None]: """Delete a Kubernetes Environment. - Description for Delete a Kubernetes Environment. + Delete a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -651,7 +692,8 @@ def begin_delete( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -662,6 +704,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -682,10 +725,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore @distributed_trace def update( @@ -697,7 +739,7 @@ def update( ) -> "_models.KubeEnvironment": """Creates or updates a Kubernetes Environment. - Description for Creates or updates a Kubernetes Environment. + Creates or updates a Kubernetes Environment. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -717,6 +759,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(kube_environment_envelope, 'KubeEnvironmentPatchResource') @@ -725,6 +768,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -732,7 +776,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -751,5 +799,5 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_provider_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_provider_operations.py index 545d6cab1535..c0b2834c7329 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_provider_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_provider_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,26 +31,27 @@ def build_get_available_stacks_request( os_type_selected: Optional[Union[str, "_models.Enum15"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/availableStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -60,26 +61,27 @@ def build_get_function_app_stacks_request( stack_os_type: Optional[Union[str, "_models.Enum16"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/functionAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/functionAppStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -90,31 +92,32 @@ def build_get_function_app_stacks_for_location_request( stack_os_type: Optional[Union[str, "_models.Enum17"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/locations/{location}/functionAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/locations/{location}/functionAppStacks") path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -125,31 +128,32 @@ def build_get_web_app_stacks_for_location_request( stack_os_type: Optional[Union[str, "_models.Enum18"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/locations/{location}/webAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/locations/{location}/webAppStacks") path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -157,24 +161,25 @@ def build_get_web_app_stacks_for_location_request( def build_list_operations_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/operations') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/operations") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -184,26 +189,27 @@ def build_get_web_app_stacks_request( stack_os_type: Optional[Union[str, "_models.Enum19"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/webAppStacks') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/webAppStacks") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if stack_os_type is not None: - query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['stackOsType'] = _SERIALIZER.query("stack_os_type", stack_os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -214,31 +220,32 @@ def build_get_available_stacks_on_prem_request( os_type_selected: Optional[Union[str, "_models.Enum20"]] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if os_type_selected is not None: - query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osTypeSelected'] = _SERIALIZER.query("os_type_selected", os_type_selected, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -272,9 +279,9 @@ def get_available_stacks( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_03_01.models.Enum15 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -283,6 +290,8 @@ def get_available_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -292,6 +301,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks.metadata['url'], ) @@ -301,6 +311,7 @@ def prepare_request(next_link=None): else: request = build_get_available_stacks_request( + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -319,7 +330,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -333,7 +348,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks.metadata = {'url': '/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks.metadata = {'url': "/providers/Microsoft.Web/availableStacks"} # type: ignore @distributed_trace def get_function_app_stacks( @@ -343,9 +358,9 @@ def get_function_app_stacks( ) -> Iterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions. - Description for Get available Function app frameworks and their versions. + Get available Function app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_03_01.models.Enum16 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -354,6 +369,8 @@ def get_function_app_stacks( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -363,6 +380,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks.metadata['url'], ) @@ -372,6 +390,7 @@ def prepare_request(next_link=None): else: request = build_get_function_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -390,7 +409,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -404,7 +427,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_function_app_stacks.metadata = {'url': '/providers/Microsoft.Web/functionAppStacks'} # type: ignore + get_function_app_stacks.metadata = {'url': "/providers/Microsoft.Web/functionAppStacks"} # type: ignore @distributed_trace def get_function_app_stacks_for_location( @@ -415,11 +438,11 @@ def get_function_app_stacks_for_location( ) -> Iterable["_models.FunctionAppStackCollection"]: """Get available Function app frameworks and their versions for location. - Description for Get available Function app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_03_01.models.Enum17 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FunctionAppStackCollection or the result of @@ -428,6 +451,8 @@ def get_function_app_stacks_for_location( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.FunctionAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -438,6 +463,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_function_app_stacks_for_location.metadata['url'], ) @@ -448,6 +474,7 @@ def prepare_request(next_link=None): request = build_get_function_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -466,7 +493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -480,7 +511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_function_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/functionAppStacks'} # type: ignore + get_function_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/functionAppStacks"} # type: ignore @distributed_trace def get_web_app_stacks_for_location( @@ -491,11 +522,11 @@ def get_web_app_stacks_for_location( ) -> Iterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions for location. - Description for Get available Web app frameworks and their versions for location. + 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. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_03_01.models.Enum18 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -503,6 +534,8 @@ def get_web_app_stacks_for_location( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -513,6 +546,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks_for_location.metadata['url'], ) @@ -523,6 +557,7 @@ def prepare_request(next_link=None): request = build_get_web_app_stacks_for_location_request( location=location, + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -541,7 +576,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -555,7 +594,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_web_app_stacks_for_location.metadata = {'url': '/providers/Microsoft.Web/locations/{location}/webAppStacks'} # type: ignore + get_web_app_stacks_for_location.metadata = {'url': "/providers/Microsoft.Web/locations/{location}/webAppStacks"} # type: ignore @distributed_trace def list_operations( @@ -565,8 +604,8 @@ def list_operations( """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. + Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + metric definitions. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmOperationCollection or the result of @@ -574,6 +613,8 @@ def list_operations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmOperationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmOperationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -583,6 +624,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_operations_request( + api_version=api_version, template_url=self.list_operations.metadata['url'], ) request = _convert_request(request) @@ -591,6 +633,7 @@ def prepare_request(next_link=None): else: request = build_list_operations_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -608,7 +651,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -622,7 +669,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_operations.metadata = {'url': '/providers/Microsoft.Web/operations'} # type: ignore + list_operations.metadata = {'url': "/providers/Microsoft.Web/operations"} # type: ignore @distributed_trace def get_web_app_stacks( @@ -632,9 +679,9 @@ def get_web_app_stacks( ) -> Iterable["_models.WebAppStackCollection"]: """Get available Web app frameworks and their versions. - Description for Get available Web app frameworks and their versions. + Get available Web app frameworks and their versions. - :param stack_os_type: Stack OS Type. + :param stack_os_type: Stack OS Type. Default value is None. :type stack_os_type: str or ~azure.mgmt.web.v2021_03_01.models.Enum19 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppStackCollection or the result of @@ -642,6 +689,8 @@ def get_web_app_stacks( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -651,6 +700,7 @@ def prepare_request(next_link=None): if not next_link: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=self.get_web_app_stacks.metadata['url'], ) @@ -660,6 +710,7 @@ def prepare_request(next_link=None): else: request = build_get_web_app_stacks_request( + api_version=api_version, stack_os_type=stack_os_type, template_url=next_link, ) @@ -678,7 +729,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -692,7 +747,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_web_app_stacks.metadata = {'url': '/providers/Microsoft.Web/webAppStacks'} # type: ignore + get_web_app_stacks.metadata = {'url': "/providers/Microsoft.Web/webAppStacks"} # type: ignore @distributed_trace def get_available_stacks_on_prem( @@ -702,9 +757,9 @@ def get_available_stacks_on_prem( ) -> Iterable["_models.ApplicationStackCollection"]: """Get available application frameworks and their versions. - Description for Get available application frameworks and their versions. + Get available application frameworks and their versions. - :param os_type_selected: + :param os_type_selected: Default value is None. :type os_type_selected: str or ~azure.mgmt.web.v2021_03_01.models.Enum20 :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationStackCollection or the result of @@ -713,6 +768,8 @@ def get_available_stacks_on_prem( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ApplicationStackCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationStackCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -723,6 +780,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=self.get_available_stacks_on_prem.metadata['url'], ) @@ -733,6 +791,7 @@ def prepare_request(next_link=None): request = build_get_available_stacks_on_prem_request( subscription_id=self._config.subscription_id, + api_version=api_version, os_type_selected=os_type_selected, template_url=next_link, ) @@ -751,7 +810,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -765,4 +828,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_available_stacks_on_prem.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks'} # type: ignore + get_available_stacks_on_prem.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_recommendations_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_recommendations_operations.py index aae566abb6d4..d2fddf2c3366 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_recommendations_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_recommendations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,33 +33,34 @@ def build_list_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -68,29 +69,30 @@ def build_reset_all_filters_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -100,30 +102,31 @@ def build_disable_recommendation_for_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -137,35 +140,36 @@ def build_list_history_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +183,36 @@ def build_list_recommended_rules_for_hosting_environment_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -220,32 +225,33 @@ def build_disable_all_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,32 +264,33 @@ def build_reset_all_filters_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -298,10 +305,11 @@ def build_get_rule_details_by_hosting_environment_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "hostingEnvironmentName": _SERIALIZER.url("hosting_environment_name", hosting_environment_name, 'str'), @@ -309,25 +317,25 @@ def build_get_rule_details_by_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -341,10 +349,11 @@ def build_disable_recommendation_for_hosting_environment_request( environment_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -352,22 +361,22 @@ def build_disable_recommendation_for_hosting_environment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['environmentName'] = _SERIALIZER.query("environment_name", environment_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -381,35 +390,36 @@ def build_list_history_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if expired_only is not None: - query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['expiredOnly'] = _SERIALIZER.query("expired_only", expired_only, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -423,35 +433,36 @@ def build_list_recommended_rules_for_web_app_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if featured is not None: - query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['featured'] = _SERIALIZER.query("featured", featured, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -462,31 +473,32 @@ def build_disable_all_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -497,31 +509,32 @@ def build_reset_all_filters_for_web_app_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,10 +549,11 @@ def build_get_rule_details_by_web_app_request( recommendation_id: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -547,25 +561,25 @@ def build_get_rule_details_by_web_app_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if update_seen is not None: - query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') + _query_parameters['updateSeen'] = _SERIALIZER.query("update_seen", update_seen, 'bool') if recommendation_id is not None: - query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['recommendationId'] = _SERIALIZER.query("recommendation_id", recommendation_id, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -577,10 +591,11 @@ def build_disable_recommendation_for_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "siteName": _SERIALIZER.url("site_name", site_name, 'str'), @@ -588,21 +603,21 @@ def build_disable_recommendation_for_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -637,14 +652,14 @@ def list( ) -> Iterable["_models.RecommendationCollection"]: """List all recommendations for a subscription. - Description for List all recommendations for a subscription. + List all recommendations for a subscription. :param featured: Specify :code:`true` to return only the most critical recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq - 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -653,6 +668,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -663,6 +680,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list.metadata['url'], @@ -674,6 +692,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -693,7 +712,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -707,16 +730,16 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations"} # type: ignore @distributed_trace - def reset_all_filters( + def reset_all_filters( # pylint: disable=inconsistent-return-statements self, **kwargs: Any ) -> None: """Reset all recommendation opt-out settings for a subscription. - Description for Reset all recommendation opt-out settings for a subscription. + Reset all recommendation opt-out settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -729,15 +752,22 @@ def reset_all_filters( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_all_filters_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -748,19 +778,18 @@ def reset_all_filters( if cls: return cls(pipeline_response, None, {}) - reset_all_filters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset'} # type: ignore + reset_all_filters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset"} # type: ignore @distributed_trace - def disable_recommendation_for_subscription( + def disable_recommendation_for_subscription( # pylint: disable=inconsistent-return-statements self, name: str, **kwargs: Any ) -> None: """Disables the specified rule so it will not apply to a subscription in the future. - Description for Disables the specified rule so it will not apply to a subscription in the - future. + Disables the specified rule so it will not apply to a subscription in the future. :param name: Rule name. :type name: str @@ -775,16 +804,23 @@ def disable_recommendation_for_subscription( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_recommendation_for_subscription_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_subscription.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -795,7 +831,7 @@ def disable_recommendation_for_subscription( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -809,7 +845,7 @@ def list_history_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -820,7 +856,7 @@ def list_history_for_hosting_environment( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -829,6 +865,8 @@ def list_history_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -841,6 +879,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_hosting_environment.metadata['url'], @@ -854,6 +893,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -873,7 +913,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -887,7 +931,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory'} # type: ignore + list_history_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_hosting_environment( @@ -900,7 +944,7 @@ def list_recommended_rules_for_hosting_environment( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for a hosting environment. - Description for Get all recommendations for a hosting environment. + 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 @@ -910,7 +954,7 @@ def list_recommended_rules_for_hosting_environment( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -919,6 +963,8 @@ def list_recommended_rules_for_hosting_environment( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -931,6 +977,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_hosting_environment.metadata['url'], @@ -944,6 +991,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -963,7 +1011,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -977,10 +1029,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations'} # type: ignore + list_recommended_rules_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_hosting_environment( + def disable_all_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -989,7 +1041,7 @@ def disable_all_for_hosting_environment( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1008,18 +1060,25 @@ def disable_all_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_all_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_all_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1030,11 +1089,11 @@ def disable_all_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_all_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable'} # type: ignore + disable_all_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_hosting_environment( + def reset_all_filters_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1043,7 +1102,7 @@ def reset_all_filters_for_hosting_environment( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1062,18 +1121,25 @@ def reset_all_filters_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_all_filters_for_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.reset_all_filters_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1084,7 +1150,7 @@ def reset_all_filters_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset'} # type: ignore + reset_all_filters_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1099,7 +1165,7 @@ def get_rule_details_by_hosting_environment( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1108,10 +1174,10 @@ def get_rule_details_by_hosting_environment( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1124,12 +1190,15 @@ def get_rule_details_by_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_rule_details_by_hosting_environment_request( resource_group_name=resource_group_name, hosting_environment_name=hosting_environment_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_hosting_environment.metadata['url'], @@ -1137,7 +1206,11 @@ def get_rule_details_by_hosting_environment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1152,11 +1225,11 @@ def get_rule_details_by_hosting_environment( return deserialized - get_rule_details_by_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}'} # type: ignore + get_rule_details_by_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_hosting_environment( + def disable_recommendation_for_hosting_environment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, environment_name: str, @@ -1166,7 +1239,7 @@ def disable_recommendation_for_hosting_environment( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1187,19 +1260,26 @@ def disable_recommendation_for_hosting_environment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_recommendation_for_hosting_environment_request( resource_group_name=resource_group_name, name=name, hosting_environment_name=hosting_environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, environment_name=environment_name, template_url=self.disable_recommendation_for_hosting_environment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1210,7 +1290,7 @@ def disable_recommendation_for_hosting_environment( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_hosting_environment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_hosting_environment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable"} # type: ignore @distributed_trace @@ -1224,7 +1304,7 @@ def list_history_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get past recommendations for an app, optionally specified by the time range. - Description for Get past recommendations for an app, optionally specified by the time range. + 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 @@ -1235,7 +1315,7 @@ def list_history_for_web_app( :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]. + 2014-12-31T23:59:59Z and timeGrain eq duration'[PT1H|PT1M|P1D]. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1244,6 +1324,8 @@ def list_history_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1256,6 +1338,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=self.list_history_for_web_app.metadata['url'], @@ -1269,6 +1352,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, expired_only=expired_only, filter=filter, template_url=next_link, @@ -1288,7 +1372,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1302,7 +1390,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_history_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory'} # type: ignore + list_history_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory"} # type: ignore @distributed_trace def list_recommended_rules_for_web_app( @@ -1315,7 +1403,7 @@ def list_recommended_rules_for_web_app( ) -> Iterable["_models.RecommendationCollection"]: """Get all recommendations for an app. - Description for 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 @@ -1325,7 +1413,7 @@ def list_recommended_rules_for_web_app( recommendations. The default is :code:`false`, which returns all recommendations. :type featured: bool :param filter: Return only channels specified in the filter. Filter is specified by using OData - syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. + syntax. Example: $filter=channel eq 'Api' or channel eq 'Notification'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RecommendationCollection or the result of @@ -1334,6 +1422,8 @@ def list_recommended_rules_for_web_app( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.RecommendationCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.RecommendationCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1346,6 +1436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=self.list_recommended_rules_for_web_app.metadata['url'], @@ -1359,6 +1450,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, featured=featured, filter=filter, template_url=next_link, @@ -1378,7 +1470,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1392,10 +1488,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_recommended_rules_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations'} # type: ignore + list_recommended_rules_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations"} # type: ignore @distributed_trace - def disable_all_for_web_app( + def disable_all_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1403,7 +1499,7 @@ def disable_all_for_web_app( ) -> None: """Disable all recommendations for an app. - Description for 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 @@ -1420,17 +1516,24 @@ def disable_all_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_all_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_all_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1441,11 +1544,11 @@ def disable_all_for_web_app( if cls: return cls(pipeline_response, None, {}) - disable_all_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable'} # type: ignore + disable_all_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable"} # type: ignore @distributed_trace - def reset_all_filters_for_web_app( + def reset_all_filters_for_web_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1453,7 +1556,7 @@ def reset_all_filters_for_web_app( ) -> None: """Reset all recommendation opt-out settings for an app. - Description for 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 @@ -1470,17 +1573,24 @@ def reset_all_filters_for_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_all_filters_for_web_app_request( resource_group_name=resource_group_name, site_name=site_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_all_filters_for_web_app.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1491,7 +1601,7 @@ def reset_all_filters_for_web_app( if cls: return cls(pipeline_response, None, {}) - reset_all_filters_for_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset'} # type: ignore + reset_all_filters_for_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset"} # type: ignore @distributed_trace @@ -1506,7 +1616,7 @@ def get_rule_details_by_web_app( ) -> "_models.RecommendationRule": """Get a recommendation rule for an app. - Description for 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 @@ -1515,10 +1625,10 @@ def get_rule_details_by_web_app( :param name: Name of the recommendation. :type name: str :param update_seen: Specify :code:`true` to update the last-seen timestamp of the - recommendation object. + recommendation object. Default value is None. :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. + You don't need to specify it to query an active entry. Default value is None. :type recommendation_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RecommendationRule, or the result of cls(response) @@ -1531,12 +1641,15 @@ def get_rule_details_by_web_app( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_rule_details_by_web_app_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, update_seen=update_seen, recommendation_id=recommendation_id, template_url=self.get_rule_details_by_web_app.metadata['url'], @@ -1544,7 +1657,11 @@ def get_rule_details_by_web_app( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1559,11 +1676,11 @@ def get_rule_details_by_web_app( return deserialized - get_rule_details_by_web_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}'} # type: ignore + get_rule_details_by_web_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}"} # type: ignore @distributed_trace - def disable_recommendation_for_site( + def disable_recommendation_for_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, site_name: str, @@ -1572,7 +1689,7 @@ def disable_recommendation_for_site( ) -> None: """Disables the specific rule for a web site permanently. - Description for 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 @@ -1591,18 +1708,25 @@ def disable_recommendation_for_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_disable_recommendation_for_site_request( resource_group_name=resource_group_name, site_name=site_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.disable_recommendation_for_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1613,5 +1737,5 @@ def disable_recommendation_for_site( if cls: return cls(pipeline_response, None, {}) - disable_recommendation_for_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable'} # type: ignore + disable_recommendation_for_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}/disable"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_resource_health_metadata_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_resource_health_metadata_operations.py index cd4dc45a1a1c..f31672ddaeee 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_resource_health_metadata_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_resource_health_metadata_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,29 +30,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -62,30 +63,31 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -96,31 +98,32 @@ def build_list_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -131,31 +134,32 @@ def build_get_by_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -167,10 +171,11 @@ def build_list_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -178,21 +183,21 @@ def build_list_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -204,10 +209,11 @@ def build_get_by_site_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -215,21 +221,21 @@ def build_get_by_site_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -262,7 +268,7 @@ def list( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the subscription. - Description for List all ResourceHealthMetadata for all sites in the subscription. + List all ResourceHealthMetadata for all sites in the subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ResourceHealthMetadataCollection or the result of @@ -271,6 +277,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -281,6 +289,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -290,6 +299,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -307,7 +317,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -321,7 +335,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_resource_group( @@ -331,8 +345,7 @@ def list_by_resource_group( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """List all ResourceHealthMetadata for all sites in the resource group in the subscription. - Description for List all ResourceHealthMetadata for all sites in the resource group in the - subscription. + 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 @@ -343,6 +356,8 @@ def list_by_resource_group( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -354,6 +369,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -364,6 +380,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -381,7 +398,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -395,7 +416,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata"} # type: ignore @distributed_trace def list_by_site( @@ -406,8 +427,7 @@ def list_by_site( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -420,6 +440,8 @@ def list_by_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -432,6 +454,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site.metadata['url'], ) request = _convert_request(request) @@ -443,6 +466,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -460,7 +484,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -474,7 +502,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} # type: ignore + list_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site( @@ -485,7 +513,7 @@ def get_by_site( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -502,17 +530,24 @@ def get_by_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_by_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -527,7 +562,7 @@ def get_by_site( return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} # type: ignore + get_by_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default"} # type: ignore @distributed_trace @@ -540,8 +575,7 @@ def list_by_site_slot( ) -> Iterable["_models.ResourceHealthMetadataCollection"]: """Gets the category of ResourceHealthMetadata to use for the given site as a collection. - Description for Gets the category of ResourceHealthMetadata to use for the given site as a - collection. + 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 @@ -556,6 +590,8 @@ def list_by_site_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ResourceHealthMetadataCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceHealthMetadataCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -569,6 +605,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_by_site_slot.metadata['url'], ) request = _convert_request(request) @@ -581,6 +618,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -598,7 +636,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -612,7 +654,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} # type: ignore + list_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata"} # type: ignore @distributed_trace def get_by_site_slot( @@ -624,7 +666,7 @@ def get_by_site_slot( ) -> "_models.ResourceHealthMetadata": """Gets the category of ResourceHealthMetadata to use for the given site. - Description for Gets the category of ResourceHealthMetadata to use for the given site. + 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 @@ -643,18 +685,25 @@ def get_by_site_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_by_site_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_by_site_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -669,5 +718,5 @@ def get_by_site_slot( return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} # type: ignore + get_by_site_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_static_sites_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_static_sites_operations.py index 805e0c14cc03..08ff7c05be6f 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_static_sites_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_static_sites_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -37,34 +37,34 @@ def build_preview_workflow_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile") # pylint: disable=line-too-long path_format_arguments = { "location": _SERIALIZER.url("location", location, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -75,29 +75,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -107,30 +108,31 @@ def build_get_static_sites_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,31 +143,32 @@ def build_get_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -179,35 +182,35 @@ def build_create_or_update_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -220,31 +223,32 @@ def build_delete_static_site_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -258,35 +262,35 @@ def build_update_static_site_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -300,10 +304,11 @@ def build_list_static_site_users_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -311,21 +316,21 @@ def build_list_static_site_users_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -338,10 +343,11 @@ def build_delete_static_site_user_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -350,21 +356,21 @@ def build_delete_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -380,12 +386,12 @@ def build_update_static_site_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -394,23 +400,23 @@ def build_update_static_site_user_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -423,31 +429,32 @@ def build_get_static_site_builds_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -459,10 +466,11 @@ def build_get_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -470,21 +478,21 @@ def build_get_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -496,10 +504,11 @@ def build_delete_static_site_build_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -507,21 +516,21 @@ def build_delete_static_site_build_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -536,12 +545,12 @@ def build_create_or_update_static_site_build_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -549,23 +558,23 @@ def build_create_or_update_static_site_build_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -582,12 +591,12 @@ def build_create_or_update_static_site_build_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -595,23 +604,23 @@ def build_create_or_update_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -625,10 +634,11 @@ def build_list_static_site_build_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -636,21 +646,21 @@ def build_list_static_site_build_functions_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -662,10 +672,11 @@ def build_list_static_site_build_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -673,21 +684,21 @@ def build_list_static_site_build_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -699,10 +710,11 @@ def build_list_static_site_build_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -710,21 +722,21 @@ def build_list_static_site_build_function_app_settings_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -736,10 +748,11 @@ def build_get_user_provided_function_apps_for_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -747,21 +760,21 @@ def build_get_user_provided_function_apps_for_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -774,10 +787,11 @@ def build_get_user_provided_function_app_for_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -786,21 +800,21 @@ def build_get_user_provided_function_app_for_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -817,12 +831,12 @@ def build_register_user_provided_function_app_with_static_site_build_request_ini is_forced: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -831,25 +845,25 @@ def build_register_user_provided_function_app_with_static_site_build_request_ini "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if is_forced is not None: - query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -864,10 +878,11 @@ def build_detach_user_provided_function_app_from_static_site_build_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -876,21 +891,21 @@ def build_detach_user_provided_function_app_from_static_site_build_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -905,12 +920,12 @@ def build_create_zip_deployment_for_static_site_build_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -918,23 +933,23 @@ def build_create_zip_deployment_for_static_site_build_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -950,35 +965,35 @@ def build_create_or_update_static_site_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -994,35 +1009,35 @@ def build_create_or_update_static_site_function_app_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1038,35 +1053,35 @@ def build_create_user_roles_invitation_link_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1079,31 +1094,32 @@ def build_list_static_site_custom_domains_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1115,10 +1131,11 @@ def build_get_static_site_custom_domain_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1126,21 +1143,21 @@ def build_get_static_site_custom_domain_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1155,12 +1172,12 @@ def build_create_or_update_static_site_custom_domain_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1168,23 +1185,23 @@ def build_create_or_update_static_site_custom_domain_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1198,10 +1215,11 @@ def build_delete_static_site_custom_domain_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1209,21 +1227,21 @@ def build_delete_static_site_custom_domain_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1238,12 +1256,12 @@ def build_validate_custom_domain_can_be_added_to_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1251,23 +1269,23 @@ def build_validate_custom_domain_can_be_added_to_static_site_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1280,31 +1298,32 @@ def build_detach_static_site_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1315,31 +1334,32 @@ def build_list_static_site_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1350,31 +1370,32 @@ def build_list_static_site_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1385,31 +1406,32 @@ def build_list_static_site_configured_roles_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1420,31 +1442,32 @@ def build_list_static_site_function_app_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1455,31 +1478,32 @@ def build_list_static_site_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1490,31 +1514,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1526,10 +1551,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1537,21 +1563,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1566,12 +1592,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1579,23 +1605,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1609,10 +1635,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1620,21 +1647,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1645,31 +1672,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1683,35 +1711,35 @@ def build_reset_static_site_api_key_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1724,31 +1752,32 @@ def build_get_user_provided_function_apps_for_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1760,10 +1789,11 @@ def build_get_user_provided_function_app_for_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1771,21 +1801,21 @@ def build_get_user_provided_function_app_for_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1801,12 +1831,12 @@ def build_register_user_provided_function_app_with_static_site_request_initial( is_forced: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1814,25 +1844,25 @@ def build_register_user_provided_function_app_with_static_site_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if is_forced is not None: - query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['isForced'] = _SERIALIZER.query("is_forced", is_forced, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1846,10 +1876,11 @@ def build_detach_user_provided_function_app_from_static_site_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1857,21 +1888,21 @@ def build_detach_user_provided_function_app_from_static_site_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1885,41 +1916,41 @@ def build_create_zip_deployment_for_static_site_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs ) -class StaticSitesOperations(object): +class StaticSitesOperations(object): # pylint: disable=too-many-public-methods """StaticSitesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -1950,7 +1981,7 @@ def preview_workflow( ) -> "_models.StaticSitesWorkflowPreview": """Generates a preview workflow file for the static site. - Description for Generates a preview workflow file for the static site. + Generates a preview workflow file for the static site. :param location: Location where you plan to create the static site. :type location: str @@ -1969,6 +2000,7 @@ def preview_workflow( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_sites_workflow_preview_request, 'StaticSitesWorkflowPreviewRequest') @@ -1976,6 +2008,7 @@ def preview_workflow( request = build_preview_workflow_request( location=location, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.preview_workflow.metadata['url'], @@ -1983,7 +2016,11 @@ def preview_workflow( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1998,7 +2035,7 @@ def preview_workflow( return deserialized - preview_workflow.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile'} # type: ignore + preview_workflow.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile"} # type: ignore @distributed_trace @@ -2008,7 +2045,7 @@ def list( ) -> Iterable["_models.StaticSiteCollection"]: """Get all Static Sites for a subscription. - Description for Get all Static Sites for a subscription. + Get all Static Sites for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either StaticSiteCollection or the result of @@ -2016,6 +2053,8 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2026,6 +2065,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -2035,6 +2075,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2052,7 +2093,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2066,7 +2111,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_sites_by_resource_group( @@ -2076,7 +2121,7 @@ def get_static_sites_by_resource_group( ) -> Iterable["_models.StaticSiteCollection"]: """Gets all static sites in the specified resource group. - Description for Gets all static sites in the specified resource group. + 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 @@ -2086,6 +2131,8 @@ def get_static_sites_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2097,6 +2144,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_sites_by_resource_group.metadata['url'], ) request = _convert_request(request) @@ -2107,6 +2155,7 @@ def prepare_request(next_link=None): request = build_get_static_sites_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2124,7 +2173,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2138,7 +2191,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_sites_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites'} # type: ignore + get_static_sites_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites"} # type: ignore @distributed_trace def get_static_site( @@ -2149,7 +2202,7 @@ def get_static_site( ) -> "_models.StaticSiteARMResource": """Gets the details of a static site. - Description for Gets the details of a static site. + 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 @@ -2166,17 +2219,24 @@ def get_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_static_site_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2191,7 +2251,7 @@ def get_static_site( return deserialized - get_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + get_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore def _create_or_update_static_site_initial( @@ -2207,6 +2267,7 @@ def _create_or_update_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSiteARMResource') @@ -2215,6 +2276,7 @@ def _create_or_update_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_initial.metadata['url'], @@ -2222,7 +2284,11 @@ def _create_or_update_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2240,7 +2306,7 @@ def _create_or_update_static_site_initial( return deserialized - _create_or_update_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _create_or_update_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -2253,8 +2319,7 @@ def begin_create_or_update_static_site( ) -> LROPoller["_models.StaticSiteARMResource"]: """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -2275,8 +2340,9 @@ def begin_create_or_update_static_site( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.StaticSiteARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -2288,6 +2354,7 @@ def begin_create_or_update_static_site( resource_group_name=resource_group_name, name=name, static_site_envelope=static_site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -2312,12 +2379,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_create_or_update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore - def _delete_static_site_initial( + def _delete_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2329,17 +2395,24 @@ def _delete_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2349,11 +2422,11 @@ def _delete_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + _delete_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace - def begin_delete_static_site( + def begin_delete_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2361,7 +2434,7 @@ def begin_delete_static_site( ) -> LROPoller[None]: """Deletes a static site. - Description for Deletes a static site. + Deletes a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2379,7 +2452,8 @@ def begin_delete_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2390,6 +2464,7 @@ def begin_delete_static_site( raw_result = self._delete_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2410,10 +2485,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + begin_delete_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace def update_static_site( @@ -2425,8 +2499,7 @@ def update_static_site( ) -> "_models.StaticSiteARMResource": """Creates a new static site in an existing resource group, or updates an existing static site. - Description for Creates a new static site in an existing resource group, or updates an existing - static site. + 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 @@ -2445,6 +2518,7 @@ def update_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_envelope, 'StaticSitePatchResource') @@ -2453,6 +2527,7 @@ def update_static_site( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site.metadata['url'], @@ -2460,7 +2535,11 @@ def update_static_site( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -2479,7 +2558,7 @@ def update_static_site( return deserialized - update_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}'} # type: ignore + update_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}"} # type: ignore @distributed_trace @@ -2492,7 +2571,7 @@ def list_static_site_users( ) -> Iterable["_models.StaticSiteUserCollection"]: """Gets the list of users of a static site. - Description for Gets the list of users of a static site. + 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 @@ -2507,6 +2586,8 @@ def list_static_site_users( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2520,6 +2601,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_users.metadata['url'], ) request = _convert_request(request) @@ -2532,6 +2614,7 @@ def prepare_request(next_link=None): name=name, authprovider=authprovider, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2549,7 +2632,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2563,10 +2650,10 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_users.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers'} # type: ignore + list_static_site_users.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/listUsers"} # type: ignore @distributed_trace - def delete_static_site_user( + def delete_static_site_user( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2576,7 +2663,7 @@ def delete_static_site_user( ) -> None: """Deletes the user entry from the static site. - Description for Deletes the user entry from the static site. + 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 @@ -2597,6 +2684,8 @@ def delete_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_static_site_user_request( resource_group_name=resource_group_name, @@ -2604,12 +2693,17 @@ def delete_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_static_site_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2620,7 +2714,7 @@ def delete_static_site_user( if cls: return cls(pipeline_response, None, {}) - delete_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + delete_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -2635,7 +2729,7 @@ def update_static_site_user( ) -> "_models.StaticSiteUserARMResource": """Updates a user entry with the listed roles. - Description for Updates a user entry with the listed roles. + 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 @@ -2659,6 +2753,7 @@ def update_static_site_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_envelope, 'StaticSiteUserARMResource') @@ -2669,6 +2764,7 @@ def update_static_site_user( authprovider=authprovider, userid=userid, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_static_site_user.metadata['url'], @@ -2676,7 +2772,11 @@ def update_static_site_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2691,7 +2791,7 @@ def update_static_site_user( return deserialized - update_static_site_user.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}'} # type: ignore + update_static_site_user.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}"} # type: ignore @distributed_trace @@ -2703,7 +2803,7 @@ def get_static_site_builds( ) -> Iterable["_models.StaticSiteBuildCollection"]: """Gets all static site builds for a particular static site. - Description for Gets all static site builds for a particular static site. + 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 @@ -2716,6 +2816,8 @@ def get_static_site_builds( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteBuildCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteBuildCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -2728,6 +2830,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_builds.metadata['url'], ) request = _convert_request(request) @@ -2739,6 +2842,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -2756,7 +2860,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2770,7 +2878,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_static_site_builds.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds'} # type: ignore + get_static_site_builds.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds"} # type: ignore @distributed_trace def get_static_site_build( @@ -2782,7 +2890,7 @@ def get_static_site_build( ) -> "_models.StaticSiteBuildARMResource": """Gets the details of a static site build. - Description for Gets the details of a static site build. + 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 @@ -2801,18 +2909,25 @@ def get_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_static_site_build_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2827,10 +2942,10 @@ def get_static_site_build( return deserialized - get_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + get_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore - def _delete_static_site_build_initial( + def _delete_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2843,18 +2958,25 @@ def _delete_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_static_site_build_request_initial( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_build_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -2864,11 +2986,11 @@ def _delete_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + _delete_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace - def begin_delete_static_site_build( + def begin_delete_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -2877,7 +2999,7 @@ def begin_delete_static_site_build( ) -> LROPoller[None]: """Deletes a static site build. - Description for Deletes a static site build. + Deletes a static site build. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -2897,7 +3019,8 @@ def begin_delete_static_site_build( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -2909,6 +3032,7 @@ def begin_delete_static_site_build( resource_group_name=resource_group_name, name=name, environment_name=environment_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -2929,10 +3053,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}'} # type: ignore + begin_delete_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}"} # type: ignore @distributed_trace def create_or_update_static_site_build_app_settings( @@ -2945,7 +3068,7 @@ def create_or_update_static_site_build_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site build. - Description for Creates or updates the app settings of a static site build. + 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 @@ -2966,6 +3089,7 @@ def create_or_update_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -2975,6 +3099,7 @@ def create_or_update_static_site_build_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_app_settings.metadata['url'], @@ -2982,7 +3107,11 @@ def create_or_update_static_site_build_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -2997,7 +3126,7 @@ def create_or_update_static_site_build_app_settings( return deserialized - create_or_update_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings'} # type: ignore + create_or_update_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/appsettings"} # type: ignore @distributed_trace @@ -3011,7 +3140,7 @@ def create_or_update_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site build. - Description for Creates or updates the function app settings of a static site build. + 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 @@ -3032,6 +3161,7 @@ def create_or_update_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3041,6 +3171,7 @@ def create_or_update_static_site_build_function_app_settings( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_build_function_app_settings.metadata['url'], @@ -3048,7 +3179,11 @@ def create_or_update_static_site_build_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3063,7 +3198,7 @@ def create_or_update_static_site_build_function_app_settings( return deserialized - create_or_update_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings'} # type: ignore + create_or_update_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings"} # type: ignore @distributed_trace @@ -3076,7 +3211,7 @@ def list_static_site_build_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a particular static site build. - Description for Gets the functions of a particular static site build. + 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 @@ -3091,6 +3226,8 @@ def list_static_site_build_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3104,6 +3241,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_functions.metadata['url'], ) request = _convert_request(request) @@ -3116,6 +3254,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3133,7 +3272,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3147,7 +3290,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_build_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions'} # type: ignore + list_static_site_build_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/functions"} # type: ignore @distributed_trace def list_static_site_build_app_settings( @@ -3159,7 +3302,7 @@ def list_static_site_build_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -3178,18 +3321,25 @@ def list_static_site_build_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_build_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3204,7 +3354,7 @@ def list_static_site_build_app_settings( return deserialized - list_static_site_build_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings'} # type: ignore + list_static_site_build_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listAppSettings"} # type: ignore @distributed_trace @@ -3217,7 +3367,7 @@ def list_static_site_build_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site build. - Description for Gets the application settings of a static site build. + 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 @@ -3236,18 +3386,25 @@ def list_static_site_build_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_build_function_app_settings_request( resource_group_name=resource_group_name, name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_build_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3262,7 +3419,7 @@ def list_static_site_build_function_app_settings( return deserialized - list_static_site_build_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings'} # type: ignore + list_static_site_build_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -3275,8 +3432,7 @@ def get_user_provided_function_apps_for_static_site_build( ) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site build. - Description for Gets the details of the user provided function apps registered with a static - site build. + 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 @@ -3291,6 +3447,8 @@ def get_user_provided_function_apps_for_static_site_build( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3304,6 +3462,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site_build.metadata['url'], ) request = _convert_request(request) @@ -3316,6 +3475,7 @@ def prepare_request(next_link=None): name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3333,7 +3493,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3347,7 +3511,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps"} # type: ignore @distributed_trace def get_user_provided_function_app_for_static_site_build( @@ -3360,8 +3524,7 @@ def get_user_provided_function_app_for_static_site_build( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site build. - Description for Gets the details of the user provided function app registered with a static - site build. + 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 @@ -3382,6 +3545,8 @@ def get_user_provided_function_app_for_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_user_provided_function_app_for_static_site_build_request( resource_group_name=resource_group_name, @@ -3389,12 +3554,17 @@ def get_user_provided_function_app_for_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3409,7 +3579,7 @@ def get_user_provided_function_app_for_static_site_build( return deserialized - get_user_provided_function_app_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore def _register_user_provided_function_app_with_static_site_build_initial( @@ -3428,6 +3598,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -3438,6 +3609,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -3446,7 +3618,11 @@ def _register_user_provided_function_app_with_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3464,7 +3640,7 @@ def _register_user_provided_function_app_with_static_site_build_initial( return deserialized - _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace @@ -3480,7 +3656,7 @@ def begin_register_user_provided_function_app_with_static_site_build( ) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site build. - Description for Register a user provided function app with a static site build. + 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 @@ -3512,8 +3688,9 @@ def begin_register_user_provided_function_app_with_static_site_build( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -3528,6 +3705,7 @@ def begin_register_user_provided_function_app_with_static_site_build( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3552,13 +3730,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace - def detach_user_provided_function_app_from_static_site_build( + def detach_user_provided_function_app_from_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3568,7 +3745,7 @@ def detach_user_provided_function_app_from_static_site_build( ) -> None: """Detach the user provided function app from the static site build. - Description for Detach the user provided function app from the static site build. + 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 @@ -3589,6 +3766,8 @@ def detach_user_provided_function_app_from_static_site_build( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_build_request( resource_group_name=resource_group_name, @@ -3596,12 +3775,17 @@ def detach_user_provided_function_app_from_static_site_build( environment_name=environment_name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site_build.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -3612,10 +3796,10 @@ def detach_user_provided_function_app_from_static_site_build( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - def _create_zip_deployment_for_static_site_build_initial( + def _create_zip_deployment_for_static_site_build_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3629,6 +3813,7 @@ def _create_zip_deployment_for_static_site_build_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -3638,6 +3823,7 @@ def _create_zip_deployment_for_static_site_build_initial( name=name, environment_name=environment_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_build_initial.metadata['url'], @@ -3645,7 +3831,11 @@ def _create_zip_deployment_for_static_site_build_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -3655,11 +3845,11 @@ def _create_zip_deployment_for_static_site_build_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_build_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_build_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace - def begin_create_zip_deployment_for_static_site_build( + def begin_create_zip_deployment_for_static_site_build( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -3669,7 +3859,7 @@ def begin_create_zip_deployment_for_static_site_build( ) -> LROPoller[None]: """Deploys zipped content to a specific environment of a static site. - Description for Deploys zipped content to a specific environment of a static site. + 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 @@ -3693,8 +3883,9 @@ def begin_create_zip_deployment_for_static_site_build( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -3707,6 +3898,7 @@ def begin_create_zip_deployment_for_static_site_build( name=name, environment_name=environment_name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -3728,10 +3920,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site_build.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site_build.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/zipdeploy"} # type: ignore @distributed_trace def create_or_update_static_site_app_settings( @@ -3743,7 +3934,7 @@ def create_or_update_static_site_app_settings( ) -> "_models.StringDictionary": """Creates or updates the app settings of a static site. - Description for Creates or updates the app settings of a static site. + 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 @@ -3762,6 +3953,7 @@ def create_or_update_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3770,6 +3962,7 @@ def create_or_update_static_site_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_app_settings.metadata['url'], @@ -3777,7 +3970,11 @@ def create_or_update_static_site_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3792,7 +3989,7 @@ def create_or_update_static_site_app_settings( return deserialized - create_or_update_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings'} # type: ignore + create_or_update_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -3805,7 +4002,7 @@ def create_or_update_static_site_function_app_settings( ) -> "_models.StringDictionary": """Creates or updates the function app settings of a static site. - Description for Creates or updates the function app settings of a static site. + 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 @@ -3824,6 +4021,7 @@ def create_or_update_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -3832,6 +4030,7 @@ def create_or_update_static_site_function_app_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_static_site_function_app_settings.metadata['url'], @@ -3839,7 +4038,11 @@ def create_or_update_static_site_function_app_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3854,7 +4057,7 @@ def create_or_update_static_site_function_app_settings( return deserialized - create_or_update_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings'} # type: ignore + create_or_update_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/config/functionappsettings"} # type: ignore @distributed_trace @@ -3867,7 +4070,7 @@ def create_user_roles_invitation_link( ) -> "_models.StaticSiteUserInvitationResponseResource": """Creates an invitation link for a user with the role. - Description for Creates an invitation link for a user with the role. + 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 @@ -3887,6 +4090,7 @@ def create_user_roles_invitation_link( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_roles_invitation_envelope, 'StaticSiteUserInvitationRequestResource') @@ -3895,6 +4099,7 @@ def create_user_roles_invitation_link( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_user_roles_invitation_link.metadata['url'], @@ -3902,7 +4107,11 @@ def create_user_roles_invitation_link( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3917,7 +4126,7 @@ def create_user_roles_invitation_link( return deserialized - create_user_roles_invitation_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation'} # type: ignore + create_user_roles_invitation_link.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/createUserInvitation"} # type: ignore @distributed_trace @@ -3929,7 +4138,7 @@ def list_static_site_custom_domains( ) -> Iterable["_models.StaticSiteCustomDomainOverviewCollection"]: """Gets all static site custom domains for a particular static site. - Description for Gets all static site custom domains for a particular static site. + 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 @@ -3942,6 +4151,8 @@ def list_static_site_custom_domains( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteCustomDomainOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -3954,6 +4165,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_custom_domains.metadata['url'], ) request = _convert_request(request) @@ -3965,6 +4177,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -3982,7 +4195,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -3996,7 +4213,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_custom_domains.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains'} # type: ignore + list_static_site_custom_domains.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains"} # type: ignore @distributed_trace def get_static_site_custom_domain( @@ -4008,7 +4225,7 @@ def get_static_site_custom_domain( ) -> "_models.StaticSiteCustomDomainOverviewARMResource": """Gets an existing custom domain for a particular static site. - Description for Gets an existing custom domain for a particular static site. + 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 @@ -4027,18 +4244,25 @@ def get_static_site_custom_domain( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_static_site_custom_domain_request( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_static_site_custom_domain.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4053,7 +4277,7 @@ def get_static_site_custom_domain( return deserialized - get_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + get_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore def _create_or_update_static_site_custom_domain_initial( @@ -4070,6 +4294,7 @@ def _create_or_update_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -4079,6 +4304,7 @@ def _create_or_update_static_site_custom_domain_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_static_site_custom_domain_initial.metadata['url'], @@ -4086,7 +4312,11 @@ def _create_or_update_static_site_custom_domain_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4104,7 +4334,7 @@ def _create_or_update_static_site_custom_domain_initial( return deserialized - _create_or_update_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _create_or_update_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace @@ -4118,8 +4348,7 @@ def begin_create_or_update_static_site_custom_domain( ) -> LROPoller["_models.StaticSiteCustomDomainOverviewARMResource"]: """Creates a new static site custom domain in an existing resource group and static site. - Description for Creates a new static site custom domain in an existing resource group and - static site. + 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 @@ -4145,8 +4374,9 @@ def begin_create_or_update_static_site_custom_domain( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.StaticSiteCustomDomainOverviewARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteCustomDomainOverviewARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -4159,6 +4389,7 @@ def begin_create_or_update_static_site_custom_domain( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4183,12 +4414,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_create_or_update_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - def _delete_static_site_custom_domain_initial( + def _delete_static_site_custom_domain_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4201,18 +4431,25 @@ def _delete_static_site_custom_domain_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_static_site_custom_domain_request_initial( resource_group_name=resource_group_name, name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_static_site_custom_domain_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4222,11 +4459,11 @@ def _delete_static_site_custom_domain_initial( if cls: return cls(pipeline_response, None, {}) - _delete_static_site_custom_domain_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + _delete_static_site_custom_domain_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore @distributed_trace - def begin_delete_static_site_custom_domain( + def begin_delete_static_site_custom_domain( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4235,7 +4472,7 @@ def begin_delete_static_site_custom_domain( ) -> LROPoller[None]: """Deletes a custom domain. - Description for Deletes a custom domain. + Deletes a custom domain. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4255,7 +4492,8 @@ def begin_delete_static_site_custom_domain( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4267,6 +4505,7 @@ def begin_delete_static_site_custom_domain( resource_group_name=resource_group_name, name=name, domain_name=domain_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4287,12 +4526,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_static_site_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}'} # type: ignore + begin_delete_static_site_custom_domain.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}"} # type: ignore - def _validate_custom_domain_can_be_added_to_static_site_initial( + def _validate_custom_domain_can_be_added_to_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4306,6 +4544,7 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_custom_domain_request_properties_envelope, 'StaticSiteCustomDomainRequestPropertiesARMResource') @@ -4315,6 +4554,7 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( name=name, domain_name=domain_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._validate_custom_domain_can_be_added_to_static_site_initial.metadata['url'], @@ -4322,7 +4562,11 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4332,11 +4576,11 @@ def _validate_custom_domain_can_be_added_to_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + _validate_custom_domain_can_be_added_to_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore @distributed_trace - def begin_validate_custom_domain_can_be_added_to_static_site( + def begin_validate_custom_domain_can_be_added_to_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4346,7 +4590,7 @@ def begin_validate_custom_domain_can_be_added_to_static_site( ) -> LROPoller[None]: """Validates a particular custom domain can be added to a static site. - Description for Validates a particular custom domain can be added to a static site. + 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 @@ -4370,8 +4614,9 @@ def begin_validate_custom_domain_can_be_added_to_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4384,6 +4629,7 @@ def begin_validate_custom_domain_can_be_added_to_static_site( name=name, domain_name=domain_name, static_site_custom_domain_request_properties_envelope=static_site_custom_domain_request_properties_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -4405,12 +4651,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate'} # type: ignore + begin_validate_custom_domain_can_be_added_to_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/customDomains/{domainName}/validate"} # type: ignore - def _detach_static_site_initial( + def _detach_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4422,17 +4667,24 @@ def _detach_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_detach_static_site_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._detach_static_site_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4442,11 +4694,11 @@ def _detach_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _detach_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + _detach_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace - def begin_detach_static_site( + def begin_detach_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -4454,7 +4706,7 @@ def begin_detach_static_site( ) -> LROPoller[None]: """Detaches a static site. - Description for Detaches a static site. + Detaches a static site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4472,7 +4724,8 @@ def begin_detach_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -4483,6 +4736,7 @@ def begin_detach_static_site( raw_result = self._detach_static_site_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -4503,10 +4757,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_detach_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach'} # type: ignore + begin_detach_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/detach"} # type: ignore @distributed_trace def list_static_site_functions( @@ -4517,7 +4770,7 @@ def list_static_site_functions( ) -> Iterable["_models.StaticSiteFunctionOverviewCollection"]: """Gets the functions of a static site. - Description for Gets the functions of a static site. + 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 @@ -4530,6 +4783,8 @@ def list_static_site_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteFunctionOverviewCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteFunctionOverviewCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4542,6 +4797,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_functions.metadata['url'], ) request = _convert_request(request) @@ -4553,6 +4809,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4570,7 +4827,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4584,7 +4845,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_static_site_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions'} # type: ignore + list_static_site_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/functions"} # type: ignore @distributed_trace def list_static_site_app_settings( @@ -4595,7 +4856,7 @@ def list_static_site_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -4612,17 +4873,24 @@ def list_static_site_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4637,7 +4905,7 @@ def list_static_site_app_settings( return deserialized - list_static_site_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings'} # type: ignore + list_static_site_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listAppSettings"} # type: ignore @distributed_trace @@ -4649,7 +4917,7 @@ def list_static_site_configured_roles( ) -> "_models.StringList": """Lists the roles configured for the static site. - Description for Lists the roles configured for the static site. + 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 @@ -4666,17 +4934,24 @@ def list_static_site_configured_roles( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_configured_roles_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_configured_roles.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4691,7 +4966,7 @@ def list_static_site_configured_roles( return deserialized - list_static_site_configured_roles.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles'} # type: ignore + list_static_site_configured_roles.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listConfiguredRoles"} # type: ignore @distributed_trace @@ -4703,7 +4978,7 @@ def list_static_site_function_app_settings( ) -> "_models.StringDictionary": """Gets the application settings of a static site. - Description for Gets the application settings of a static site. + 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 @@ -4720,17 +4995,24 @@ def list_static_site_function_app_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_function_app_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_function_app_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4745,7 +5027,7 @@ def list_static_site_function_app_settings( return deserialized - list_static_site_function_app_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings'} # type: ignore + list_static_site_function_app_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listFunctionAppSettings"} # type: ignore @distributed_trace @@ -4757,7 +5039,7 @@ def list_static_site_secrets( ) -> "_models.StringDictionary": """Lists the secrets for an existing static site. - Description for Lists the secrets for an existing static site. + 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 @@ -4774,17 +5056,24 @@ def list_static_site_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_static_site_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_static_site_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4799,7 +5088,7 @@ def list_static_site_secrets( return deserialized - list_static_site_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets'} # type: ignore + list_static_site_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/listSecrets"} # type: ignore @distributed_trace @@ -4811,7 +5100,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a static site. - Description for Gets the list of private endpoint connections associated with a static site. + 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 @@ -4824,6 +5113,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -4836,6 +5127,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -4847,6 +5139,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -4864,7 +5157,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4878,7 +5175,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -4890,7 +5187,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -4909,18 +5206,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -4935,7 +5239,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -4952,6 +5256,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -4961,6 +5266,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -4968,7 +5274,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -4986,7 +5296,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -5000,7 +5310,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -5025,8 +5335,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -5039,6 +5350,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5063,10 +5375,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -5081,18 +5392,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -5113,7 +5431,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -5126,7 +5444,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -5146,7 +5464,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -5158,6 +5477,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -5181,10 +5501,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -5195,7 +5514,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -5212,17 +5531,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5237,11 +5563,11 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateLinkResources"} # type: ignore @distributed_trace - def reset_static_site_api_key( + def reset_static_site_api_key( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5250,7 +5576,7 @@ def reset_static_site_api_key( ) -> None: """Resets the api key for an existing static site. - Description for Resets the api key for an existing static site. + 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 @@ -5270,6 +5596,7 @@ def reset_static_site_api_key( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(reset_properties_envelope, 'StaticSiteResetPropertiesARMResource') @@ -5278,6 +5605,7 @@ def reset_static_site_api_key( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.reset_static_site_api_key.metadata['url'], @@ -5285,7 +5613,11 @@ def reset_static_site_api_key( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5296,7 +5628,7 @@ def reset_static_site_api_key( if cls: return cls(pipeline_response, None, {}) - reset_static_site_api_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey'} # type: ignore + reset_static_site_api_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/resetapikey"} # type: ignore @distributed_trace @@ -5308,8 +5640,7 @@ def get_user_provided_function_apps_for_static_site( ) -> Iterable["_models.StaticSiteUserProvidedFunctionAppsCollection"]: """Gets the details of the user provided function apps registered with a static site. - Description for Gets the details of the user provided function apps registered with a static - site. + 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 @@ -5322,6 +5653,8 @@ def get_user_provided_function_apps_for_static_site( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserProvidedFunctionAppsCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppsCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -5334,6 +5667,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_apps_for_static_site.metadata['url'], ) request = _convert_request(request) @@ -5345,6 +5679,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -5362,7 +5697,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5376,7 +5715,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_user_provided_function_apps_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps'} # type: ignore + get_user_provided_function_apps_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps"} # type: ignore @distributed_trace def get_user_provided_function_app_for_static_site( @@ -5388,8 +5727,7 @@ def get_user_provided_function_app_for_static_site( ) -> "_models.StaticSiteUserProvidedFunctionAppARMResource": """Gets the details of the user provided function app registered with a static site. - Description for Gets the details of the user provided function app registered with a static - site. + 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 @@ -5408,18 +5746,25 @@ def get_user_provided_function_app_for_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_user_provided_function_app_for_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_user_provided_function_app_for_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -5434,7 +5779,7 @@ def get_user_provided_function_app_for_static_site( return deserialized - get_user_provided_function_app_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + get_user_provided_function_app_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore def _register_user_provided_function_app_with_static_site_initial( @@ -5452,6 +5797,7 @@ def _register_user_provided_function_app_with_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_user_provided_function_envelope, 'StaticSiteUserProvidedFunctionAppARMResource') @@ -5461,6 +5807,7 @@ def _register_user_provided_function_app_with_static_site_initial( name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, is_forced=is_forced, @@ -5469,7 +5816,11 @@ def _register_user_provided_function_app_with_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5487,7 +5838,7 @@ def _register_user_provided_function_app_with_static_site_initial( return deserialized - _register_user_provided_function_app_with_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + _register_user_provided_function_app_with_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace @@ -5502,7 +5853,7 @@ def begin_register_user_provided_function_app_with_static_site( ) -> LROPoller["_models.StaticSiteUserProvidedFunctionAppARMResource"]: """Register a user provided function app with a static site. - Description for Register a user provided function app with a static site. + 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 @@ -5532,8 +5883,9 @@ def begin_register_user_provided_function_app_with_static_site( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.StaticSiteUserProvidedFunctionAppARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StaticSiteUserProvidedFunctionAppARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -5547,6 +5899,7 @@ def begin_register_user_provided_function_app_with_static_site( function_app_name=function_app_name, static_site_user_provided_function_envelope=static_site_user_provided_function_envelope, is_forced=is_forced, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5571,13 +5924,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_register_user_provided_function_app_with_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + begin_register_user_provided_function_app_with_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore @distributed_trace - def detach_user_provided_function_app_from_static_site( + def detach_user_provided_function_app_from_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5586,7 +5938,7 @@ def detach_user_provided_function_app_from_static_site( ) -> None: """Detach the user provided function app from the static site. - Description for Detach the user provided function app from the static site. + 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 @@ -5605,18 +5957,25 @@ def detach_user_provided_function_app_from_static_site( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_detach_user_provided_function_app_from_static_site_request( resource_group_name=resource_group_name, name=name, function_app_name=function_app_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.detach_user_provided_function_app_from_static_site.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -5627,10 +5986,10 @@ def detach_user_provided_function_app_from_static_site( if cls: return cls(pipeline_response, None, {}) - detach_user_provided_function_app_from_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}'} # type: ignore + detach_user_provided_function_app_from_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}"} # type: ignore - def _create_zip_deployment_for_static_site_initial( + def _create_zip_deployment_for_static_site_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5643,6 +6002,7 @@ def _create_zip_deployment_for_static_site_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(static_site_zip_deployment_envelope, 'StaticSiteZipDeploymentARMResource') @@ -5651,6 +6011,7 @@ def _create_zip_deployment_for_static_site_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_zip_deployment_for_static_site_initial.metadata['url'], @@ -5658,7 +6019,11 @@ def _create_zip_deployment_for_static_site_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -5668,11 +6033,11 @@ def _create_zip_deployment_for_static_site_initial( if cls: return cls(pipeline_response, None, {}) - _create_zip_deployment_for_static_site_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + _create_zip_deployment_for_static_site_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore @distributed_trace - def begin_create_zip_deployment_for_static_site( + def begin_create_zip_deployment_for_static_site( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -5681,7 +6046,7 @@ def begin_create_zip_deployment_for_static_site( ) -> LROPoller[None]: """Deploys zipped content to a static site. - Description for Deploys zipped content to a static site. + 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 @@ -5703,8 +6068,9 @@ def begin_create_zip_deployment_for_static_site( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -5716,6 +6082,7 @@ def begin_create_zip_deployment_for_static_site( resource_group_name=resource_group_name, name=name, static_site_zip_deployment_envelope=static_site_zip_deployment_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -5737,7 +6104,6 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_zip_deployment_for_static_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy'} # type: ignore + begin_create_zip_deployment_for_static_site.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/zipdeploy"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_top_level_domains_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_top_level_domains_operations.py index bfb0a760c2e0..82e157e02ef7 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_top_level_domains_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_top_level_domains_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -31,29 +31,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") # pylint: disable=line-too-long path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -63,30 +64,31 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -99,34 +101,34 @@ def build_list_agreements_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements") # pylint: disable=line-too-long path_format_arguments = { "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -161,7 +163,7 @@ def list( ) -> Iterable["_models.TopLevelDomainCollection"]: """Get all top-level domains supported for registration. - Description for Get all top-level domains supported for registration. + Get all top-level domains supported for registration. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either TopLevelDomainCollection or the result of @@ -170,6 +172,8 @@ def list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.TopLevelDomainCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopLevelDomainCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -180,6 +184,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -189,6 +194,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -206,7 +212,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -220,7 +230,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains"} # type: ignore @distributed_trace def get( @@ -230,7 +240,7 @@ def get( ) -> "_models.TopLevelDomain": """Get details of a top-level domain. - Description for 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 @@ -245,16 +255,23 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -269,7 +286,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}"} # type: ignore @distributed_trace @@ -281,7 +298,7 @@ def list_agreements( ) -> Iterable["_models.TldLegalAgreementCollection"]: """Gets all legal agreements that user needs to accept before purchasing a domain. - Description for Gets all legal agreements that user needs to accept before purchasing a domain. + Gets all legal agreements that user needs to accept before purchasing a domain. :param name: Name of the top-level domain. :type name: str @@ -294,6 +311,7 @@ def list_agreements( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.TldLegalAgreementCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.TldLegalAgreementCollection"] @@ -308,6 +326,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_agreements.metadata['url'], @@ -321,6 +340,7 @@ def prepare_request(next_link=None): request = build_list_agreements_request( name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -340,7 +360,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,4 +378,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_agreements.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements'} # type: ignore + list_agreements.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_web_apps_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_web_apps_operations.py index f4f960e2dd61..c4f481d6f12d 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_web_apps_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_web_apps_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, IO, Iterable, List, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -18,7 +19,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -33,29 +33,30 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -67,32 +68,33 @@ def build_list_by_resource_group_request( include_slots: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if include_slots is not None: - query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['includeSlots'] = _SERIALIZER.query("include_slots", include_slots, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -103,31 +105,32 @@ def build_get_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -141,35 +144,35 @@ def build_create_or_update_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -185,35 +188,36 @@ def build_delete_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,35 +231,35 @@ def build_update_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -270,33 +274,34 @@ def build_analyze_custom_hostname_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -310,35 +315,35 @@ def build_apply_slot_config_to_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -354,35 +359,35 @@ def build_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -395,31 +400,32 @@ def build_list_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -431,10 +437,11 @@ def build_get_backup_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -442,21 +449,21 @@ def build_get_backup_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -468,10 +475,11 @@ def build_delete_backup_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -479,21 +487,21 @@ def build_delete_backup_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -508,12 +516,12 @@ def build_list_backup_status_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -521,23 +529,23 @@ def build_list_backup_status_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -554,12 +562,12 @@ def build_restore_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -567,23 +575,23 @@ def build_restore_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -596,31 +604,32 @@ def build_list_basic_publishing_credentials_policies_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -631,31 +640,32 @@ def build_get_ftp_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -669,35 +679,35 @@ def build_update_ftp_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -710,31 +720,32 @@ def build_get_scm_allowed_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -748,35 +759,35 @@ def build_update_scm_allowed_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -789,31 +800,32 @@ def build_list_configurations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -827,35 +839,35 @@ def build_update_application_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -868,31 +880,32 @@ def build_list_application_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -906,35 +919,35 @@ def build_update_auth_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -947,31 +960,32 @@ def build_get_auth_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -982,31 +996,32 @@ def build_get_auth_settings_v2_without_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1020,35 +1035,35 @@ def build_update_auth_settings_v2_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1061,31 +1076,32 @@ def build_get_auth_settings_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1099,35 +1115,35 @@ def build_update_azure_storage_accounts_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1140,31 +1156,32 @@ def build_list_azure_storage_accounts_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1178,35 +1195,35 @@ def build_update_backup_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1219,31 +1236,32 @@ def build_delete_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1254,31 +1272,32 @@ def build_get_backup_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1289,31 +1308,32 @@ def build_get_app_settings_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1325,10 +1345,11 @@ def build_get_app_setting_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1336,21 +1357,21 @@ def build_get_app_setting_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1361,31 +1382,32 @@ def build_get_site_connection_string_key_vault_references_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1397,10 +1419,11 @@ def build_get_site_connection_string_key_vault_reference_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -1408,21 +1431,21 @@ def build_get_site_connection_string_key_vault_reference_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1436,35 +1459,35 @@ def build_update_connection_strings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1477,31 +1500,32 @@ def build_list_connection_strings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1512,31 +1536,32 @@ def build_get_diagnostic_logs_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1550,35 +1575,35 @@ def build_update_diagnostic_logs_config_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1594,35 +1619,35 @@ def build_update_metadata_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1635,31 +1660,32 @@ def build_list_metadata_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1670,31 +1696,32 @@ def build_list_publishing_credentials_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1708,35 +1735,35 @@ def build_update_site_push_settings_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1749,31 +1776,32 @@ def build_list_site_push_settings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1784,31 +1812,32 @@ def build_list_slot_configuration_names_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1822,35 +1851,35 @@ def build_update_slot_configuration_names_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1863,31 +1892,32 @@ def build_get_configuration_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -1901,35 +1931,35 @@ def build_create_or_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1945,35 +1975,35 @@ def build_update_configuration_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -1986,31 +2016,32 @@ def build_list_configuration_snapshot_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2022,10 +2053,11 @@ def build_get_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2033,21 +2065,21 @@ def build_get_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2059,10 +2091,11 @@ def build_recover_site_configuration_snapshot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2070,21 +2103,21 @@ def build_recover_site_configuration_snapshot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2095,31 +2128,32 @@ def build_get_web_site_container_logs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2130,31 +2164,32 @@ def build_get_container_logs_zip_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2165,31 +2200,32 @@ def build_list_continuous_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2201,10 +2237,11 @@ def build_get_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2212,21 +2249,21 @@ def build_get_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2238,10 +2275,11 @@ def build_delete_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2249,21 +2287,21 @@ def build_delete_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2275,10 +2313,11 @@ def build_start_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2286,21 +2325,21 @@ def build_start_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2312,10 +2351,11 @@ def build_stop_continuous_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2323,21 +2363,21 @@ def build_stop_continuous_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2348,31 +2388,32 @@ def build_list_deployments_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2384,10 +2425,11 @@ def build_get_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2395,21 +2437,21 @@ def build_get_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2424,12 +2466,12 @@ def build_create_deployment_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2437,23 +2479,23 @@ def build_create_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2467,10 +2509,11 @@ def build_delete_deployment_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2478,21 +2521,21 @@ def build_delete_deployment_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2504,10 +2547,11 @@ def build_list_deployment_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2515,21 +2559,21 @@ def build_list_deployment_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2543,35 +2587,35 @@ def build_discover_backup_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2584,31 +2628,32 @@ def build_list_domain_ownership_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2620,10 +2665,11 @@ def build_get_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2631,21 +2677,21 @@ def build_get_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2660,12 +2706,12 @@ def build_create_or_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2673,23 +2719,23 @@ def build_create_or_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2703,10 +2749,11 @@ def build_delete_domain_ownership_identifier_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2714,21 +2761,21 @@ def build_delete_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2743,12 +2790,12 @@ def build_update_domain_ownership_identifier_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -2756,23 +2803,23 @@ def build_update_domain_ownership_identifier_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2785,31 +2832,32 @@ def build_get_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2823,35 +2871,35 @@ def build_create_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -2864,31 +2912,32 @@ def build_get_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2899,31 +2948,32 @@ def build_get_one_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2934,31 +2984,32 @@ def build_create_one_deploy_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -2969,31 +3020,32 @@ def build_list_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3004,31 +3056,32 @@ def build_get_functions_admin_token_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3040,10 +3093,11 @@ def build_get_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3051,21 +3105,21 @@ def build_get_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3080,12 +3134,12 @@ def build_create_function_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3093,23 +3147,23 @@ def build_create_function_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3123,10 +3177,11 @@ def build_delete_function_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3134,21 +3189,21 @@ def build_delete_function_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3164,12 +3219,12 @@ def build_create_or_update_function_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3178,23 +3233,23 @@ def build_create_or_update_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3209,10 +3264,11 @@ def build_delete_function_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3221,21 +3277,21 @@ def build_delete_function_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3247,10 +3303,11 @@ def build_list_function_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3258,21 +3315,21 @@ def build_list_function_keys_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3284,10 +3341,11 @@ def build_list_function_secrets_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3295,21 +3353,21 @@ def build_list_function_secrets_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3320,31 +3378,32 @@ def build_list_host_keys_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3355,31 +3414,32 @@ def build_list_sync_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3390,31 +3450,32 @@ def build_sync_functions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3430,12 +3491,12 @@ def build_create_or_update_host_secret_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3444,23 +3505,23 @@ def build_create_or_update_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3475,10 +3536,11 @@ def build_delete_host_secret_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3487,21 +3549,21 @@ def build_delete_host_secret_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3512,31 +3574,32 @@ def build_list_host_name_bindings_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3548,10 +3611,11 @@ def build_get_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3559,21 +3623,21 @@ def build_get_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3588,12 +3652,12 @@ def build_create_or_update_host_name_binding_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3601,23 +3665,23 @@ def build_create_or_update_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3631,10 +3695,11 @@ def build_delete_host_name_binding_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3642,21 +3707,21 @@ def build_delete_host_name_binding_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3669,10 +3734,11 @@ def build_get_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3681,21 +3747,21 @@ def build_get_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3711,12 +3777,12 @@ def build_create_or_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3725,23 +3791,23 @@ def build_create_or_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3756,10 +3822,11 @@ def build_delete_hybrid_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3768,21 +3835,21 @@ def build_delete_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3798,12 +3865,12 @@ def build_update_hybrid_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3812,23 +3879,23 @@ def build_update_hybrid_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3841,31 +3908,32 @@ def build_list_hybrid_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3876,31 +3944,32 @@ def build_list_relay_service_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3912,10 +3981,11 @@ def build_get_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3923,21 +3993,21 @@ def build_get_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -3952,12 +4022,12 @@ def build_create_or_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -3965,23 +4035,23 @@ def build_create_or_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -3995,10 +4065,11 @@ def build_delete_relay_service_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4006,21 +4077,21 @@ def build_delete_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4035,12 +4106,12 @@ def build_update_relay_service_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4048,23 +4119,23 @@ def build_update_relay_service_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4077,31 +4148,32 @@ def build_list_instance_identifiers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4113,10 +4185,11 @@ def build_get_instance_info_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4124,21 +4197,21 @@ def build_get_instance_info_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4150,10 +4223,11 @@ def build_get_instance_ms_deploy_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4161,21 +4235,21 @@ def build_get_instance_ms_deploy_status_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4190,12 +4264,12 @@ def build_create_instance_ms_deploy_operation_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4203,23 +4277,23 @@ def build_create_instance_ms_deploy_operation_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4233,10 +4307,11 @@ def build_get_instance_ms_deploy_log_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4244,21 +4319,21 @@ def build_get_instance_ms_deploy_log_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4270,10 +4345,11 @@ def build_list_instance_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4281,21 +4357,21 @@ def build_list_instance_processes_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4308,10 +4384,11 @@ def build_get_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4320,21 +4397,21 @@ def build_get_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4347,10 +4424,11 @@ def build_delete_instance_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4359,21 +4437,21 @@ def build_delete_instance_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4386,10 +4464,11 @@ def build_get_instance_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4398,21 +4477,21 @@ def build_get_instance_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4425,10 +4504,11 @@ def build_list_instance_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4437,21 +4517,21 @@ def build_list_instance_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4465,10 +4545,11 @@ def build_get_instance_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4478,21 +4559,21 @@ def build_get_instance_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4505,10 +4586,11 @@ def build_list_instance_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4517,21 +4599,21 @@ def build_list_instance_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4542,31 +4624,32 @@ def build_is_cloneable_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4577,31 +4660,32 @@ def build_list_site_backups_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4612,31 +4696,32 @@ def build_list_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4651,36 +4736,36 @@ def build_migrate_storage_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['subscriptionName'] = _SERIALIZER.query("subscription_name", subscription_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4696,35 +4781,35 @@ def build_migrate_my_sql_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4737,31 +4822,32 @@ def build_get_migrate_my_sql_status_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4772,31 +4858,32 @@ def build_get_swift_virtual_network_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4810,35 +4897,35 @@ def build_create_or_update_swift_virtual_network_connection_with_check_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4851,31 +4938,32 @@ def build_delete_swift_virtual_network_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4889,35 +4977,35 @@ def build_update_swift_virtual_network_connection_with_check_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -4931,10 +5019,11 @@ def build_list_network_features_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4942,21 +5031,21 @@ def build_list_network_features_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -4968,10 +5057,11 @@ def build_get_network_trace_operation_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -4979,21 +5069,21 @@ def build_get_network_trace_operation_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5008,37 +5098,38 @@ def build_start_web_site_network_trace_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5053,37 +5144,38 @@ def build_start_web_site_network_trace_operation_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5094,31 +5186,32 @@ def build_stop_web_site_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5130,10 +5223,11 @@ def build_get_network_traces_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5141,21 +5235,21 @@ def build_get_network_traces_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5167,10 +5261,11 @@ def build_get_network_trace_operation_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5178,21 +5273,21 @@ def build_get_network_trace_operation_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5204,10 +5299,11 @@ def build_get_network_traces_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5215,21 +5311,21 @@ def build_get_network_traces_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5240,31 +5336,32 @@ def build_generate_new_site_publishing_password_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5277,33 +5374,34 @@ def build_list_perf_mon_counters_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5314,31 +5412,32 @@ def build_get_site_php_error_log_flag_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5349,31 +5448,32 @@ def build_list_premier_add_ons_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5385,10 +5485,11 @@ def build_get_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5396,21 +5497,21 @@ def build_get_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5425,12 +5526,12 @@ def build_add_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5438,23 +5539,23 @@ def build_add_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5468,10 +5569,11 @@ def build_delete_premier_add_on_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5479,21 +5581,21 @@ def build_delete_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5508,12 +5610,12 @@ def build_update_premier_add_on_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5521,23 +5623,23 @@ def build_update_premier_add_on_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5550,31 +5652,32 @@ def build_get_private_access_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5588,35 +5691,35 @@ def build_put_private_access_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5629,31 +5732,32 @@ def build_get_private_endpoint_connection_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5665,10 +5769,11 @@ def build_get_private_endpoint_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5676,21 +5781,21 @@ def build_get_private_endpoint_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5705,12 +5810,12 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5718,23 +5823,23 @@ def build_approve_or_reject_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -5748,10 +5853,11 @@ def build_delete_private_endpoint_connection_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5759,21 +5865,21 @@ def build_delete_private_endpoint_connection_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5784,31 +5890,32 @@ def build_get_private_link_resources_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5819,31 +5926,32 @@ def build_list_processes_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5855,10 +5963,11 @@ def build_get_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5866,21 +5975,21 @@ def build_get_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5892,10 +6001,11 @@ def build_delete_process_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5903,21 +6013,21 @@ def build_delete_process_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5929,10 +6039,11 @@ def build_get_process_dump_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5940,21 +6051,21 @@ def build_get_process_dump_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -5966,10 +6077,11 @@ def build_list_process_modules_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -5977,21 +6089,21 @@ def build_list_process_modules_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6004,10 +6116,11 @@ def build_get_process_module_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6016,21 +6129,21 @@ def build_get_process_module_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6042,10 +6155,11 @@ def build_list_process_threads_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6053,21 +6167,21 @@ def build_list_process_threads_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6078,31 +6192,32 @@ def build_list_public_certificates_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6114,10 +6229,11 @@ def build_get_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6125,21 +6241,21 @@ def build_get_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6154,12 +6270,12 @@ def build_create_or_update_public_certificate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6167,23 +6283,23 @@ def build_create_or_update_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6197,10 +6313,11 @@ def build_delete_public_certificate_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6208,21 +6325,21 @@ def build_delete_public_certificate_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6236,35 +6353,35 @@ def build_list_publishing_profile_xml_with_secrets_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6277,31 +6394,32 @@ def build_reset_production_slot_config_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6315,35 +6433,36 @@ def build_restart_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6357,35 +6476,35 @@ def build_restore_from_backup_blob_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6401,35 +6520,35 @@ def build_restore_from_deleted_app_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6445,35 +6564,35 @@ def build_restore_snapshot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6486,31 +6605,32 @@ def build_list_site_extensions_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6522,10 +6642,11 @@ def build_get_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6533,21 +6654,21 @@ def build_get_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6559,10 +6680,11 @@ def build_install_site_extension_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6570,21 +6692,21 @@ def build_install_site_extension_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6596,10 +6718,11 @@ def build_delete_site_extension_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6607,21 +6730,21 @@ def build_delete_site_extension_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6632,31 +6755,32 @@ def build_list_slots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6668,10 +6792,11 @@ def build_get_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6679,21 +6804,21 @@ def build_get_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6708,12 +6833,12 @@ def build_create_or_update_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6721,23 +6846,23 @@ def build_create_or_update_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6754,10 +6879,11 @@ def build_delete_slot_request( delete_empty_server_farm: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6765,25 +6891,25 @@ def build_delete_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if delete_metrics is not None: - query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') + _query_parameters['deleteMetrics'] = _SERIALIZER.query("delete_metrics", delete_metrics, 'bool') if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['deleteEmptyServerFarm'] = _SERIALIZER.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6798,12 +6924,12 @@ def build_update_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6811,23 +6937,23 @@ def build_update_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6843,10 +6969,11 @@ def build_analyze_custom_hostname_slot_request( host_name: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6854,23 +6981,23 @@ def build_analyze_custom_hostname_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if host_name is not None: - query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['hostName'] = _SERIALIZER.query("host_name", host_name, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -6885,12 +7012,12 @@ def build_apply_slot_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6898,23 +7025,23 @@ def build_apply_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6931,12 +7058,12 @@ def build_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6944,23 +7071,23 @@ def build_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -6974,10 +7101,11 @@ def build_list_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -6985,21 +7113,21 @@ def build_list_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7012,10 +7140,11 @@ def build_get_backup_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7024,21 +7153,21 @@ def build_get_backup_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7051,10 +7180,11 @@ def build_delete_backup_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7063,21 +7193,21 @@ def build_delete_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7093,12 +7223,12 @@ def build_list_backup_status_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7107,23 +7237,23 @@ def build_list_backup_status_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7141,12 +7271,12 @@ def build_restore_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7155,23 +7285,23 @@ def build_restore_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7185,10 +7315,11 @@ def build_list_basic_publishing_credentials_policies_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7196,21 +7327,21 @@ def build_list_basic_publishing_credentials_policies_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7222,10 +7353,11 @@ def build_get_ftp_allowed_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7233,21 +7365,21 @@ def build_get_ftp_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7262,12 +7394,12 @@ def build_update_ftp_allowed_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7275,23 +7407,23 @@ def build_update_ftp_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7305,10 +7437,11 @@ def build_get_scm_allowed_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7316,21 +7449,21 @@ def build_get_scm_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7345,12 +7478,12 @@ def build_update_scm_allowed_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7358,23 +7491,23 @@ def build_update_scm_allowed_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7388,10 +7521,11 @@ def build_list_configurations_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7399,21 +7533,21 @@ def build_list_configurations_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7428,12 +7562,12 @@ def build_update_application_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7441,23 +7575,23 @@ def build_update_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7471,10 +7605,11 @@ def build_list_application_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7482,21 +7617,21 @@ def build_list_application_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7511,12 +7646,12 @@ def build_update_auth_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7524,23 +7659,23 @@ def build_update_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7554,10 +7689,11 @@ def build_get_auth_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7565,21 +7701,59 @@ def build_get_auth_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_auth_settings_v2_without_secrets_slot_request( + resource_group_name: str, + name: str, + slot: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2") # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + "name": _SERIALIZER.url("name", name, 'str'), + "slot": _SERIALIZER.url("slot", slot, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7594,12 +7768,12 @@ def build_update_auth_settings_v2_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7607,23 +7781,23 @@ def build_update_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7637,10 +7811,11 @@ def build_get_auth_settings_v2_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7648,21 +7823,21 @@ def build_get_auth_settings_v2_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7677,12 +7852,12 @@ def build_update_azure_storage_accounts_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7690,23 +7865,23 @@ def build_update_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7720,10 +7895,11 @@ def build_list_azure_storage_accounts_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7731,21 +7907,21 @@ def build_list_azure_storage_accounts_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7760,12 +7936,12 @@ def build_update_backup_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7773,23 +7949,23 @@ def build_update_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -7803,10 +7979,11 @@ def build_delete_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7814,21 +7991,21 @@ def build_delete_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7840,10 +8017,11 @@ def build_get_backup_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7851,21 +8029,21 @@ def build_get_backup_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7877,10 +8055,11 @@ def build_get_app_settings_key_vault_references_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7888,21 +8067,21 @@ def build_get_app_settings_key_vault_references_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7915,10 +8094,11 @@ def build_get_app_setting_key_vault_reference_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7927,21 +8107,21 @@ def build_get_app_setting_key_vault_reference_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7953,10 +8133,11 @@ def build_get_site_connection_string_key_vault_references_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -7964,21 +8145,21 @@ def build_get_site_connection_string_key_vault_references_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -7991,10 +8172,11 @@ def build_get_site_connection_string_key_vault_reference_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8003,21 +8185,21 @@ def build_get_site_connection_string_key_vault_reference_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8032,12 +8214,12 @@ def build_update_connection_strings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8045,23 +8227,23 @@ def build_update_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8075,10 +8257,11 @@ def build_list_connection_strings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8086,21 +8269,21 @@ def build_list_connection_strings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8112,10 +8295,11 @@ def build_get_diagnostic_logs_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8123,21 +8307,21 @@ def build_get_diagnostic_logs_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8152,12 +8336,12 @@ def build_update_diagnostic_logs_config_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8165,23 +8349,23 @@ def build_update_diagnostic_logs_config_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8198,12 +8382,12 @@ def build_update_metadata_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8211,23 +8395,23 @@ def build_update_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8241,10 +8425,11 @@ def build_list_metadata_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8252,21 +8437,21 @@ def build_list_metadata_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8278,10 +8463,11 @@ def build_list_publishing_credentials_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8289,21 +8475,21 @@ def build_list_publishing_credentials_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8318,12 +8504,12 @@ def build_update_site_push_settings_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8331,23 +8517,23 @@ def build_update_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8361,10 +8547,11 @@ def build_list_site_push_settings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8372,21 +8559,21 @@ def build_list_site_push_settings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8398,10 +8585,11 @@ def build_get_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8409,21 +8597,21 @@ def build_get_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8438,12 +8626,12 @@ def build_create_or_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8451,23 +8639,23 @@ def build_create_or_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8484,12 +8672,12 @@ def build_update_configuration_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8497,23 +8685,23 @@ def build_update_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -8527,10 +8715,11 @@ def build_list_configuration_snapshot_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8538,21 +8727,21 @@ def build_list_configuration_snapshot_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8565,10 +8754,11 @@ def build_get_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8577,21 +8767,21 @@ def build_get_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8604,10 +8794,11 @@ def build_recover_site_configuration_snapshot_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8616,21 +8807,21 @@ def build_recover_site_configuration_snapshot_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8642,10 +8833,11 @@ def build_get_web_site_container_logs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/octet-stream" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8653,21 +8845,21 @@ def build_get_web_site_container_logs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8679,10 +8871,11 @@ def build_get_container_logs_zip_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/zip" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8690,21 +8883,21 @@ def build_get_container_logs_zip_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8716,10 +8909,11 @@ def build_list_continuous_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8727,21 +8921,21 @@ def build_list_continuous_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8754,10 +8948,11 @@ def build_get_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8766,21 +8961,21 @@ def build_get_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8793,10 +8988,11 @@ def build_delete_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8805,21 +9001,21 @@ def build_delete_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8832,10 +9028,11 @@ def build_start_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8844,21 +9041,21 @@ def build_start_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8871,10 +9068,11 @@ def build_stop_continuous_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8883,21 +9081,21 @@ def build_stop_continuous_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8909,10 +9107,11 @@ def build_list_deployments_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8920,21 +9119,21 @@ def build_list_deployments_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8947,10 +9146,11 @@ def build_get_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -8959,21 +9159,21 @@ def build_get_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -8989,12 +9189,12 @@ def build_create_deployment_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9003,23 +9203,23 @@ def build_create_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9034,10 +9234,11 @@ def build_delete_deployment_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9046,21 +9247,21 @@ def build_delete_deployment_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9073,10 +9274,11 @@ def build_list_deployment_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9085,21 +9287,21 @@ def build_list_deployment_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9114,12 +9316,12 @@ def build_discover_backup_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9127,23 +9329,23 @@ def build_discover_backup_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9157,10 +9359,11 @@ def build_list_domain_ownership_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9168,21 +9371,21 @@ def build_list_domain_ownership_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9195,10 +9398,11 @@ def build_get_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9207,21 +9411,21 @@ def build_get_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9237,12 +9441,12 @@ def build_create_or_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9251,23 +9455,23 @@ def build_create_or_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9282,10 +9486,11 @@ def build_delete_domain_ownership_identifier_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9294,21 +9499,21 @@ def build_delete_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9324,12 +9529,12 @@ def build_update_domain_ownership_identifier_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9338,23 +9543,23 @@ def build_update_domain_ownership_identifier_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9368,10 +9573,11 @@ def build_get_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9379,21 +9585,21 @@ def build_get_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9408,12 +9614,12 @@ def build_create_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9421,23 +9627,23 @@ def build_create_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9451,10 +9657,11 @@ def build_get_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9462,21 +9669,21 @@ def build_get_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9488,10 +9695,11 @@ def build_list_instance_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9499,21 +9707,21 @@ def build_list_instance_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9525,10 +9733,11 @@ def build_get_functions_admin_token_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9536,21 +9745,21 @@ def build_get_functions_admin_token_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9563,10 +9772,11 @@ def build_get_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9575,21 +9785,21 @@ def build_get_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9605,12 +9815,12 @@ def build_create_instance_function_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9619,23 +9829,23 @@ def build_create_instance_function_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9650,10 +9860,11 @@ def build_delete_instance_function_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9662,21 +9873,21 @@ def build_delete_instance_function_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9693,12 +9904,12 @@ def build_create_or_update_function_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9708,23 +9919,23 @@ def build_create_or_update_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -9740,10 +9951,11 @@ def build_delete_function_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9753,21 +9965,21 @@ def build_delete_function_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9780,10 +9992,11 @@ def build_list_function_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9792,21 +10005,21 @@ def build_list_function_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9819,10 +10032,11 @@ def build_list_function_secrets_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9831,21 +10045,21 @@ def build_list_function_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9857,10 +10071,11 @@ def build_list_host_keys_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9868,21 +10083,21 @@ def build_list_host_keys_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9894,10 +10109,11 @@ def build_list_sync_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9905,21 +10121,21 @@ def build_list_sync_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9931,10 +10147,11 @@ def build_sync_functions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9942,21 +10159,21 @@ def build_sync_functions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -9973,12 +10190,12 @@ def build_create_or_update_host_secret_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -9988,23 +10205,23 @@ def build_create_or_update_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10020,10 +10237,11 @@ def build_delete_host_secret_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10033,21 +10251,21 @@ def build_delete_host_secret_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10059,10 +10277,11 @@ def build_list_host_name_bindings_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10070,21 +10289,21 @@ def build_list_host_name_bindings_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10097,10 +10316,11 @@ def build_get_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10109,21 +10329,21 @@ def build_get_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10139,12 +10359,12 @@ def build_create_or_update_host_name_binding_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10153,23 +10373,23 @@ def build_create_or_update_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10184,10 +10404,11 @@ def build_delete_host_name_binding_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10196,21 +10417,21 @@ def build_delete_host_name_binding_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10224,10 +10445,11 @@ def build_get_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10237,21 +10459,21 @@ def build_get_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10268,12 +10490,12 @@ def build_create_or_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10283,23 +10505,23 @@ def build_create_or_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10315,10 +10537,11 @@ def build_delete_hybrid_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10328,21 +10551,21 @@ def build_delete_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10359,12 +10582,12 @@ def build_update_hybrid_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10374,23 +10597,23 @@ def build_update_hybrid_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10404,10 +10627,11 @@ def build_list_hybrid_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10415,21 +10639,21 @@ def build_list_hybrid_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10441,10 +10665,11 @@ def build_list_relay_service_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10452,21 +10677,21 @@ def build_list_relay_service_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10479,10 +10704,11 @@ def build_get_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10491,21 +10717,21 @@ def build_get_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10521,12 +10747,12 @@ def build_create_or_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10535,23 +10761,23 @@ def build_create_or_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10566,10 +10792,11 @@ def build_delete_relay_service_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10578,21 +10805,21 @@ def build_delete_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10608,12 +10835,12 @@ def build_update_relay_service_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10622,23 +10849,23 @@ def build_update_relay_service_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10652,10 +10879,11 @@ def build_list_instance_identifiers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10663,21 +10891,21 @@ def build_list_instance_identifiers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10690,10 +10918,11 @@ def build_get_instance_info_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10702,21 +10931,21 @@ def build_get_instance_info_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10729,10 +10958,11 @@ def build_get_instance_ms_deploy_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10741,21 +10971,21 @@ def build_get_instance_ms_deploy_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10771,12 +11001,12 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10785,23 +11015,23 @@ def build_create_instance_ms_deploy_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -10816,10 +11046,11 @@ def build_get_instance_ms_deploy_log_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10828,21 +11059,21 @@ def build_get_instance_ms_deploy_log_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10855,10 +11086,11 @@ def build_list_instance_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10867,21 +11099,21 @@ def build_list_instance_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10895,10 +11127,11 @@ def build_get_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10908,21 +11141,21 @@ def build_get_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10936,10 +11169,11 @@ def build_delete_instance_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10949,21 +11183,21 @@ def build_delete_instance_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -10977,10 +11211,11 @@ def build_get_instance_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -10990,21 +11225,21 @@ def build_get_instance_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11018,10 +11253,11 @@ def build_list_instance_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11031,21 +11267,21 @@ def build_list_instance_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11060,10 +11296,11 @@ def build_get_instance_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11074,21 +11311,21 @@ def build_get_instance_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11102,10 +11339,11 @@ def build_list_instance_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11115,21 +11353,21 @@ def build_list_instance_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11141,10 +11379,11 @@ def build_is_cloneable_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11152,21 +11391,21 @@ def build_is_cloneable_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11178,10 +11417,11 @@ def build_list_site_backups_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11189,21 +11429,21 @@ def build_list_site_backups_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11215,10 +11455,11 @@ def build_list_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11226,21 +11467,21 @@ def build_list_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11252,10 +11493,11 @@ def build_get_migrate_my_sql_status_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11263,21 +11505,21 @@ def build_get_migrate_my_sql_status_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11289,10 +11531,11 @@ def build_get_swift_virtual_network_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11300,21 +11543,21 @@ def build_get_swift_virtual_network_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11329,12 +11572,12 @@ def build_create_or_update_swift_virtual_network_connection_with_check_slot_requ content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11342,23 +11585,23 @@ def build_create_or_update_swift_virtual_network_connection_with_check_slot_requ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11372,10 +11615,11 @@ def build_delete_swift_virtual_network_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11383,21 +11627,21 @@ def build_delete_swift_virtual_network_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11412,12 +11656,12 @@ def build_update_swift_virtual_network_connection_with_check_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11425,23 +11669,23 @@ def build_update_swift_virtual_network_connection_with_check_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -11456,10 +11700,11 @@ def build_list_network_features_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11468,21 +11713,21 @@ def build_list_network_features_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11495,10 +11740,11 @@ def build_get_network_trace_operation_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11507,21 +11753,21 @@ def build_get_network_trace_operation_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11537,10 +11783,11 @@ def build_start_web_site_network_trace_slot_request( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11548,27 +11795,27 @@ def build_start_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11584,10 +11831,11 @@ def build_start_web_site_network_trace_operation_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11595,27 +11843,27 @@ def build_start_web_site_network_trace_operation_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11627,10 +11875,11 @@ def build_stop_web_site_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11638,21 +11887,21 @@ def build_stop_web_site_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11665,10 +11914,11 @@ def build_get_network_traces_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11677,21 +11927,21 @@ def build_get_network_traces_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11704,10 +11954,11 @@ def build_get_network_trace_operation_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11716,21 +11967,21 @@ def build_get_network_trace_operation_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11743,10 +11994,11 @@ def build_get_network_traces_slot_v2_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11755,21 +12007,21 @@ def build_get_network_traces_slot_v2_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11781,10 +12033,11 @@ def build_generate_new_site_publishing_password_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11792,21 +12045,21 @@ def build_generate_new_site_publishing_password_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11820,10 +12073,11 @@ def build_list_perf_mon_counters_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11831,23 +12085,23 @@ def build_list_perf_mon_counters_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11859,10 +12113,11 @@ def build_get_site_php_error_log_flag_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11870,21 +12125,21 @@ def build_get_site_php_error_log_flag_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11896,10 +12151,11 @@ def build_list_premier_add_ons_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11907,21 +12163,21 @@ def build_list_premier_add_ons_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11934,10 +12190,11 @@ def build_get_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11946,21 +12203,21 @@ def build_get_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -11976,12 +12233,12 @@ def build_add_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -11990,23 +12247,23 @@ def build_add_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12021,10 +12278,11 @@ def build_delete_premier_add_on_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12033,21 +12291,21 @@ def build_delete_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12063,12 +12321,12 @@ def build_update_premier_add_on_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12077,23 +12335,23 @@ def build_update_premier_add_on_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12107,10 +12365,11 @@ def build_get_private_access_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12118,21 +12377,21 @@ def build_get_private_access_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12147,12 +12406,12 @@ def build_put_private_access_vnet_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12160,23 +12419,23 @@ def build_put_private_access_vnet_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12190,10 +12449,11 @@ def build_get_private_endpoint_connection_list_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12201,21 +12461,21 @@ def build_get_private_endpoint_connection_list_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12228,10 +12488,11 @@ def build_get_private_endpoint_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12240,21 +12501,21 @@ def build_get_private_endpoint_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12270,12 +12531,12 @@ def build_approve_or_reject_private_endpoint_connection_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12284,23 +12545,23 @@ def build_approve_or_reject_private_endpoint_connection_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12315,10 +12576,11 @@ def build_delete_private_endpoint_connection_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12327,21 +12589,21 @@ def build_delete_private_endpoint_connection_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12353,10 +12615,11 @@ def build_get_private_link_resources_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12364,21 +12627,21 @@ def build_get_private_link_resources_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12390,10 +12653,11 @@ def build_list_processes_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12401,21 +12665,21 @@ def build_list_processes_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12428,10 +12692,11 @@ def build_get_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12440,21 +12705,21 @@ def build_get_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12467,10 +12732,11 @@ def build_delete_process_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12479,21 +12745,21 @@ def build_delete_process_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12506,10 +12772,11 @@ def build_get_process_dump_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12518,21 +12785,21 @@ def build_get_process_dump_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12545,10 +12812,11 @@ def build_list_process_modules_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12557,21 +12825,21 @@ def build_list_process_modules_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12585,10 +12853,11 @@ def build_get_process_module_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12598,21 +12867,21 @@ def build_get_process_module_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12625,10 +12894,11 @@ def build_list_process_threads_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12637,21 +12907,21 @@ def build_list_process_threads_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12663,10 +12933,11 @@ def build_list_public_certificates_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12674,21 +12945,21 @@ def build_list_public_certificates_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12701,10 +12972,11 @@ def build_get_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12713,21 +12985,21 @@ def build_get_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12743,12 +13015,12 @@ def build_create_or_update_public_certificate_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12757,23 +13029,23 @@ def build_create_or_update_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12788,10 +13060,11 @@ def build_delete_public_certificate_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12800,21 +13073,21 @@ def build_delete_public_certificate_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12829,12 +13102,12 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/xml" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12842,23 +13115,23 @@ def build_list_publishing_profile_xml_with_secrets_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -12872,10 +13145,11 @@ def build_reset_slot_configuration_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12883,21 +13157,21 @@ def build_reset_slot_configuration_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12912,10 +13186,11 @@ def build_restart_slot_request( synchronous: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12923,25 +13198,25 @@ def build_restart_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if soft_restart is not None: - query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') + _query_parameters['softRestart'] = _SERIALIZER.query("soft_restart", soft_restart, 'bool') if synchronous is not None: - query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['synchronous'] = _SERIALIZER.query("synchronous", synchronous, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -12956,12 +13231,12 @@ def build_restore_from_backup_blob_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -12969,23 +13244,23 @@ def build_restore_from_backup_blob_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13002,12 +13277,12 @@ def build_restore_from_deleted_app_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13015,23 +13290,23 @@ def build_restore_from_deleted_app_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13048,12 +13323,12 @@ def build_restore_snapshot_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13061,23 +13336,23 @@ def build_restore_snapshot_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13091,10 +13366,11 @@ def build_list_site_extensions_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13102,21 +13378,21 @@ def build_list_site_extensions_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13129,10 +13405,11 @@ def build_get_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13141,21 +13418,21 @@ def build_get_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13168,10 +13445,11 @@ def build_install_site_extension_slot_request_initial( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13180,21 +13458,21 @@ def build_install_site_extension_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13207,10 +13485,11 @@ def build_delete_site_extension_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13219,21 +13498,21 @@ def build_delete_site_extension_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13248,12 +13527,12 @@ def build_list_slot_differences_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13261,23 +13540,23 @@ def build_list_slot_differences_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13294,12 +13573,12 @@ def build_swap_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13307,23 +13586,23 @@ def build_swap_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13337,10 +13616,11 @@ def build_list_snapshots_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13348,21 +13628,21 @@ def build_list_snapshots_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13374,10 +13654,11 @@ def build_list_snapshots_from_dr_secondary_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13385,21 +13666,21 @@ def build_list_snapshots_from_dr_secondary_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13411,10 +13692,11 @@ def build_get_source_control_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13422,21 +13704,21 @@ def build_get_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13451,12 +13733,12 @@ def build_create_or_update_source_control_slot_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13464,23 +13746,23 @@ def build_create_or_update_source_control_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13496,10 +13778,11 @@ def build_delete_source_control_slot_request( additional_flags: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13507,23 +13790,23 @@ def build_delete_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if additional_flags is not None: - query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13538,12 +13821,12 @@ def build_update_source_control_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13551,23 +13834,23 @@ def build_update_source_control_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -13581,10 +13864,11 @@ def build_start_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13592,21 +13876,21 @@ def build_start_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13622,10 +13906,11 @@ def build_start_network_trace_slot_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13633,27 +13918,27 @@ def build_start_network_trace_slot_request_initial( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13665,10 +13950,11 @@ def build_stop_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13676,21 +13962,21 @@ def build_stop_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13702,10 +13988,11 @@ def build_stop_network_trace_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13713,21 +14000,21 @@ def build_stop_network_trace_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13739,10 +14026,11 @@ def build_sync_repository_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13750,21 +14038,21 @@ def build_sync_repository_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13776,10 +14064,11 @@ def build_sync_function_triggers_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13787,21 +14076,21 @@ def build_sync_function_triggers_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13813,10 +14102,11 @@ def build_list_triggered_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13824,21 +14114,21 @@ def build_list_triggered_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13851,10 +14141,11 @@ def build_get_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13863,21 +14154,21 @@ def build_get_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13890,10 +14181,11 @@ def build_delete_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13902,21 +14194,21 @@ def build_delete_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13929,10 +14221,11 @@ def build_list_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13941,21 +14234,21 @@ def build_list_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -13969,10 +14262,11 @@ def build_get_triggered_web_job_history_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -13982,21 +14276,21 @@ def build_get_triggered_web_job_history_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14009,10 +14303,11 @@ def build_run_triggered_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14021,21 +14316,21 @@ def build_run_triggered_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14049,10 +14344,11 @@ def build_list_usages_slot_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14060,23 +14356,23 @@ def build_list_usages_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14088,10 +14384,11 @@ def build_list_vnet_connections_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14099,21 +14396,21 @@ def build_list_vnet_connections_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14126,10 +14423,11 @@ def build_get_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14138,21 +14436,21 @@ def build_get_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14168,12 +14466,12 @@ def build_create_or_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14182,23 +14480,23 @@ def build_create_or_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14213,10 +14511,11 @@ def build_delete_vnet_connection_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14225,21 +14524,21 @@ def build_delete_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14255,12 +14554,12 @@ def build_update_vnet_connection_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14269,23 +14568,23 @@ def build_update_vnet_connection_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14301,10 +14600,11 @@ def build_get_vnet_connection_gateway_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14314,21 +14614,21 @@ def build_get_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14345,12 +14645,12 @@ def build_create_or_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14360,23 +14660,23 @@ def build_create_or_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14395,12 +14695,12 @@ def build_update_vnet_connection_gateway_slot_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14410,23 +14710,23 @@ def build_update_vnet_connection_gateway_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14440,10 +14740,11 @@ def build_list_web_jobs_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14451,21 +14752,21 @@ def build_list_web_jobs_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14478,10 +14779,11 @@ def build_get_web_job_slot_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -14490,21 +14792,21 @@ def build_get_web_job_slot_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14518,35 +14820,35 @@ def build_list_slot_differences_from_production_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14562,35 +14864,35 @@ def build_swap_slot_with_production_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14603,31 +14905,32 @@ def build_list_snapshots_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14638,31 +14941,32 @@ def build_list_snapshots_from_dr_secondary_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14673,31 +14977,32 @@ def build_get_source_control_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14711,35 +15016,35 @@ def build_create_or_update_source_control_request_initial( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14754,33 +15059,34 @@ def build_delete_source_control_request( additional_flags: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if additional_flags is not None: - query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['additionalFlags'] = _SERIALIZER.query("additional_flags", additional_flags, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14794,35 +15100,35 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -14835,31 +15141,32 @@ def build_start_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14874,37 +15181,38 @@ def build_start_network_trace_request_initial( sas_url: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') + _query_parameters['durationInSeconds'] = _SERIALIZER.query("duration_in_seconds", duration_in_seconds, 'int') if max_frame_length is not None: - query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') + _query_parameters['maxFrameLength'] = _SERIALIZER.query("max_frame_length", max_frame_length, 'int') if sas_url is not None: - query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['sasUrl'] = _SERIALIZER.query("sas_url", sas_url, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14915,31 +15223,32 @@ def build_stop_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14950,31 +15259,32 @@ def build_stop_network_trace_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -14985,31 +15295,32 @@ def build_sync_repository_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15020,31 +15331,32 @@ def build_sync_function_triggers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15055,31 +15367,32 @@ def build_list_triggered_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15091,10 +15404,11 @@ def build_get_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15102,21 +15416,21 @@ def build_get_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15128,10 +15442,11 @@ def build_delete_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15139,21 +15454,21 @@ def build_delete_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15165,10 +15480,11 @@ def build_list_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15176,21 +15492,21 @@ def build_list_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15203,10 +15519,11 @@ def build_get_triggered_web_job_history_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15215,21 +15532,21 @@ def build_get_triggered_web_job_history_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15241,10 +15558,11 @@ def build_run_triggered_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15252,21 +15570,21 @@ def build_run_triggered_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15279,33 +15597,34 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str', skip_quote=True) # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15316,31 +15635,32 @@ def build_list_vnet_connections_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15352,10 +15672,11 @@ def build_get_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15363,21 +15684,21 @@ def build_get_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15392,12 +15713,12 @@ def build_create_or_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15405,23 +15726,23 @@ def build_create_or_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15435,10 +15756,11 @@ def build_delete_vnet_connection_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15446,21 +15768,21 @@ def build_delete_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15475,12 +15797,12 @@ def build_update_vnet_connection_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15488,23 +15810,23 @@ def build_update_vnet_connection_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15519,10 +15841,11 @@ def build_get_vnet_connection_gateway_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15531,21 +15854,21 @@ def build_get_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15561,12 +15884,12 @@ def build_create_or_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15575,23 +15898,23 @@ def build_create_or_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15609,12 +15932,12 @@ def build_update_vnet_connection_gateway_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15623,23 +15946,23 @@ def build_update_vnet_connection_gateway_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -15652,31 +15975,32 @@ def build_list_web_jobs_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -15688,10 +16012,11 @@ def build_get_web_job_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "name": _SERIALIZER.url("name", name, 'str'), @@ -15699,25 +16024,25 @@ def build_get_web_job_request( "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) -class WebAppsOperations(object): +class WebAppsOperations(object): # pylint: disable=too-many-public-methods """WebAppsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that @@ -15746,13 +16071,15 @@ def list( ) -> Iterable["_models.WebAppCollection"]: """Get all apps for a subscription. - Description for Get all apps for a subscription. + Get all apps for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either WebAppCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15763,6 +16090,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list.metadata['url'], ) request = _convert_request(request) @@ -15772,6 +16100,7 @@ def prepare_request(next_link=None): request = build_list_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -15789,7 +16118,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15803,7 +16136,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites'} # type: ignore + list.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def list_by_resource_group( @@ -15814,7 +16147,7 @@ def list_by_resource_group( ) -> Iterable["_models.WebAppCollection"]: """Gets all web, mobile, and API apps in the specified resource group. - Description for Gets all web, mobile, and API apps in the specified resource group. + 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 @@ -15826,6 +16159,8 @@ def list_by_resource_group( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -15837,6 +16172,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=self.list_by_resource_group.metadata['url'], ) @@ -15848,6 +16184,7 @@ def prepare_request(next_link=None): request = build_list_by_resource_group_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, include_slots=include_slots, template_url=next_link, ) @@ -15866,7 +16203,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15880,7 +16221,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites'} # type: ignore + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites"} # type: ignore @distributed_trace def get( @@ -15891,7 +16232,7 @@ def get( ) -> "_models.Site": """Gets the details of a web, mobile, or API app. - Description for 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 @@ -15908,17 +16249,24 @@ def get( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -15933,7 +16281,7 @@ def get( return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore def _create_or_update_initial( @@ -15949,6 +16297,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -15957,6 +16306,7 @@ def _create_or_update_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_initial.metadata['url'], @@ -15964,7 +16314,11 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -15982,7 +16336,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -15996,8 +16350,8 @@ def begin_create_or_update( """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. + 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 @@ -16018,8 +16372,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -16031,6 +16386,7 @@ def begin_create_or_update( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16055,13 +16411,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace - def delete( + def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16071,16 +16426,16 @@ def delete( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -16093,11 +16448,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete.metadata['url'], @@ -16105,7 +16463,11 @@ def delete( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -16116,7 +16478,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -16130,8 +16492,8 @@ def update( """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. + 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 @@ -16151,6 +16513,7 @@ def update( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -16159,6 +16522,7 @@ def update( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update.metadata['url'], @@ -16166,7 +16530,11 @@ def update( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -16185,7 +16553,7 @@ def update( return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}'} # type: ignore + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}"} # type: ignore @distributed_trace @@ -16198,13 +16566,13 @@ def analyze_custom_hostname( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -16217,18 +16585,25 @@ def analyze_custom_hostname( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_analyze_custom_hostname_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16243,11 +16618,11 @@ def analyze_custom_hostname( return deserialized - analyze_custom_hostname.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_config_to_production( + def apply_slot_config_to_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16256,7 +16631,7 @@ def apply_slot_config_to_production( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -16275,6 +16650,7 @@ def apply_slot_config_to_production( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -16283,6 +16659,7 @@ def apply_slot_config_to_production( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_config_to_production.metadata['url'], @@ -16290,7 +16667,11 @@ def apply_slot_config_to_production( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16301,7 +16682,7 @@ def apply_slot_config_to_production( if cls: return cls(pipeline_response, None, {}) - apply_slot_config_to_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig'} # type: ignore + apply_slot_config_to_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig"} # type: ignore @distributed_trace @@ -16314,7 +16695,7 @@ def backup( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -16334,6 +16715,7 @@ def backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16342,6 +16724,7 @@ def backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup.metadata['url'], @@ -16349,7 +16732,11 @@ def backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16364,7 +16751,7 @@ def backup( return deserialized - backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup'} # type: ignore + backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup"} # type: ignore @distributed_trace @@ -16376,7 +16763,7 @@ def list_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -16388,6 +16775,8 @@ def list_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16400,6 +16789,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups.metadata['url'], ) request = _convert_request(request) @@ -16411,6 +16801,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16428,7 +16819,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16442,7 +16837,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} # type: ignore + list_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups"} # type: ignore @distributed_trace def get_backup_status( @@ -16454,7 +16849,7 @@ def get_backup_status( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -16473,18 +16868,25 @@ def get_backup_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_backup_status_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16499,11 +16901,11 @@ def get_backup_status( return deserialized - get_backup_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + get_backup_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup( + def delete_backup( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16512,7 +16914,7 @@ def delete_backup( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -16531,18 +16933,25 @@ def delete_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_backup_request( resource_group_name=resource_group_name, name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16553,7 +16962,7 @@ def delete_backup( if cls: return cls(pipeline_response, None, {}) - delete_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}'} # type: ignore + delete_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}"} # type: ignore @distributed_trace @@ -16569,9 +16978,9 @@ def list_backup_status_secrets( 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. + 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 @@ -16592,6 +17001,7 @@ def list_backup_status_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -16601,6 +17011,7 @@ def list_backup_status_secrets( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets.metadata['url'], @@ -16608,7 +17019,11 @@ def list_backup_status_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16623,10 +17038,10 @@ def list_backup_status_secrets( return deserialized - list_backup_status_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list"} # type: ignore - def _restore_initial( + def _restore_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16640,6 +17055,7 @@ def _restore_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -16649,6 +17065,7 @@ def _restore_initial( name=name, backup_id=backup_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_initial.metadata['url'], @@ -16656,7 +17073,11 @@ def _restore_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -16666,11 +17087,11 @@ def _restore_initial( if cls: return cls(pipeline_response, None, {}) - _restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + _restore_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore( + def begin_restore( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -16680,7 +17101,7 @@ def begin_restore( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -16702,8 +17123,9 @@ def begin_restore( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -16716,6 +17138,7 @@ def begin_restore( name=name, backup_id=backup_id, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -16737,10 +17160,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore'} # type: ignore + begin_restore.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_basic_publishing_credentials_policies( @@ -16751,8 +17173,7 @@ def list_basic_publishing_credentials_policies( ) -> Iterable["_models.PublishingCredentialsPoliciesCollection"]: """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. + 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 @@ -16765,6 +17186,8 @@ def list_basic_publishing_credentials_policies( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PublishingCredentialsPoliciesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublishingCredentialsPoliciesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -16777,6 +17200,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_basic_publishing_credentials_policies.metadata['url'], ) request = _convert_request(request) @@ -16788,6 +17212,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -16805,7 +17230,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16819,7 +17248,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_basic_publishing_credentials_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies'} # type: ignore + list_basic_publishing_credentials_policies.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace def get_ftp_allowed( @@ -16830,7 +17259,7 @@ def get_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -16847,17 +17276,24 @@ def get_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ftp_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16872,7 +17308,7 @@ def get_ftp_allowed( return deserialized - get_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16885,7 +17321,7 @@ def update_ftp_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -16905,6 +17341,7 @@ def update_ftp_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -16913,6 +17350,7 @@ def update_ftp_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed.metadata['url'], @@ -16920,7 +17358,11 @@ def update_ftp_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16935,7 +17377,7 @@ def update_ftp_allowed( return deserialized - update_ftp_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -16947,7 +17389,7 @@ def get_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -16964,17 +17406,24 @@ def get_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_scm_allowed_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -16989,7 +17438,7 @@ def get_scm_allowed( return deserialized - get_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -17002,7 +17451,7 @@ def update_scm_allowed( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -17022,6 +17471,7 @@ def update_scm_allowed( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -17030,6 +17480,7 @@ def update_scm_allowed( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed.metadata['url'], @@ -17037,7 +17488,11 @@ def update_scm_allowed( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17052,7 +17507,7 @@ def update_scm_allowed( return deserialized - update_scm_allowed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -17064,7 +17519,7 @@ def list_configurations( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -17077,6 +17532,8 @@ def list_configurations( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17089,6 +17546,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations.metadata['url'], ) request = _convert_request(request) @@ -17100,6 +17558,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17117,7 +17576,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17131,7 +17594,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config'} # type: ignore + list_configurations.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config"} # type: ignore @distributed_trace def update_application_settings( @@ -17143,7 +17606,7 @@ def update_application_settings( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -17162,6 +17625,7 @@ def update_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -17170,6 +17634,7 @@ def update_application_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings.metadata['url'], @@ -17177,7 +17642,11 @@ def update_application_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17192,7 +17661,7 @@ def update_application_settings( return deserialized - update_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings'} # type: ignore + update_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings"} # type: ignore @distributed_trace @@ -17204,7 +17673,7 @@ def list_application_settings( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -17221,17 +17690,24 @@ def list_application_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_application_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17246,7 +17722,7 @@ def list_application_settings( return deserialized - list_application_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list'} # type: ignore + list_application_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list"} # type: ignore @distributed_trace @@ -17259,7 +17735,7 @@ def update_auth_settings( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -17278,6 +17754,7 @@ def update_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -17286,6 +17763,7 @@ def update_auth_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings.metadata['url'], @@ -17293,7 +17771,11 @@ def update_auth_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17308,7 +17790,7 @@ def update_auth_settings( return deserialized - update_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings'} # type: ignore + update_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings"} # type: ignore @distributed_trace @@ -17320,7 +17802,7 @@ def get_auth_settings( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -17337,17 +17819,24 @@ def get_auth_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17362,7 +17851,7 @@ def get_auth_settings( return deserialized - get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} # type: ignore + get_auth_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list"} # type: ignore @distributed_trace @@ -17374,7 +17863,7 @@ def get_auth_settings_v2_without_secrets( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -17391,17 +17880,24 @@ def get_auth_settings_v2_without_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_v2_without_secrets_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_without_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17416,7 +17912,7 @@ def get_auth_settings_v2_without_secrets( return deserialized - get_auth_settings_v2_without_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + get_auth_settings_v2_without_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -17429,8 +17925,7 @@ def update_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -17449,6 +17944,7 @@ def update_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -17457,6 +17953,7 @@ def update_auth_settings_v2( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2.metadata['url'], @@ -17464,7 +17961,11 @@ def update_auth_settings_v2( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17479,7 +17980,7 @@ def update_auth_settings_v2( return deserialized - update_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -17491,7 +17992,7 @@ def get_auth_settings_v2( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -17508,17 +18009,24 @@ def get_auth_settings_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_v2_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17533,7 +18041,7 @@ def get_auth_settings_v2( return deserialized - get_auth_settings_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -17546,7 +18054,7 @@ def update_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -17566,6 +18074,7 @@ def update_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -17574,6 +18083,7 @@ def update_azure_storage_accounts( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts.metadata['url'], @@ -17581,7 +18091,11 @@ def update_azure_storage_accounts( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17596,7 +18110,7 @@ def update_azure_storage_accounts( return deserialized - update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -17608,7 +18122,7 @@ def list_azure_storage_accounts( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -17625,17 +18139,24 @@ def list_azure_storage_accounts( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_azure_storage_accounts_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17650,7 +18171,7 @@ def list_azure_storage_accounts( return deserialized - list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -17663,7 +18184,7 @@ def update_backup_configuration( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -17682,6 +18203,7 @@ def update_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -17690,6 +18212,7 @@ def update_backup_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration.metadata['url'], @@ -17697,7 +18220,11 @@ def update_backup_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17712,11 +18239,11 @@ def update_backup_configuration( return deserialized - update_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + update_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration( + def delete_backup_configuration( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -17724,7 +18251,7 @@ def delete_backup_configuration( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -17741,17 +18268,24 @@ def delete_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17762,7 +18296,7 @@ def delete_backup_configuration( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup'} # type: ignore + delete_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup"} # type: ignore @distributed_trace @@ -17774,7 +18308,7 @@ def get_backup_configuration( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -17791,17 +18325,24 @@ def get_backup_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_backup_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17816,7 +18357,7 @@ def get_backup_configuration( return deserialized - get_backup_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list'} # type: ignore + get_backup_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list"} # type: ignore @distributed_trace @@ -17828,7 +18369,7 @@ def get_app_settings_key_vault_references( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -17841,6 +18382,8 @@ def get_app_settings_key_vault_references( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17853,6 +18396,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -17864,6 +18408,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -17881,7 +18426,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17895,7 +18444,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings"} # type: ignore @distributed_trace def get_app_setting_key_vault_reference( @@ -17907,7 +18456,7 @@ def get_app_setting_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -17926,18 +18475,25 @@ def get_app_setting_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_app_setting_key_vault_reference_request( resource_group_name=resource_group_name, name=name, app_setting_key=app_setting_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -17952,7 +18508,7 @@ def get_app_setting_key_vault_reference( return deserialized - get_app_setting_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -17964,7 +18520,7 @@ def get_site_connection_string_key_vault_references( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -17977,6 +18533,8 @@ def get_site_connection_string_key_vault_references( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -17989,6 +18547,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references.metadata['url'], ) request = _convert_request(request) @@ -18000,6 +18559,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -18017,7 +18577,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18031,7 +18595,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace def get_site_connection_string_key_vault_reference( @@ -18043,7 +18607,7 @@ def get_site_connection_string_key_vault_reference( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -18062,18 +18626,25 @@ def get_site_connection_string_key_vault_reference( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_connection_string_key_vault_reference_request( resource_group_name=resource_group_name, name=name, connection_string_key=connection_string_key, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18088,7 +18659,7 @@ def get_site_connection_string_key_vault_reference( return deserialized - get_site_connection_string_key_vault_reference.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace @@ -18101,7 +18672,7 @@ def update_connection_strings( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -18120,6 +18691,7 @@ def update_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -18128,6 +18700,7 @@ def update_connection_strings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings.metadata['url'], @@ -18135,7 +18708,11 @@ def update_connection_strings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18150,7 +18727,7 @@ def update_connection_strings( return deserialized - update_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings'} # type: ignore + update_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings"} # type: ignore @distributed_trace @@ -18162,7 +18739,7 @@ def list_connection_strings( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -18179,17 +18756,24 @@ def list_connection_strings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_connection_strings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18204,7 +18788,7 @@ def list_connection_strings( return deserialized - list_connection_strings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list'} # type: ignore + list_connection_strings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -18216,7 +18800,7 @@ def get_diagnostic_logs_configuration( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -18233,17 +18817,24 @@ def get_diagnostic_logs_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_diagnostic_logs_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18258,7 +18849,7 @@ def get_diagnostic_logs_configuration( return deserialized - get_diagnostic_logs_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + get_diagnostic_logs_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -18271,7 +18862,7 @@ def update_diagnostic_logs_config( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -18291,6 +18882,7 @@ def update_diagnostic_logs_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -18299,6 +18891,7 @@ def update_diagnostic_logs_config( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config.metadata['url'], @@ -18306,7 +18899,11 @@ def update_diagnostic_logs_config( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18321,7 +18918,7 @@ def update_diagnostic_logs_config( return deserialized - update_diagnostic_logs_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs'} # type: ignore + update_diagnostic_logs_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs"} # type: ignore @distributed_trace @@ -18334,7 +18931,7 @@ def update_metadata( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -18353,6 +18950,7 @@ def update_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -18361,6 +18959,7 @@ def update_metadata( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata.metadata['url'], @@ -18368,7 +18967,11 @@ def update_metadata( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18383,7 +18986,7 @@ def update_metadata( return deserialized - update_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata'} # type: ignore + update_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata"} # type: ignore @distributed_trace @@ -18395,7 +18998,7 @@ def list_metadata( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -18412,17 +19015,24 @@ def list_metadata( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_metadata_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18437,7 +19047,7 @@ def list_metadata( return deserialized - list_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list'} # type: ignore + list_metadata.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list"} # type: ignore def _list_publishing_credentials_initial( @@ -18452,17 +19062,24 @@ def _list_publishing_credentials_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_publishing_credentials_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18476,7 +19093,7 @@ def _list_publishing_credentials_initial( return deserialized - _list_publishing_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -18488,7 +19105,7 @@ def begin_list_publishing_credentials( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -18506,7 +19123,8 @@ def begin_list_publishing_credentials( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -18517,6 +19135,7 @@ def begin_list_publishing_credentials( raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, name=name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -18540,10 +19159,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings( @@ -18555,7 +19173,7 @@ def update_site_push_settings( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -18574,6 +19192,7 @@ def update_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -18582,6 +19201,7 @@ def update_site_push_settings( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings.metadata['url'], @@ -18589,7 +19209,11 @@ def update_site_push_settings( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18604,7 +19228,7 @@ def update_site_push_settings( return deserialized - update_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings'} # type: ignore + update_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings"} # type: ignore @distributed_trace @@ -18616,7 +19240,7 @@ def list_site_push_settings( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -18633,17 +19257,24 @@ def list_site_push_settings( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_site_push_settings_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18658,7 +19289,7 @@ def list_site_push_settings( return deserialized - list_site_push_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list'} # type: ignore + list_site_push_settings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -18670,8 +19301,7 @@ def list_slot_configuration_names( ) -> "_models.SlotConfigNamesResource": """Gets the names of app settings and connection strings that stick to the slot (not swapped). - Description for Gets the names of app settings and connection strings that stick to the slot - (not swapped). + 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 @@ -18688,17 +19318,24 @@ def list_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_slot_configuration_names_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slot_configuration_names.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18713,7 +19350,7 @@ def list_slot_configuration_names( return deserialized - list_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + list_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -18727,8 +19364,8 @@ def update_slot_configuration_names( """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. + 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 @@ -18747,6 +19384,7 @@ def update_slot_configuration_names( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_config_names, 'SlotConfigNamesResource') @@ -18755,6 +19393,7 @@ def update_slot_configuration_names( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot_configuration_names.metadata['url'], @@ -18762,7 +19401,11 @@ def update_slot_configuration_names( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18777,7 +19420,7 @@ def update_slot_configuration_names( return deserialized - update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} # type: ignore + update_slot_configuration_names.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames"} # type: ignore @distributed_trace @@ -18790,8 +19433,8 @@ def get_configuration( """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. + 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 @@ -18808,17 +19451,24 @@ def get_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_configuration_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18833,7 +19483,7 @@ def get_configuration( return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + get_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18846,7 +19496,7 @@ def create_or_update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -18865,6 +19515,7 @@ def create_or_update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -18873,6 +19524,7 @@ def create_or_update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration.metadata['url'], @@ -18880,7 +19532,11 @@ def create_or_update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18895,7 +19551,7 @@ def create_or_update_configuration( return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + create_or_update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18908,7 +19564,7 @@ def update_configuration( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -18927,6 +19583,7 @@ def update_configuration( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -18935,6 +19592,7 @@ def update_configuration( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration.metadata['url'], @@ -18942,7 +19600,11 @@ def update_configuration( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -18957,7 +19619,7 @@ def update_configuration( return deserialized - update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} # type: ignore + update_configuration.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web"} # type: ignore @distributed_trace @@ -18970,8 +19632,8 @@ def list_configuration_snapshot_info( """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. + 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 @@ -18984,6 +19646,8 @@ def list_configuration_snapshot_info( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -18996,6 +19660,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info.metadata['url'], ) request = _convert_request(request) @@ -19007,6 +19672,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19024,7 +19690,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19038,7 +19708,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot( @@ -19050,7 +19720,7 @@ def get_configuration_snapshot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -19069,18 +19739,25 @@ def get_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19095,11 +19772,11 @@ def get_configuration_snapshot( return deserialized - get_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot( + def recover_site_configuration_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19108,7 +19785,7 @@ def recover_site_configuration_snapshot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -19127,18 +19804,25 @@ def recover_site_configuration_snapshot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_recover_site_configuration_snapshot_request( resource_group_name=resource_group_name, name=name, snapshot_id=snapshot_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -19149,7 +19833,7 @@ def recover_site_configuration_snapshot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -19161,7 +19845,7 @@ def get_web_site_container_logs( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -19178,17 +19862,24 @@ def get_web_site_container_logs( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_web_site_container_logs_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19204,7 +19895,7 @@ def get_web_site_container_logs( return deserialized - get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} # type: ignore + get_web_site_container_logs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs"} # type: ignore @distributed_trace @@ -19216,7 +19907,7 @@ def get_container_logs_zip( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -19233,17 +19924,24 @@ def get_container_logs_zip( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_container_logs_zip_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19259,7 +19957,7 @@ def get_container_logs_zip( return deserialized - get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -19271,7 +19969,7 @@ def list_continuous_web_jobs( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -19284,6 +19982,8 @@ def list_continuous_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19296,6 +19996,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -19307,6 +20008,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19324,7 +20026,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19338,7 +20044,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job( @@ -19350,7 +20056,7 @@ def get_continuous_web_job( ) -> "_models.ContinuousWebJob": """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -19369,18 +20075,25 @@ def get_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19395,11 +20108,11 @@ def get_continuous_web_job( return deserialized - get_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job( + def delete_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19408,7 +20121,7 @@ def delete_continuous_web_job( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -19427,18 +20140,25 @@ def delete_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19449,11 +20169,11 @@ def delete_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job( + def start_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19462,7 +20182,7 @@ def start_continuous_web_job( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -19481,18 +20201,25 @@ def start_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19503,11 +20230,11 @@ def start_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job( + def stop_continuous_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19516,7 +20243,7 @@ def stop_continuous_web_job( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -19535,18 +20262,25 @@ def stop_continuous_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_continuous_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19557,7 +20291,7 @@ def stop_continuous_web_job( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -19569,7 +20303,7 @@ def list_deployments( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -19581,6 +20315,8 @@ def list_deployments( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19593,6 +20329,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments.metadata['url'], ) request = _convert_request(request) @@ -19604,6 +20341,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -19621,7 +20359,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19635,7 +20377,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments'} # type: ignore + list_deployments.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments"} # type: ignore @distributed_trace def get_deployment( @@ -19647,7 +20389,7 @@ def get_deployment( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -19666,18 +20408,25 @@ def get_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19692,7 +20441,7 @@ def get_deployment( return deserialized - get_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + get_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -19706,7 +20455,7 @@ def create_deployment( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -19727,6 +20476,7 @@ def create_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -19736,6 +20486,7 @@ def create_deployment( name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment.metadata['url'], @@ -19743,7 +20494,11 @@ def create_deployment( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19758,11 +20513,11 @@ def create_deployment( return deserialized - create_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + create_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment( + def delete_deployment( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -19771,7 +20526,7 @@ def delete_deployment( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -19790,18 +20545,25 @@ def delete_deployment( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_deployment_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -19812,7 +20574,7 @@ def delete_deployment( if cls: return cls(pipeline_response, None, {}) - delete_deployment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}'} # type: ignore + delete_deployment.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}"} # type: ignore @distributed_trace @@ -19825,7 +20587,7 @@ def list_deployment_log( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -19845,18 +20607,25 @@ def list_deployment_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_deployment_log_request( resource_group_name=resource_group_name, name=name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19871,7 +20640,7 @@ def list_deployment_log( return deserialized - list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} # type: ignore + list_deployment_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -19885,8 +20654,8 @@ def discover_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. - 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. + 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 @@ -19906,6 +20675,7 @@ def discover_backup( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -19914,6 +20684,7 @@ def discover_backup( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup.metadata['url'], @@ -19921,7 +20692,11 @@ def discover_backup( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -19936,7 +20711,7 @@ def discover_backup( return deserialized - discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} # type: ignore + discover_backup.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup"} # type: ignore @distributed_trace @@ -19948,7 +20723,7 @@ def list_domain_ownership_identifiers( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -19960,6 +20735,8 @@ def list_domain_ownership_identifiers( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -19972,6 +20749,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers.metadata['url'], ) request = _convert_request(request) @@ -19983,6 +20761,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20000,7 +20779,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20014,7 +20797,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier( @@ -20026,7 +20809,7 @@ def get_domain_ownership_identifier( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -20045,18 +20828,25 @@ def get_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20071,7 +20861,7 @@ def get_domain_ownership_identifier( return deserialized - get_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -20085,8 +20875,7 @@ def create_or_update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -20107,6 +20896,7 @@ def create_or_update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -20116,6 +20906,7 @@ def create_or_update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier.metadata['url'], @@ -20123,7 +20914,11 @@ def create_or_update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20138,11 +20933,11 @@ def create_or_update_domain_ownership_identifier( return deserialized - create_or_update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier( + def delete_domain_ownership_identifier( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20151,7 +20946,7 @@ def delete_domain_ownership_identifier( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -20170,18 +20965,25 @@ def delete_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_domain_ownership_identifier_request( resource_group_name=resource_group_name, name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -20192,7 +20994,7 @@ def delete_domain_ownership_identifier( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -20206,8 +21008,7 @@ def update_domain_ownership_identifier( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -20228,6 +21029,7 @@ def update_domain_ownership_identifier( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -20237,6 +21039,7 @@ def update_domain_ownership_identifier( name=name, domain_ownership_identifier_name=domain_ownership_identifier_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier.metadata['url'], @@ -20244,7 +21047,11 @@ def update_domain_ownership_identifier( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20259,7 +21066,7 @@ def update_domain_ownership_identifier( return deserialized - update_domain_ownership_identifier.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -20271,7 +21078,7 @@ def get_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -20288,17 +21095,24 @@ def get_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20313,7 +21127,7 @@ def get_ms_deploy_status( return deserialized - get_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_initial( @@ -20329,6 +21143,7 @@ def _create_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -20337,6 +21152,7 @@ def _create_ms_deploy_operation_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_initial.metadata['url'], @@ -20344,7 +21160,11 @@ def _create_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -20358,7 +21178,7 @@ def _create_ms_deploy_operation_initial( return deserialized - _create_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -20371,7 +21191,7 @@ def begin_create_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -20392,8 +21212,9 @@ def begin_create_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -20405,6 +21226,7 @@ def begin_create_ms_deploy_operation( resource_group_name=resource_group_name, name=name, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20429,10 +21251,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log( @@ -20443,7 +21264,7 @@ def get_ms_deploy_log( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -20460,17 +21281,24 @@ def get_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20485,7 +21313,7 @@ def get_ms_deploy_log( return deserialized - get_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -20497,8 +21325,7 @@ def get_one_deploy_status( ) -> Any: """Invoke onedeploy status API /api/deployments and gets the deployment status for the site. - Description for Invoke onedeploy status API /api/deployments and gets the deployment status for - the site. + Invoke onedeploy status API /api/deployments and gets the deployment status for the site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20515,17 +21342,24 @@ def get_one_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_one_deploy_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_one_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20540,7 +21374,7 @@ def get_one_deploy_status( return deserialized - get_one_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy'} # type: ignore + get_one_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy"} # type: ignore @distributed_trace @@ -20552,7 +21386,7 @@ def create_one_deploy_operation( ) -> Any: """Invoke the OneDeploy publish web app extension. - Description for Invoke the OneDeploy publish web app extension. + Invoke the OneDeploy publish web app extension. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -20569,17 +21403,24 @@ def create_one_deploy_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_create_one_deploy_operation_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.create_one_deploy_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20594,7 +21435,7 @@ def create_one_deploy_operation( return deserialized - create_one_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy'} # type: ignore + create_one_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy"} # type: ignore @distributed_trace @@ -20606,7 +21447,7 @@ def list_functions( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -20619,6 +21460,8 @@ def list_functions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -20631,6 +21474,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_functions.metadata['url'], ) request = _convert_request(request) @@ -20642,6 +21486,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -20659,7 +21504,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20673,7 +21522,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions'} # type: ignore + list_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions"} # type: ignore @distributed_trace def get_functions_admin_token( @@ -20684,7 +21533,7 @@ def get_functions_admin_token( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -20701,17 +21550,24 @@ def get_functions_admin_token( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_functions_admin_token_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20726,7 +21582,7 @@ def get_functions_admin_token( return deserialized - get_functions_admin_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token'} # type: ignore + get_functions_admin_token.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token"} # type: ignore @distributed_trace @@ -20739,7 +21595,7 @@ def get_function( ) -> "_models.FunctionEnvelope": """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -20758,18 +21614,25 @@ def get_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -20784,7 +21647,7 @@ def get_function( return deserialized - get_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + get_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore def _create_function_initial( @@ -20801,6 +21664,7 @@ def _create_function_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -20810,6 +21674,7 @@ def _create_function_initial( name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_function_initial.metadata['url'], @@ -20817,7 +21682,11 @@ def _create_function_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -20831,7 +21700,7 @@ def _create_function_initial( return deserialized - _create_function_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + _create_function_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -20845,7 +21714,7 @@ def begin_create_function( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -20868,8 +21737,9 @@ def begin_create_function( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -20882,6 +21752,7 @@ def begin_create_function( name=name, function_name=function_name, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -20906,13 +21777,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + begin_create_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_function( + def delete_function( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -20921,7 +21791,7 @@ def delete_function( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -20940,18 +21810,25 @@ def delete_function( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_function_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -20962,7 +21839,7 @@ def delete_function( if cls: return cls(pipeline_response, None, {}) - delete_function.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}'} # type: ignore + delete_function.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}"} # type: ignore @distributed_trace @@ -20977,7 +21854,7 @@ def create_or_update_function_secret( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -21000,6 +21877,7 @@ def create_or_update_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -21010,6 +21888,7 @@ def create_or_update_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret.metadata['url'], @@ -21017,7 +21896,11 @@ def create_or_update_function_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -21036,11 +21919,11 @@ def create_or_update_function_secret( return deserialized - create_or_update_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret( + def delete_function_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21050,7 +21933,7 @@ def delete_function_secret( ) -> None: """Delete a function secret. - Description for 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 @@ -21071,6 +21954,8 @@ def delete_function_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_function_secret_request( resource_group_name=resource_group_name, @@ -21078,12 +21963,17 @@ def delete_function_secret( function_name=function_name, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21094,7 +21984,7 @@ def delete_function_secret( if cls: return cls(pipeline_response, None, {}) - delete_function_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -21107,7 +21997,7 @@ def list_function_keys( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -21126,18 +22016,25 @@ def list_function_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_function_keys_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21152,7 +22049,7 @@ def list_function_keys( return deserialized - list_function_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -21165,7 +22062,7 @@ def list_function_secrets( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -21184,18 +22081,25 @@ def list_function_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_function_secrets_request( resource_group_name=resource_group_name, name=name, function_name=function_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21210,7 +22114,7 @@ def list_function_secrets( return deserialized - list_function_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -21222,7 +22126,7 @@ def list_host_keys( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -21239,17 +22143,24 @@ def list_host_keys( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_host_keys_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21264,11 +22175,11 @@ def list_host_keys( return deserialized - list_host_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys'} # type: ignore + list_host_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status( + def list_sync_status( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21276,7 +22187,7 @@ def list_sync_status( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -21293,17 +22204,24 @@ def list_sync_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_sync_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21314,11 +22232,11 @@ def list_sync_status( if cls: return cls(pipeline_response, None, {}) - list_sync_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus'} # type: ignore + list_sync_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions( + def sync_functions( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21326,7 +22244,7 @@ def sync_functions( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -21343,17 +22261,24 @@ def sync_functions( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_functions_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21364,7 +22289,7 @@ def sync_functions( if cls: return cls(pipeline_response, None, {}) - sync_functions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync'} # type: ignore + sync_functions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/sync"} # type: ignore @distributed_trace @@ -21379,7 +22304,7 @@ def create_or_update_host_secret( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -21402,6 +22327,7 @@ def create_or_update_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -21412,6 +22338,7 @@ def create_or_update_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret.metadata['url'], @@ -21419,7 +22346,11 @@ def create_or_update_host_secret( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -21438,11 +22369,11 @@ def create_or_update_host_secret( return deserialized - create_or_update_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret( + def delete_host_secret( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21452,7 +22383,7 @@ def delete_host_secret( ) -> None: """Delete a host level secret. - Description for 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 @@ -21473,6 +22404,8 @@ def delete_host_secret( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_host_secret_request( resource_group_name=resource_group_name, @@ -21480,12 +22413,17 @@ def delete_host_secret( key_type=key_type, key_name=key_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -21496,7 +22434,7 @@ def delete_host_secret( if cls: return cls(pipeline_response, None, {}) - delete_host_secret.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -21508,7 +22446,7 @@ def list_host_name_bindings( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -21521,6 +22459,8 @@ def list_host_name_bindings( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -21533,6 +22473,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings.metadata['url'], ) request = _convert_request(request) @@ -21544,6 +22485,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -21561,7 +22503,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21575,7 +22521,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings'} # type: ignore + list_host_name_bindings.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding( @@ -21587,7 +22533,7 @@ def get_host_name_binding( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -21606,18 +22552,25 @@ def get_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21632,7 +22585,7 @@ def get_host_name_binding( return deserialized - get_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -21646,7 +22599,7 @@ def create_or_update_host_name_binding( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -21668,6 +22621,7 @@ def create_or_update_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -21677,6 +22631,7 @@ def create_or_update_host_name_binding( name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding.metadata['url'], @@ -21684,7 +22639,11 @@ def create_or_update_host_name_binding( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21699,11 +22658,11 @@ def create_or_update_host_name_binding( return deserialized - create_or_update_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding( + def delete_host_name_binding( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21712,7 +22671,7 @@ def delete_host_name_binding( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -21731,18 +22690,25 @@ def delete_host_name_binding( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_host_name_binding_request( resource_group_name=resource_group_name, name=name, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -21753,7 +22719,7 @@ def delete_host_name_binding( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -21767,7 +22733,7 @@ def get_hybrid_connection( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -21788,6 +22754,8 @@ def get_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hybrid_connection_request( resource_group_name=resource_group_name, @@ -21795,12 +22763,17 @@ def get_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21815,7 +22788,7 @@ def get_hybrid_connection( return deserialized - get_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21830,7 +22803,7 @@ def create_or_update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -21853,6 +22826,7 @@ def create_or_update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -21863,6 +22837,7 @@ def create_or_update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection.metadata['url'], @@ -21870,7 +22845,11 @@ def create_or_update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21885,11 +22864,11 @@ def create_or_update_hybrid_connection( return deserialized - create_or_update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection( + def delete_hybrid_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -21899,7 +22878,7 @@ def delete_hybrid_connection( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -21920,6 +22899,8 @@ def delete_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_hybrid_connection_request( resource_group_name=resource_group_name, @@ -21927,12 +22908,17 @@ def delete_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -21943,7 +22929,7 @@ def delete_hybrid_connection( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -21958,7 +22944,7 @@ def update_hybrid_connection( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -21981,6 +22967,7 @@ def update_hybrid_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -21991,6 +22978,7 @@ def update_hybrid_connection( namespace_name=namespace_name, relay_name=relay_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection.metadata['url'], @@ -21998,7 +22986,11 @@ def update_hybrid_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22013,7 +23005,7 @@ def update_hybrid_connection( return deserialized - update_hybrid_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -22025,7 +23017,7 @@ def list_hybrid_connections( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -22042,17 +23034,24 @@ def list_hybrid_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_hybrid_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22067,7 +23066,7 @@ def list_hybrid_connections( return deserialized - list_hybrid_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -22079,8 +23078,7 @@ def list_relay_service_connections( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -22097,17 +23095,24 @@ def list_relay_service_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_relay_service_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22122,7 +23127,7 @@ def list_relay_service_connections( return deserialized - list_relay_service_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection'} # type: ignore + list_relay_service_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection"} # type: ignore @distributed_trace @@ -22135,7 +23140,7 @@ def get_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -22154,18 +23159,25 @@ def get_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22180,7 +23192,7 @@ def get_relay_service_connection( return deserialized - get_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -22194,8 +23206,7 @@ def create_or_update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -22216,6 +23227,7 @@ def create_or_update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -22225,6 +23237,7 @@ def create_or_update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection.metadata['url'], @@ -22232,7 +23245,11 @@ def create_or_update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22247,11 +23264,11 @@ def create_or_update_relay_service_connection( return deserialized - create_or_update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection( + def delete_relay_service_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22260,7 +23277,7 @@ def delete_relay_service_connection( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -22279,18 +23296,25 @@ def delete_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_relay_service_connection_request( resource_group_name=resource_group_name, name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22301,7 +23325,7 @@ def delete_relay_service_connection( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -22315,8 +23339,7 @@ def update_relay_service_connection( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -22337,6 +23360,7 @@ def update_relay_service_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -22346,6 +23370,7 @@ def update_relay_service_connection( name=name, entity_name=entity_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection.metadata['url'], @@ -22353,7 +23378,11 @@ def update_relay_service_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22368,7 +23397,7 @@ def update_relay_service_connection( return deserialized - update_relay_service_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -22380,7 +23409,7 @@ def list_instance_identifiers( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -22393,6 +23422,8 @@ def list_instance_identifiers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22405,6 +23436,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers.metadata['url'], ) request = _convert_request(request) @@ -22416,6 +23448,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22433,7 +23466,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22447,7 +23484,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances'} # type: ignore + list_instance_identifiers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances"} # type: ignore @distributed_trace def get_instance_info( @@ -22459,7 +23496,7 @@ def get_instance_info( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -22478,18 +23515,25 @@ def get_instance_info( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_info_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22504,7 +23548,7 @@ def get_instance_info( return deserialized - get_instance_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}'} # type: ignore + get_instance_info.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -22517,7 +23561,7 @@ def get_instance_ms_deploy_status( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -22536,18 +23580,25 @@ def get_instance_ms_deploy_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_ms_deploy_status_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22562,7 +23613,7 @@ def get_instance_ms_deploy_status( return deserialized - get_instance_ms_deploy_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_initial( @@ -22579,6 +23630,7 @@ def _create_instance_ms_deploy_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -22588,6 +23640,7 @@ def _create_instance_ms_deploy_operation_initial( name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_initial.metadata['url'], @@ -22595,7 +23648,11 @@ def _create_instance_ms_deploy_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -22609,7 +23666,7 @@ def _create_instance_ms_deploy_operation_initial( return deserialized - _create_instance_ms_deploy_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -22623,7 +23680,7 @@ def begin_create_instance_ms_deploy_operation( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -22646,8 +23703,9 @@ def begin_create_instance_ms_deploy_operation( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -22660,6 +23718,7 @@ def begin_create_instance_ms_deploy_operation( name=name, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -22684,10 +23743,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log( @@ -22699,7 +23757,7 @@ def get_instance_ms_deploy_log( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -22718,18 +23776,25 @@ def get_instance_ms_deploy_log( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_ms_deploy_log_request( resource_group_name=resource_group_name, name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22744,7 +23809,7 @@ def get_instance_ms_deploy_log( return deserialized - get_instance_ms_deploy_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -22758,8 +23823,8 @@ def list_instance_processes( """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. + 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 @@ -22774,6 +23839,8 @@ def list_instance_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -22787,6 +23854,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes.metadata['url'], ) request = _convert_request(request) @@ -22799,6 +23867,7 @@ def prepare_request(next_link=None): name=name, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -22816,7 +23885,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22830,7 +23903,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process( @@ -22843,8 +23916,7 @@ def get_instance_process( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -22866,6 +23938,8 @@ def get_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_request( resource_group_name=resource_group_name, @@ -22873,12 +23947,17 @@ def get_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -22893,11 +23972,11 @@ def get_instance_process( return deserialized - get_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process( + def delete_instance_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -22908,8 +23987,8 @@ def delete_instance_process( """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. + 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 @@ -22931,6 +24010,8 @@ def delete_instance_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_instance_process_request( resource_group_name=resource_group_name, @@ -22938,12 +24019,17 @@ def delete_instance_process( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -22954,7 +24040,7 @@ def delete_instance_process( if cls: return cls(pipeline_response, None, {}) - delete_instance_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -22968,8 +24054,7 @@ def get_instance_process_dump( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -22991,6 +24076,8 @@ def get_instance_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_dump_request( resource_group_name=resource_group_name, @@ -22998,12 +24085,17 @@ def get_instance_process_dump( process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23018,7 +24110,7 @@ def get_instance_process_dump( return deserialized - get_instance_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -23033,8 +24125,8 @@ def list_instance_process_modules( """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. + 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 @@ -23052,6 +24144,8 @@ def list_instance_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23066,6 +24160,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules.metadata['url'], ) request = _convert_request(request) @@ -23079,6 +24174,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23096,7 +24192,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23110,7 +24210,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module( @@ -23124,8 +24224,7 @@ def get_instance_process_module( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -23149,6 +24248,8 @@ def get_instance_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_module_request( resource_group_name=resource_group_name, @@ -23157,12 +24258,17 @@ def get_instance_process_module( base_address=base_address, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23177,7 +24283,7 @@ def get_instance_process_module( return deserialized - get_instance_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -23191,8 +24297,7 @@ def list_instance_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -23210,6 +24315,8 @@ def list_instance_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23224,6 +24331,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads.metadata['url'], ) request = _convert_request(request) @@ -23237,6 +24345,7 @@ def prepare_request(next_link=None): process_id=process_id, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23254,7 +24363,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23268,7 +24381,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable( @@ -23279,7 +24392,7 @@ def is_cloneable( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -23296,17 +24409,24 @@ def is_cloneable( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_is_cloneable_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23321,7 +24441,7 @@ def is_cloneable( return deserialized - is_cloneable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable'} # type: ignore + is_cloneable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable"} # type: ignore @distributed_trace @@ -23333,7 +24453,7 @@ def list_site_backups( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -23345,6 +24465,8 @@ def list_site_backups( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -23357,6 +24479,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups.metadata['url'], ) request = _convert_request(request) @@ -23368,6 +24491,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -23385,7 +24509,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23399,7 +24527,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups'} # type: ignore + list_site_backups.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers( @@ -23410,7 +24538,7 @@ def list_sync_function_triggers( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -23427,17 +24555,24 @@ def list_sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23452,7 +24587,7 @@ def list_sync_function_triggers( return deserialized - list_sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus"} # type: ignore def _migrate_storage_initial( @@ -23469,6 +24604,7 @@ def _migrate_storage_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_options, 'StorageMigrationOptions') @@ -23477,6 +24613,7 @@ def _migrate_storage_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, subscription_name=subscription_name, json=_json, @@ -23485,7 +24622,11 @@ def _migrate_storage_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23499,7 +24640,7 @@ def _migrate_storage_initial( return deserialized - _migrate_storage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + _migrate_storage_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore @distributed_trace @@ -23513,7 +24654,7 @@ def begin_migrate_storage( ) -> LROPoller["_models.StorageMigrationResponse"]: """Restores a web app. - Description for Restores a web app. + Restores a web app. :param subscription_name: Azure subscription. :type subscription_name: str @@ -23537,8 +24678,9 @@ def begin_migrate_storage( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.StorageMigrationResponse] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.StorageMigrationResponse"] lro_delay = kwargs.pop( 'polling_interval', @@ -23551,6 +24693,7 @@ def begin_migrate_storage( resource_group_name=resource_group_name, name=name, migration_options=migration_options, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23575,10 +24718,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_storage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate'} # type: ignore + begin_migrate_storage.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate"} # type: ignore def _migrate_my_sql_initial( self, @@ -23593,6 +24735,7 @@ def _migrate_my_sql_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') @@ -23601,6 +24744,7 @@ def _migrate_my_sql_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._migrate_my_sql_initial.metadata['url'], @@ -23608,7 +24752,11 @@ def _migrate_my_sql_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23622,7 +24770,7 @@ def _migrate_my_sql_initial( return deserialized - _migrate_my_sql_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + _migrate_my_sql_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace @@ -23635,7 +24783,7 @@ def begin_migrate_my_sql( ) -> LROPoller["_models.Operation"]: """Migrates a local (in-app) MySql database to a remote MySql database. - Description for Migrates a local (in-app) MySql database to a remote MySql database. + 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 @@ -23655,8 +24803,9 @@ def begin_migrate_my_sql( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.Operation] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Operation"] lro_delay = kwargs.pop( 'polling_interval', @@ -23668,6 +24817,7 @@ def begin_migrate_my_sql( resource_group_name=resource_group_name, name=name, migration_request_envelope=migration_request_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -23692,10 +24842,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_migrate_my_sql.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql'} # type: ignore + begin_migrate_my_sql.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql"} # type: ignore @distributed_trace def get_migrate_my_sql_status( @@ -23707,8 +24856,8 @@ def get_migrate_my_sql_status( """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. + 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 @@ -23725,17 +24874,24 @@ def get_migrate_my_sql_status( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_migrate_my_sql_status_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23750,7 +24906,7 @@ def get_migrate_my_sql_status( return deserialized - get_migrate_my_sql_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status"} # type: ignore @distributed_trace @@ -23762,7 +24918,7 @@ def get_swift_virtual_network_connection( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -23779,17 +24935,24 @@ def get_swift_virtual_network_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_swift_virtual_network_connection_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23804,7 +24967,7 @@ def get_swift_virtual_network_connection( return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23820,9 +24983,9 @@ def create_or_update_swift_virtual_network_connection_with_check( 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 + 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. @@ -23842,6 +25005,7 @@ def create_or_update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -23850,6 +25014,7 @@ def create_or_update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check.metadata['url'], @@ -23857,7 +25022,11 @@ def create_or_update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23872,11 +25041,11 @@ def create_or_update_swift_virtual_network_connection_with_check( return deserialized - create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network( + def delete_swift_virtual_network( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -23884,7 +25053,7 @@ def delete_swift_virtual_network( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -23901,17 +25070,24 @@ def delete_swift_virtual_network( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_swift_virtual_network_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23922,7 +25098,7 @@ def delete_swift_virtual_network( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -23938,9 +25114,9 @@ def update_swift_virtual_network_connection_with_check( 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 + 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. @@ -23960,6 +25136,7 @@ def update_swift_virtual_network_connection_with_check( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -23968,6 +25145,7 @@ def update_swift_virtual_network_connection_with_check( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_with_check.metadata['url'], @@ -23975,7 +25153,11 @@ def update_swift_virtual_network_connection_with_check( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -23990,7 +25172,7 @@ def update_swift_virtual_network_connection_with_check( return deserialized - update_swift_virtual_network_connection_with_check.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_with_check.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -24003,7 +25185,7 @@ def list_network_features( ) -> "_models.NetworkFeatures": """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -24022,18 +25204,25 @@ def list_network_features( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_network_features_request( resource_group_name=resource_group_name, name=name, view=view, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24048,7 +25237,7 @@ def list_network_features( return deserialized - list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} # type: ignore + list_network_features.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -24061,8 +25250,7 @@ def get_network_trace_operation( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24081,18 +25269,25 @@ def get_network_trace_operation( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_trace_operation_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24111,7 +25306,7 @@ def get_network_trace_operation( return deserialized - get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -24126,17 +25321,17 @@ def start_web_site_network_trace( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -24149,11 +25344,14 @@ def start_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -24162,7 +25360,11 @@ def start_web_site_network_trace( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24177,7 +25379,7 @@ def start_web_site_network_trace( return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} # type: ignore + start_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_initial( @@ -24195,11 +25397,14 @@ def _start_web_site_network_trace_operation_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_web_site_network_trace_operation_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -24208,7 +25413,11 @@ def _start_web_site_network_trace_operation_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24226,7 +25435,7 @@ def _start_web_site_network_trace_operation_initial( return deserialized - _start_web_site_network_trace_operation_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -24241,17 +25450,17 @@ def begin_start_web_site_network_trace_operation( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -24266,7 +25475,8 @@ def begin_start_web_site_network_trace_operation( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_03_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -24280,6 +25490,7 @@ def begin_start_web_site_network_trace_operation( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -24303,13 +25514,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace( + def stop_web_site_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24317,7 +25527,7 @@ def stop_web_site_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -24334,17 +25544,24 @@ def stop_web_site_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_web_site_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24355,7 +25572,7 @@ def stop_web_site_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop"} # type: ignore @distributed_trace @@ -24368,8 +25585,7 @@ def get_network_traces( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24388,18 +25604,25 @@ def get_network_traces( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_traces_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24414,7 +25637,7 @@ def get_network_traces( return deserialized - get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} # type: ignore + get_network_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -24427,8 +25650,7 @@ def get_network_trace_operation_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24447,18 +25669,25 @@ def get_network_trace_operation_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_trace_operation_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -24477,7 +25706,7 @@ def get_network_trace_operation_v2( return deserialized - get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -24490,8 +25719,7 @@ def get_network_traces_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -24510,18 +25738,25 @@ def get_network_traces_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_traces_v2_request( resource_group_name=resource_group_name, name=name, operation_id=operation_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24536,11 +25771,11 @@ def get_network_traces_v2( return deserialized - get_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} # type: ignore + get_network_traces_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password( + def generate_new_site_publishing_password( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24548,8 +25783,7 @@ def generate_new_site_publishing_password( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -24566,17 +25800,24 @@ def generate_new_site_publishing_password( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_generate_new_site_publishing_password_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -24587,7 +25828,7 @@ def generate_new_site_publishing_password( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} # type: ignore + generate_new_site_publishing_password.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword"} # type: ignore @distributed_trace @@ -24600,7 +25841,7 @@ def list_perf_mon_counters( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -24608,7 +25849,7 @@ def list_perf_mon_counters( :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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -24617,6 +25858,8 @@ def list_perf_mon_counters( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -24629,6 +25872,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters.metadata['url'], ) @@ -24641,6 +25885,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -24659,7 +25904,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24673,7 +25922,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} # type: ignore + list_perf_mon_counters.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag( @@ -24684,7 +25933,7 @@ def get_site_php_error_log_flag( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -24701,17 +25950,24 @@ def get_site_php_error_log_flag( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_php_error_log_flag_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24726,7 +25982,7 @@ def get_site_php_error_log_flag( return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} # type: ignore + get_site_php_error_log_flag.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging"} # type: ignore @distributed_trace @@ -24738,7 +25994,7 @@ def list_premier_add_ons( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -24755,17 +26011,24 @@ def list_premier_add_ons( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_premier_add_ons_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24780,7 +26043,7 @@ def list_premier_add_ons( return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} # type: ignore + list_premier_add_ons.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons"} # type: ignore @distributed_trace @@ -24793,7 +26056,7 @@ def get_premier_add_on( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -24812,18 +26075,25 @@ def get_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24838,7 +26108,7 @@ def get_premier_add_on( return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24852,7 +26122,7 @@ def add_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -24873,6 +26143,7 @@ def add_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -24882,6 +26153,7 @@ def add_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on.metadata['url'], @@ -24889,7 +26161,11 @@ def add_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24904,11 +26180,11 @@ def add_premier_add_on( return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on( + def delete_premier_add_on( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -24917,7 +26193,7 @@ def delete_premier_add_on( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -24936,18 +26212,25 @@ def delete_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_premier_add_on_request( resource_group_name=resource_group_name, name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -24958,7 +26241,7 @@ def delete_premier_add_on( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -24972,7 +26255,7 @@ def update_premier_add_on( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -24993,6 +26276,7 @@ def update_premier_add_on( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -25002,6 +26286,7 @@ def update_premier_add_on( name=name, premier_add_on_name=premier_add_on_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on.metadata['url'], @@ -25009,7 +26294,11 @@ def update_premier_add_on( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25024,7 +26313,7 @@ def update_premier_add_on( return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -25037,8 +26326,8 @@ def get_private_access( """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. + 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 @@ -25055,17 +26344,24 @@ def get_private_access( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_access_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25080,7 +26376,7 @@ def get_private_access( return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + get_private_access.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -25094,8 +26390,8 @@ def put_private_access_vnet( """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. + 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 @@ -25114,6 +26410,7 @@ def put_private_access_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -25122,6 +26419,7 @@ def put_private_access_vnet( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet.metadata['url'], @@ -25129,7 +26427,11 @@ def put_private_access_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25144,7 +26446,7 @@ def put_private_access_vnet( return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -25156,7 +26458,7 @@ def get_private_endpoint_connection_list( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -25169,6 +26471,8 @@ def get_private_endpoint_connection_list( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25181,6 +26485,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list.metadata['url'], ) request = _convert_request(request) @@ -25192,6 +26497,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25209,7 +26515,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25223,7 +26533,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection( @@ -25235,7 +26545,7 @@ def get_private_endpoint_connection( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25254,18 +26564,25 @@ def get_private_endpoint_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_endpoint_connection_request( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25280,7 +26597,7 @@ def get_private_endpoint_connection( return deserialized - get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_initial( @@ -25297,6 +26614,7 @@ def _approve_or_reject_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -25306,6 +26624,7 @@ def _approve_or_reject_private_endpoint_connection_initial( name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_initial.metadata['url'], @@ -25313,7 +26632,11 @@ def _approve_or_reject_private_endpoint_connection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -25331,7 +26654,7 @@ def _approve_or_reject_private_endpoint_connection_initial( return deserialized - _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -25345,7 +26668,7 @@ def begin_approve_or_reject_private_endpoint_connection( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -25370,8 +26693,9 @@ def begin_approve_or_reject_private_endpoint_connection( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -25384,6 +26708,7 @@ def begin_approve_or_reject_private_endpoint_connection( name=name, private_endpoint_connection_name=private_endpoint_connection_name, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -25408,10 +26733,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_initial( self, @@ -25426,18 +26750,25 @@ def _delete_private_endpoint_connection_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_private_endpoint_connection_request_initial( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -25458,7 +26789,7 @@ def _delete_private_endpoint_connection_initial( return deserialized - _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -25471,7 +26802,7 @@ def begin_delete_private_endpoint_connection( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25491,7 +26822,8 @@ def begin_delete_private_endpoint_connection( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -25503,6 +26835,7 @@ def begin_delete_private_endpoint_connection( resource_group_name=resource_group_name, name=name, private_endpoint_connection_name=private_endpoint_connection_name, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -25526,10 +26859,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources( @@ -25540,7 +26872,7 @@ def get_private_link_resources( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -25557,17 +26889,24 @@ def get_private_link_resources( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_link_resources_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25582,7 +26921,7 @@ def get_private_link_resources( return deserialized - get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources'} # type: ignore + get_private_link_resources.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateLinkResources"} # type: ignore @distributed_trace @@ -25595,8 +26934,8 @@ def list_processes( """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. + 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 @@ -25608,6 +26947,8 @@ def list_processes( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25620,6 +26961,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes.metadata['url'], ) request = _convert_request(request) @@ -25631,6 +26973,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25648,7 +26991,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25662,7 +27009,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} # type: ignore + list_processes.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes"} # type: ignore @distributed_trace def get_process( @@ -25674,8 +27021,7 @@ def get_process( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -25694,18 +27040,25 @@ def get_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25720,11 +27073,11 @@ def get_process( return deserialized - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + get_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process( + def delete_process( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -25734,8 +27087,8 @@ def delete_process( """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. + 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 @@ -25754,18 +27107,25 @@ def delete_process( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_process_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -25776,7 +27136,7 @@ def delete_process( if cls: return cls(pipeline_response, None, {}) - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} # type: ignore + delete_process.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}"} # type: ignore @distributed_trace @@ -25789,8 +27149,7 @@ def get_process_dump( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -25809,18 +27168,25 @@ def get_process_dump( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_dump_request( resource_group_name=resource_group_name, name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25835,7 +27201,7 @@ def get_process_dump( return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} # type: ignore + get_process_dump.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -25849,8 +27215,8 @@ def list_process_modules( """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. + 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 @@ -25865,6 +27231,8 @@ def list_process_modules( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -25878,6 +27246,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules.metadata['url'], ) request = _convert_request(request) @@ -25890,6 +27259,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -25907,7 +27277,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25921,7 +27295,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} # type: ignore + list_process_modules.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module( @@ -25934,8 +27308,7 @@ def get_process_module( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -25956,6 +27329,8 @@ def get_process_module( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_module_request( resource_group_name=resource_group_name, @@ -25963,12 +27338,17 @@ def get_process_module( process_id=process_id, base_address=base_address, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -25983,7 +27363,7 @@ def get_process_module( return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -25996,8 +27376,7 @@ def list_process_threads( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -26012,6 +27391,8 @@ def list_process_threads( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26025,6 +27406,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads.metadata['url'], ) request = _convert_request(request) @@ -26037,6 +27419,7 @@ def prepare_request(next_link=None): name=name, process_id=process_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26054,7 +27437,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26068,7 +27455,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} # type: ignore + list_process_threads.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates( @@ -26079,7 +27466,7 @@ def list_public_certificates( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -26092,6 +27479,8 @@ def list_public_certificates( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26104,6 +27493,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates.metadata['url'], ) request = _convert_request(request) @@ -26115,6 +27505,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26132,7 +27523,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26146,7 +27541,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} # type: ignore + list_public_certificates.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate( @@ -26158,7 +27553,7 @@ def get_public_certificate( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -26177,18 +27572,25 @@ def get_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26203,7 +27605,7 @@ def get_public_certificate( return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -26217,7 +27619,7 @@ def create_or_update_public_certificate( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -26239,6 +27641,7 @@ def create_or_update_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -26248,6 +27651,7 @@ def create_or_update_public_certificate( name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate.metadata['url'], @@ -26255,7 +27659,11 @@ def create_or_update_public_certificate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26270,11 +27678,11 @@ def create_or_update_public_certificate( return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate( + def delete_public_certificate( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26283,7 +27691,7 @@ def delete_public_certificate( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -26302,18 +27710,25 @@ def delete_public_certificate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_public_certificate_request( resource_group_name=resource_group_name, name=name, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -26324,7 +27739,7 @@ def delete_public_certificate( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -26337,7 +27752,7 @@ def list_publishing_profile_xml_with_secrets( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -26358,6 +27773,7 @@ def list_publishing_profile_xml_with_secrets( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -26366,6 +27782,7 @@ def list_publishing_profile_xml_with_secrets( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets.metadata['url'], @@ -26373,7 +27790,11 @@ def list_publishing_profile_xml_with_secrets( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26388,11 +27809,11 @@ def list_publishing_profile_xml_with_secrets( return deserialized - list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml"} # type: ignore @distributed_trace - def reset_production_slot_config( + def reset_production_slot_config( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26401,8 +27822,8 @@ def reset_production_slot_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. + 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 @@ -26419,17 +27840,24 @@ def reset_production_slot_config( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_production_slot_config_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_production_slot_config.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26440,11 +27868,11 @@ def reset_production_slot_config( if cls: return cls(pipeline_response, None, {}) - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} # type: ignore + reset_production_slot_config.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig"} # type: ignore @distributed_trace - def restart( + def restart( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26454,17 +27882,18 @@ def restart( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -26477,11 +27906,14 @@ def restart( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_restart_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart.metadata['url'], @@ -26489,7 +27921,11 @@ def restart( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26500,10 +27936,10 @@ def restart( if cls: return cls(pipeline_response, None, {}) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} # type: ignore + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart"} # type: ignore - def _restore_from_backup_blob_initial( + def _restore_from_backup_blob_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26516,6 +27952,7 @@ def _restore_from_backup_blob_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -26524,6 +27961,7 @@ def _restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_initial.metadata['url'], @@ -26531,7 +27969,11 @@ def _restore_from_backup_blob_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26541,11 +27983,11 @@ def _restore_from_backup_blob_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob( + def begin_restore_from_backup_blob( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26554,7 +27996,7 @@ def begin_restore_from_backup_blob( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -26574,8 +28016,9 @@ def begin_restore_from_backup_blob( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26587,6 +28030,7 @@ def begin_restore_from_backup_blob( resource_group_name=resource_group_name, name=name, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26608,12 +28052,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_initial( + def _restore_from_deleted_app_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26626,6 +28069,7 @@ def _restore_from_deleted_app_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -26634,6 +28078,7 @@ def _restore_from_deleted_app_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_initial.metadata['url'], @@ -26641,7 +28086,11 @@ def _restore_from_deleted_app_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26651,11 +28100,11 @@ def _restore_from_deleted_app_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app( + def begin_restore_from_deleted_app( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26664,7 +28113,7 @@ def begin_restore_from_deleted_app( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -26684,8 +28133,9 @@ def begin_restore_from_deleted_app( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26697,6 +28147,7 @@ def begin_restore_from_deleted_app( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26718,12 +28169,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_initial( + def _restore_snapshot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26736,6 +28186,7 @@ def _restore_snapshot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -26744,6 +28195,7 @@ def _restore_snapshot_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_initial.metadata['url'], @@ -26751,7 +28203,11 @@ def _restore_snapshot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -26761,11 +28217,11 @@ def _restore_snapshot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + _restore_snapshot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot( + def begin_restore_snapshot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -26774,7 +28230,7 @@ def begin_restore_snapshot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -26795,8 +28251,9 @@ def begin_restore_snapshot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -26808,6 +28265,7 @@ def begin_restore_snapshot( resource_group_name=resource_group_name, name=name, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -26829,10 +28287,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} # type: ignore + begin_restore_snapshot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions( @@ -26843,7 +28300,7 @@ def list_site_extensions( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -26856,6 +28313,8 @@ def list_site_extensions( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -26868,6 +28327,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions.metadata['url'], ) request = _convert_request(request) @@ -26879,6 +28339,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -26896,7 +28357,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26910,7 +28375,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions'} # type: ignore + list_site_extensions.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions"} # type: ignore @distributed_trace def get_site_extension( @@ -26922,7 +28387,7 @@ def get_site_extension( ) -> "_models.SiteExtensionInfo": """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -26941,18 +28406,25 @@ def get_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -26967,7 +28439,7 @@ def get_site_extension( return deserialized - get_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_initial( @@ -26983,18 +28455,25 @@ def _install_site_extension_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_install_site_extension_request_initial( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -27012,7 +28491,7 @@ def _install_site_extension_initial( return deserialized - _install_site_extension_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -27025,7 +28504,7 @@ def begin_install_site_extension( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -27046,7 +28525,8 @@ def begin_install_site_extension( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -27058,6 +28538,7 @@ def begin_install_site_extension( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -27081,13 +28562,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension( + def delete_site_extension( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27096,7 +28576,7 @@ def delete_site_extension( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -27115,18 +28595,25 @@ def delete_site_extension( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_site_extension_request( resource_group_name=resource_group_name, name=name, site_extension_id=site_extension_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -27137,7 +28624,7 @@ def delete_site_extension( if cls: return cls(pipeline_response, None, {}) - delete_site_extension.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -27149,7 +28636,7 @@ def list_slots( ) -> Iterable["_models.WebAppCollection"]: """Gets an app's deployment slots. - Description for 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 @@ -27160,6 +28647,8 @@ def list_slots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27172,6 +28661,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_slots.metadata['url'], ) request = _convert_request(request) @@ -27183,6 +28673,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27200,7 +28691,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27214,7 +28709,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots'} # type: ignore + list_slots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots"} # type: ignore @distributed_trace def get_slot( @@ -27226,7 +28721,7 @@ def get_slot( ) -> "_models.Site": """Gets the details of a web, mobile, or API app. - Description for 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 @@ -27245,18 +28740,25 @@ def get_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27271,7 +28773,7 @@ def get_slot( return deserialized - get_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + get_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore def _create_or_update_slot_initial( @@ -27288,6 +28790,7 @@ def _create_or_update_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'Site') @@ -27297,6 +28800,7 @@ def _create_or_update_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_slot_initial.metadata['url'], @@ -27304,7 +28808,11 @@ def _create_or_update_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27322,7 +28830,7 @@ def _create_or_update_slot_initial( return deserialized - _create_or_update_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + _create_or_update_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27337,8 +28845,8 @@ def begin_create_or_update_slot( """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. + 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 @@ -27362,8 +28870,9 @@ def begin_create_or_update_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.Site] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Site"] lro_delay = kwargs.pop( 'polling_interval', @@ -27376,6 +28885,7 @@ def begin_create_or_update_slot( name=name, slot=slot, site_envelope=site_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -27400,13 +28910,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + begin_create_or_update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace - def delete_slot( + def delete_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27417,7 +28926,7 @@ def delete_slot( ) -> None: """Deletes a web, mobile, or API app, or one of the deployment slots. - Description for Deletes a web, mobile, or API app, or one of the deployment slots. + 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 @@ -27426,10 +28935,10 @@ def delete_slot( :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. + :param delete_metrics: If true, web app metrics are also deleted. Default value is None. :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. + default, empty App Service plan is deleted. Default value is None. :type delete_empty_server_farm: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -27442,12 +28951,15 @@ def delete_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, delete_metrics=delete_metrics, delete_empty_server_farm=delete_empty_server_farm, template_url=self.delete_slot.metadata['url'], @@ -27455,7 +28967,11 @@ def delete_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -27466,7 +28982,7 @@ def delete_slot( if cls: return cls(pipeline_response, None, {}) - delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + delete_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27481,8 +28997,8 @@ def update_slot( """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. + 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 @@ -27505,6 +29021,7 @@ def update_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_envelope, 'SitePatchResource') @@ -27514,6 +29031,7 @@ def update_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_slot.metadata['url'], @@ -27521,7 +29039,11 @@ def update_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -27540,7 +29062,7 @@ def update_slot( return deserialized - update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} # type: ignore + update_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}"} # type: ignore @distributed_trace @@ -27554,7 +29076,7 @@ def analyze_custom_hostname_slot( ) -> "_models.CustomHostnameAnalysisResult": """Analyze a custom hostname. - Description for 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 @@ -27562,7 +29084,7 @@ def analyze_custom_hostname_slot( :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. + :param host_name: Custom hostname. Default value is None. :type host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CustomHostnameAnalysisResult, or the result of cls(response) @@ -27575,19 +29097,26 @@ def analyze_custom_hostname_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_analyze_custom_hostname_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, host_name=host_name, template_url=self.analyze_custom_hostname_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27602,11 +29131,11 @@ def analyze_custom_hostname_slot( return deserialized - analyze_custom_hostname_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname'} # type: ignore + analyze_custom_hostname_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname"} # type: ignore @distributed_trace - def apply_slot_configuration_slot( + def apply_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27616,7 +29145,7 @@ def apply_slot_configuration_slot( ) -> None: """Applies the configuration settings from the target slot onto the current slot. - Description for Applies the configuration settings from the target slot onto the current slot. + 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 @@ -27638,6 +29167,7 @@ def apply_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -27647,6 +29177,7 @@ def apply_slot_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.apply_slot_configuration_slot.metadata['url'], @@ -27654,7 +29185,11 @@ def apply_slot_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27665,7 +29200,7 @@ def apply_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - apply_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig'} # type: ignore + apply_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig"} # type: ignore @distributed_trace @@ -27679,7 +29214,7 @@ def backup_slot( ) -> "_models.BackupItem": """Creates a backup of an app. - Description for 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 @@ -27702,6 +29237,7 @@ def backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27711,6 +29247,7 @@ def backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.backup_slot.metadata['url'], @@ -27718,7 +29255,11 @@ def backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27733,7 +29274,7 @@ def backup_slot( return deserialized - backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup'} # type: ignore + backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup"} # type: ignore @distributed_trace @@ -27746,7 +29287,7 @@ def list_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -27761,6 +29302,8 @@ def list_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -27774,6 +29317,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -27786,6 +29330,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -27803,7 +29348,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27817,7 +29366,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} # type: ignore + list_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups"} # type: ignore @distributed_trace def get_backup_status_slot( @@ -27830,7 +29379,7 @@ def get_backup_status_slot( ) -> "_models.BackupItem": """Gets a backup of an app by its ID. - Description for 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 @@ -27852,6 +29401,8 @@ def get_backup_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_backup_status_slot_request( resource_group_name=resource_group_name, @@ -27859,12 +29410,17 @@ def get_backup_status_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27879,11 +29435,11 @@ def get_backup_status_slot( return deserialized - get_backup_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + get_backup_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace - def delete_backup_slot( + def delete_backup_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -27893,7 +29449,7 @@ def delete_backup_slot( ) -> None: """Deletes a backup of an app by its ID. - Description for 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 @@ -27915,6 +29471,8 @@ def delete_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_backup_slot_request( resource_group_name=resource_group_name, @@ -27922,12 +29480,17 @@ def delete_backup_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -27938,7 +29501,7 @@ def delete_backup_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}'} # type: ignore + delete_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}"} # type: ignore @distributed_trace @@ -27955,9 +29518,9 @@ def list_backup_status_secrets_slot( 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. + 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 @@ -27980,6 +29543,7 @@ def list_backup_status_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -27990,6 +29554,7 @@ def list_backup_status_secrets_slot( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_backup_status_secrets_slot.metadata['url'], @@ -27997,7 +29562,11 @@ def list_backup_status_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28012,10 +29581,10 @@ def list_backup_status_secrets_slot( return deserialized - list_backup_status_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list'} # type: ignore + list_backup_status_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list"} # type: ignore - def _restore_slot_initial( + def _restore_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28030,6 +29599,7 @@ def _restore_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -28040,6 +29610,7 @@ def _restore_slot_initial( backup_id=backup_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_slot_initial.metadata['url'], @@ -28047,7 +29618,11 @@ def _restore_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -28057,11 +29632,11 @@ def _restore_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + _restore_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace - def begin_restore_slot( + def begin_restore_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -28072,7 +29647,7 @@ def begin_restore_slot( ) -> LROPoller[None]: """Restores a specific backup to another app (or deployment slot, if specified). - Description for Restores a specific backup to another app (or deployment slot, if specified). + 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 @@ -28097,8 +29672,9 @@ def begin_restore_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -28112,6 +29688,7 @@ def begin_restore_slot( backup_id=backup_id, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -28133,10 +29710,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore'} # type: ignore + begin_restore_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore"} # type: ignore @distributed_trace def list_basic_publishing_credentials_policies_slot( @@ -28148,8 +29724,7 @@ def list_basic_publishing_credentials_policies_slot( ) -> Iterable["_models.PublishingCredentialsPoliciesCollection"]: """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. + 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 @@ -28164,6 +29739,8 @@ def list_basic_publishing_credentials_policies_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PublishingCredentialsPoliciesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublishingCredentialsPoliciesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28177,6 +29754,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_basic_publishing_credentials_policies_slot.metadata['url'], ) request = _convert_request(request) @@ -28189,6 +29767,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28206,7 +29785,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28220,7 +29803,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_basic_publishing_credentials_policies_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies'} # type: ignore + list_basic_publishing_credentials_policies_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies"} # type: ignore @distributed_trace def get_ftp_allowed_slot( @@ -28232,7 +29815,7 @@ def get_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether FTP is allowed on the site or not. - Description for Returns whether FTP is allowed on the site or not. + 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 @@ -28251,18 +29834,25 @@ def get_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ftp_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ftp_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28277,7 +29867,7 @@ def get_ftp_allowed_slot( return deserialized - get_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + get_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -28291,7 +29881,7 @@ def update_ftp_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether FTP is allowed on the site or not. - Description for Updates whether FTP is allowed on the site or not. + 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 @@ -28313,6 +29903,7 @@ def update_ftp_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -28322,6 +29913,7 @@ def update_ftp_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_ftp_allowed_slot.metadata['url'], @@ -28329,7 +29921,11 @@ def update_ftp_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28344,7 +29940,7 @@ def update_ftp_allowed_slot( return deserialized - update_ftp_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp'} # type: ignore + update_ftp_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp"} # type: ignore @distributed_trace @@ -28357,7 +29953,7 @@ def get_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Returns whether Scm basic auth is allowed on the site or not. - Description for Returns whether Scm basic auth is allowed on the site or not. + 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 @@ -28376,18 +29972,25 @@ def get_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_scm_allowed_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_scm_allowed_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28402,7 +30005,7 @@ def get_scm_allowed_slot( return deserialized - get_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + get_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -28416,7 +30019,7 @@ def update_scm_allowed_slot( ) -> "_models.CsmPublishingCredentialsPoliciesEntity": """Updates whether user publishing credentials are allowed on the site or not. - Description for Updates whether user publishing credentials are allowed on the site or not. + 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 @@ -28438,6 +30041,7 @@ def update_scm_allowed_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(csm_publishing_access_policies_entity, 'CsmPublishingCredentialsPoliciesEntity') @@ -28447,6 +30051,7 @@ def update_scm_allowed_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_scm_allowed_slot.metadata['url'], @@ -28454,7 +30059,11 @@ def update_scm_allowed_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28469,7 +30078,7 @@ def update_scm_allowed_slot( return deserialized - update_scm_allowed_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm'} # type: ignore + update_scm_allowed_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm"} # type: ignore @distributed_trace @@ -28482,7 +30091,7 @@ def list_configurations_slot( ) -> Iterable["_models.SiteConfigResourceCollection"]: """List the configurations of an app. - Description for 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 @@ -28498,6 +30107,8 @@ def list_configurations_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteConfigResourceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigResourceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -28511,6 +30122,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configurations_slot.metadata['url'], ) request = _convert_request(request) @@ -28523,6 +30135,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -28540,7 +30153,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28554,7 +30171,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configurations_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config'} # type: ignore + list_configurations_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config"} # type: ignore @distributed_trace def update_application_settings_slot( @@ -28567,7 +30184,7 @@ def update_application_settings_slot( ) -> "_models.StringDictionary": """Replaces the application settings of an app. - Description for 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 @@ -28589,6 +30206,7 @@ def update_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(app_settings, 'StringDictionary') @@ -28598,6 +30216,7 @@ def update_application_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_application_settings_slot.metadata['url'], @@ -28605,7 +30224,11 @@ def update_application_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28620,7 +30243,7 @@ def update_application_settings_slot( return deserialized - update_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings'} # type: ignore + update_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings"} # type: ignore @distributed_trace @@ -28633,7 +30256,7 @@ def list_application_settings_slot( ) -> "_models.StringDictionary": """Gets the application settings of an app. - Description for 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 @@ -28653,18 +30276,25 @@ def list_application_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_application_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_application_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28679,7 +30309,7 @@ def list_application_settings_slot( return deserialized - list_application_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list'} # type: ignore + list_application_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list"} # type: ignore @distributed_trace @@ -28693,7 +30323,7 @@ def update_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Updates the Authentication / Authorization settings associated with web app. - Description for 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 @@ -28714,6 +30344,7 @@ def update_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings, 'SiteAuthSettings') @@ -28723,6 +30354,7 @@ def update_auth_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_slot.metadata['url'], @@ -28730,7 +30362,11 @@ def update_auth_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28745,7 +30381,7 @@ def update_auth_settings_slot( return deserialized - update_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings'} # type: ignore + update_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings"} # type: ignore @distributed_trace @@ -28758,7 +30394,7 @@ def get_auth_settings_slot( ) -> "_models.SiteAuthSettings": """Gets the Authentication/Authorization settings of an app. - Description for 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 @@ -28778,18 +30414,25 @@ def get_auth_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28804,7 +30447,73 @@ def get_auth_settings_slot( return deserialized - get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} # type: ignore + get_auth_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list"} # type: ignore + + + @distributed_trace + def get_auth_settings_v2_without_secrets_slot( + self, + resource_group_name: str, + name: str, + slot: str, + **kwargs: Any + ) -> "_models.SiteAuthSettingsV2": + """Gets site's Authentication / Authorization settings for apps via the V2 format. + + Gets site's Authentication / Authorization settings for apps via the V2 format. + + :param resource_group_name: Name of the resource group to which the resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, the API will get the + settings for the production slot. + :type slot: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SiteAuthSettingsV2, or the result of cls(response) + :rtype: ~azure.mgmt.web.v2021_03_01.models.SiteAuthSettingsV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteAuthSettingsV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + + + request = build_get_auth_settings_v2_without_secrets_slot_request( + resource_group_name=resource_group_name, + name=name, + slot=slot, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get_auth_settings_v2_without_secrets_slot.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.DefaultErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SiteAuthSettingsV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_auth_settings_v2_without_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -28818,8 +30527,7 @@ def update_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Updates site's Authentication / Authorization settings for apps via the V2 format. - Description for Updates site's Authentication / Authorization settings for apps via the V2 - format. + 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 @@ -28840,6 +30548,7 @@ def update_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_auth_settings_v2, 'SiteAuthSettingsV2') @@ -28849,6 +30558,7 @@ def update_auth_settings_v2_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_auth_settings_v2_slot.metadata['url'], @@ -28856,7 +30566,11 @@ def update_auth_settings_v2_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28871,7 +30585,7 @@ def update_auth_settings_v2_slot( return deserialized - update_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2'} # type: ignore + update_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2"} # type: ignore @distributed_trace @@ -28884,7 +30598,7 @@ def get_auth_settings_v2_slot( ) -> "_models.SiteAuthSettingsV2": """Gets site's Authentication / Authorization settings for apps via the V2 format. - Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + 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 @@ -28904,18 +30618,25 @@ def get_auth_settings_v2_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_auth_settings_v2_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_auth_settings_v2_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28930,7 +30651,7 @@ def get_auth_settings_v2_slot( return deserialized - get_auth_settings_v2_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list'} # type: ignore + get_auth_settings_v2_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list"} # type: ignore @distributed_trace @@ -28944,7 +30665,7 @@ def update_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Updates the Azure storage account configurations of an app. - Description for 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 @@ -28967,6 +30688,7 @@ def update_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') @@ -28976,6 +30698,7 @@ def update_azure_storage_accounts_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_azure_storage_accounts_slot.metadata['url'], @@ -28983,7 +30706,11 @@ def update_azure_storage_accounts_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -28998,7 +30725,7 @@ def update_azure_storage_accounts_slot( return deserialized - update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} # type: ignore + update_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts"} # type: ignore @distributed_trace @@ -29011,7 +30738,7 @@ def list_azure_storage_accounts_slot( ) -> "_models.AzureStoragePropertyDictionaryResource": """Gets the Azure storage account configurations of an app. - Description for 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 @@ -29031,18 +30758,25 @@ def list_azure_storage_accounts_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_azure_storage_accounts_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_azure_storage_accounts_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29057,7 +30791,7 @@ def list_azure_storage_accounts_slot( return deserialized - list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} # type: ignore + list_azure_storage_accounts_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list"} # type: ignore @distributed_trace @@ -29071,7 +30805,7 @@ def update_backup_configuration_slot( ) -> "_models.BackupRequest": """Updates the backup configuration of an app. - Description for 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 @@ -29093,6 +30827,7 @@ def update_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'BackupRequest') @@ -29102,6 +30837,7 @@ def update_backup_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_backup_configuration_slot.metadata['url'], @@ -29109,7 +30845,11 @@ def update_backup_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29124,11 +30864,11 @@ def update_backup_configuration_slot( return deserialized - update_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + update_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace - def delete_backup_configuration_slot( + def delete_backup_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -29137,7 +30877,7 @@ def delete_backup_configuration_slot( ) -> None: """Deletes the backup configuration of an app. - Description for 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 @@ -29157,18 +30897,25 @@ def delete_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29179,7 +30926,7 @@ def delete_backup_configuration_slot( if cls: return cls(pipeline_response, None, {}) - delete_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup'} # type: ignore + delete_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup"} # type: ignore @distributed_trace @@ -29192,7 +30939,7 @@ def get_backup_configuration_slot( ) -> "_models.BackupRequest": """Gets the backup configuration of an app. - Description for 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 @@ -29212,18 +30959,25 @@ def get_backup_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_backup_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_backup_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29238,7 +30992,7 @@ def get_backup_configuration_slot( return deserialized - get_backup_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list'} # type: ignore + get_backup_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list"} # type: ignore @distributed_trace @@ -29251,7 +31005,7 @@ def get_app_settings_key_vault_references_slot( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -29266,6 +31020,8 @@ def get_app_settings_key_vault_references_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29279,6 +31035,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_settings_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -29291,6 +31048,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29308,7 +31066,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29322,7 +31084,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_app_settings_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings'} # type: ignore + get_app_settings_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings"} # type: ignore @distributed_trace def get_app_setting_key_vault_reference_slot( @@ -29335,7 +31097,7 @@ def get_app_setting_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -29356,6 +31118,8 @@ def get_app_setting_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_app_setting_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -29363,12 +31127,17 @@ def get_app_setting_key_vault_reference_slot( app_setting_key=app_setting_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_app_setting_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29383,7 +31152,7 @@ def get_app_setting_key_vault_reference_slot( return deserialized - get_app_setting_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}'} # type: ignore + get_app_setting_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}"} # type: ignore @distributed_trace @@ -29396,7 +31165,7 @@ def get_site_connection_string_key_vault_references_slot( ) -> Iterable["_models.ApiKVReferenceCollection"]: """Gets the config reference app settings and status of an app. - Description for Gets the config reference app settings and status of an app. + 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 @@ -29411,6 +31180,8 @@ def get_site_connection_string_key_vault_references_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ApiKVReferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiKVReferenceCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -29424,6 +31195,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_references_slot.metadata['url'], ) request = _convert_request(request) @@ -29436,6 +31208,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -29453,7 +31226,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29467,7 +31244,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_site_connection_string_key_vault_references_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings'} # type: ignore + get_site_connection_string_key_vault_references_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings"} # type: ignore @distributed_trace def get_site_connection_string_key_vault_reference_slot( @@ -29480,7 +31257,7 @@ def get_site_connection_string_key_vault_reference_slot( ) -> "_models.ApiKVReference": """Gets the config reference and status of an app. - Description for Gets the config reference and status of an app. + 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 @@ -29501,6 +31278,8 @@ def get_site_connection_string_key_vault_reference_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_connection_string_key_vault_reference_slot_request( resource_group_name=resource_group_name, @@ -29508,12 +31287,17 @@ def get_site_connection_string_key_vault_reference_slot( connection_string_key=connection_string_key, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_connection_string_key_vault_reference_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29528,7 +31312,7 @@ def get_site_connection_string_key_vault_reference_slot( return deserialized - get_site_connection_string_key_vault_reference_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}'} # type: ignore + get_site_connection_string_key_vault_reference_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}"} # type: ignore @distributed_trace @@ -29542,7 +31326,7 @@ def update_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Replaces the connection strings of an app. - Description for 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 @@ -29564,6 +31348,7 @@ def update_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_strings, 'ConnectionStringDictionary') @@ -29573,6 +31358,7 @@ def update_connection_strings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_connection_strings_slot.metadata['url'], @@ -29580,7 +31366,11 @@ def update_connection_strings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29595,7 +31385,7 @@ def update_connection_strings_slot( return deserialized - update_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings'} # type: ignore + update_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings"} # type: ignore @distributed_trace @@ -29608,7 +31398,7 @@ def list_connection_strings_slot( ) -> "_models.ConnectionStringDictionary": """Gets the connection strings of an app. - Description for 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 @@ -29628,18 +31418,25 @@ def list_connection_strings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_connection_strings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_connection_strings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29654,7 +31451,7 @@ def list_connection_strings_slot( return deserialized - list_connection_strings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list'} # type: ignore + list_connection_strings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list"} # type: ignore @distributed_trace @@ -29667,7 +31464,7 @@ def get_diagnostic_logs_configuration_slot( ) -> "_models.SiteLogsConfig": """Gets the logging configuration of an app. - Description for 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 @@ -29687,18 +31484,25 @@ def get_diagnostic_logs_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_diagnostic_logs_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_diagnostic_logs_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29713,7 +31517,7 @@ def get_diagnostic_logs_configuration_slot( return deserialized - get_diagnostic_logs_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + get_diagnostic_logs_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -29727,7 +31531,7 @@ def update_diagnostic_logs_config_slot( ) -> "_models.SiteLogsConfig": """Updates the logging configuration of an app. - Description for 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 @@ -29750,6 +31554,7 @@ def update_diagnostic_logs_config_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_logs_config, 'SiteLogsConfig') @@ -29759,6 +31564,7 @@ def update_diagnostic_logs_config_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_diagnostic_logs_config_slot.metadata['url'], @@ -29766,7 +31572,11 @@ def update_diagnostic_logs_config_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29781,7 +31591,7 @@ def update_diagnostic_logs_config_slot( return deserialized - update_diagnostic_logs_config_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs'} # type: ignore + update_diagnostic_logs_config_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs"} # type: ignore @distributed_trace @@ -29795,7 +31605,7 @@ def update_metadata_slot( ) -> "_models.StringDictionary": """Replaces the metadata of an app. - Description for 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 @@ -29817,6 +31627,7 @@ def update_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(metadata, 'StringDictionary') @@ -29826,6 +31637,7 @@ def update_metadata_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_metadata_slot.metadata['url'], @@ -29833,7 +31645,11 @@ def update_metadata_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29848,7 +31664,7 @@ def update_metadata_slot( return deserialized - update_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata'} # type: ignore + update_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata"} # type: ignore @distributed_trace @@ -29861,7 +31677,7 @@ def list_metadata_slot( ) -> "_models.StringDictionary": """Gets the metadata of an app. - Description for 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 @@ -29881,18 +31697,25 @@ def list_metadata_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_metadata_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_metadata_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29907,7 +31730,7 @@ def list_metadata_slot( return deserialized - list_metadata_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list'} # type: ignore + list_metadata_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list"} # type: ignore def _list_publishing_credentials_slot_initial( @@ -29923,18 +31746,25 @@ def _list_publishing_credentials_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_publishing_credentials_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._list_publishing_credentials_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -29948,7 +31778,7 @@ def _list_publishing_credentials_slot_initial( return deserialized - _list_publishing_credentials_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + _list_publishing_credentials_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace @@ -29961,7 +31791,7 @@ def begin_list_publishing_credentials_slot( ) -> LROPoller["_models.User"]: """Gets the Git/FTP publishing credentials of an app. - Description for 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 @@ -29982,7 +31812,8 @@ def begin_list_publishing_credentials_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.User] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.User"] lro_delay = kwargs.pop( 'polling_interval', @@ -29994,6 +31825,7 @@ def begin_list_publishing_credentials_slot( resource_group_name=resource_group_name, name=name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -30017,10 +31849,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_publishing_credentials_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list'} # type: ignore + begin_list_publishing_credentials_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list"} # type: ignore @distributed_trace def update_site_push_settings_slot( @@ -30033,7 +31864,7 @@ def update_site_push_settings_slot( ) -> "_models.PushSettings": """Updates the Push settings associated with web app. - Description for 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 @@ -30054,6 +31885,7 @@ def update_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(push_settings, 'PushSettings') @@ -30063,6 +31895,7 @@ def update_site_push_settings_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_site_push_settings_slot.metadata['url'], @@ -30070,7 +31903,11 @@ def update_site_push_settings_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30085,7 +31922,7 @@ def update_site_push_settings_slot( return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} # type: ignore + update_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings"} # type: ignore @distributed_trace @@ -30098,7 +31935,7 @@ def list_site_push_settings_slot( ) -> "_models.PushSettings": """Gets the Push settings associated with web app. - Description for 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 @@ -30117,18 +31954,25 @@ def list_site_push_settings_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_site_push_settings_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_push_settings_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30143,7 +31987,7 @@ def list_site_push_settings_slot( return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} # type: ignore + list_site_push_settings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list"} # type: ignore @distributed_trace @@ -30157,8 +32001,8 @@ def get_configuration_slot( """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. + 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 @@ -30178,18 +32022,25 @@ def get_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30204,7 +32055,7 @@ def get_configuration_slot( return deserialized - get_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + get_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -30218,7 +32069,7 @@ def create_or_update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -30240,6 +32091,7 @@ def create_or_update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -30249,6 +32101,7 @@ def create_or_update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_configuration_slot.metadata['url'], @@ -30256,7 +32109,11 @@ def create_or_update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30271,7 +32128,7 @@ def create_or_update_configuration_slot( return deserialized - create_or_update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + create_or_update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -30285,7 +32142,7 @@ def update_configuration_slot( ) -> "_models.SiteConfigResource": """Updates the configuration of an app. - Description for 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 @@ -30307,6 +32164,7 @@ def update_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_config, 'SiteConfigResource') @@ -30316,6 +32174,7 @@ def update_configuration_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_configuration_slot.metadata['url'], @@ -30323,7 +32182,11 @@ def update_configuration_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30338,7 +32201,7 @@ def update_configuration_slot( return deserialized - update_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web'} # type: ignore + update_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web"} # type: ignore @distributed_trace @@ -30352,8 +32215,8 @@ def list_configuration_snapshot_info_slot( """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. + 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 @@ -30369,6 +32232,8 @@ def list_configuration_snapshot_info_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteConfigurationSnapshotInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteConfigurationSnapshotInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30382,6 +32247,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_configuration_snapshot_info_slot.metadata['url'], ) request = _convert_request(request) @@ -30394,6 +32260,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30411,7 +32278,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30425,7 +32296,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_configuration_snapshot_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots'} # type: ignore + list_configuration_snapshot_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots"} # type: ignore @distributed_trace def get_configuration_snapshot_slot( @@ -30438,7 +32309,7 @@ def get_configuration_snapshot_slot( ) -> "_models.SiteConfigResource": """Gets a snapshot of the configuration of an app at a previous point in time. - Description for Gets a snapshot of the configuration of an app at a previous point in time. + 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 @@ -30460,6 +32331,8 @@ def get_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -30467,12 +32340,17 @@ def get_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30487,11 +32365,11 @@ def get_configuration_snapshot_slot( return deserialized - get_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}'} # type: ignore + get_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}"} # type: ignore @distributed_trace - def recover_site_configuration_snapshot_slot( + def recover_site_configuration_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30501,7 +32379,7 @@ def recover_site_configuration_snapshot_slot( ) -> None: """Reverts the configuration of an app to a previous snapshot. - Description for 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 @@ -30523,6 +32401,8 @@ def recover_site_configuration_snapshot_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_recover_site_configuration_snapshot_slot_request( resource_group_name=resource_group_name, @@ -30530,12 +32410,17 @@ def recover_site_configuration_snapshot_slot( snapshot_id=snapshot_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.recover_site_configuration_snapshot_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -30546,7 +32431,7 @@ def recover_site_configuration_snapshot_slot( if cls: return cls(pipeline_response, None, {}) - recover_site_configuration_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover'} # type: ignore + recover_site_configuration_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover"} # type: ignore @distributed_trace @@ -30559,7 +32444,7 @@ def get_web_site_container_logs_slot( ) -> Optional[IO]: """Gets the last lines of docker logs for the given site. - Description for Gets the last lines of docker logs for the given site. + 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 @@ -30578,18 +32463,25 @@ def get_web_site_container_logs_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_web_site_container_logs_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_site_container_logs_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30605,7 +32497,7 @@ def get_web_site_container_logs_slot( return deserialized - get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} # type: ignore + get_web_site_container_logs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs"} # type: ignore @distributed_trace @@ -30618,7 +32510,7 @@ def get_container_logs_zip_slot( ) -> Optional[IO]: """Gets the ZIP archived docker log files for the given site. - Description for Gets the ZIP archived docker log files for the given site. + 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 @@ -30637,18 +32529,25 @@ def get_container_logs_zip_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_container_logs_zip_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_container_logs_zip_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30664,7 +32563,7 @@ def get_container_logs_zip_slot( return deserialized - get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} # type: ignore + get_container_logs_zip_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download"} # type: ignore @distributed_trace @@ -30677,7 +32576,7 @@ def list_continuous_web_jobs_slot( ) -> Iterable["_models.ContinuousWebJobCollection"]: """List continuous web jobs for an app, or a deployment slot. - Description for List continuous web jobs for an app, or a deployment slot. + 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 @@ -30693,6 +32592,8 @@ def list_continuous_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ContinuousWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContinuousWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -30706,6 +32607,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_continuous_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -30718,6 +32620,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -30735,7 +32638,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30749,7 +32656,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_continuous_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs'} # type: ignore + list_continuous_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs"} # type: ignore @distributed_trace def get_continuous_web_job_slot( @@ -30762,7 +32669,7 @@ def get_continuous_web_job_slot( ) -> "_models.ContinuousWebJob": """Gets a continuous web job by its ID for an app, or a deployment slot. - Description for Gets a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -30784,6 +32691,8 @@ def get_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30791,12 +32700,17 @@ def get_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30811,11 +32725,11 @@ def get_continuous_web_job_slot( return deserialized - get_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + get_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_continuous_web_job_slot( + def delete_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30825,7 +32739,7 @@ def delete_continuous_web_job_slot( ) -> None: """Delete a continuous web job by its ID for an app, or a deployment slot. - Description for Delete a continuous web job by its ID for an app, or a deployment slot. + 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 @@ -30847,6 +32761,8 @@ def delete_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30854,12 +32770,17 @@ def delete_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -30870,11 +32791,11 @@ def delete_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}'} # type: ignore + delete_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}"} # type: ignore @distributed_trace - def start_continuous_web_job_slot( + def start_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30884,7 +32805,7 @@ def start_continuous_web_job_slot( ) -> None: """Start a continuous web job for an app, or a deployment slot. - Description for Start a continuous web job for an app, or a deployment slot. + 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 @@ -30906,6 +32827,8 @@ def start_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30913,12 +32836,17 @@ def start_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30929,11 +32857,11 @@ def start_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - start_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start'} # type: ignore + start_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start"} # type: ignore @distributed_trace - def stop_continuous_web_job_slot( + def stop_continuous_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -30943,7 +32871,7 @@ def stop_continuous_web_job_slot( ) -> None: """Stop a continuous web job for an app, or a deployment slot. - Description for Stop a continuous web job for an app, or a deployment slot. + 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 @@ -30965,6 +32893,8 @@ def stop_continuous_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_continuous_web_job_slot_request( resource_group_name=resource_group_name, @@ -30972,12 +32902,17 @@ def stop_continuous_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_continuous_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -30988,7 +32923,7 @@ def stop_continuous_web_job_slot( if cls: return cls(pipeline_response, None, {}) - stop_continuous_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop'} # type: ignore + stop_continuous_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop"} # type: ignore @distributed_trace @@ -31001,7 +32936,7 @@ def list_deployments_slot( ) -> Iterable["_models.DeploymentCollection"]: """List deployments for an app, or a deployment slot. - Description for 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 @@ -31016,6 +32951,8 @@ def list_deployments_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.DeploymentCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31029,6 +32966,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployments_slot.metadata['url'], ) request = _convert_request(request) @@ -31041,6 +32979,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31058,7 +32997,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31072,7 +33015,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_deployments_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments'} # type: ignore + list_deployments_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments"} # type: ignore @distributed_trace def get_deployment_slot( @@ -31085,7 +33028,7 @@ def get_deployment_slot( ) -> "_models.Deployment": """Get a deployment by its ID for an app, or a deployment slot. - Description for Get a deployment by its ID for an app, or a deployment slot. + 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 @@ -31107,6 +33050,8 @@ def get_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_deployment_slot_request( resource_group_name=resource_group_name, @@ -31114,12 +33059,17 @@ def get_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31134,7 +33084,7 @@ def get_deployment_slot( return deserialized - get_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + get_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -31149,7 +33099,7 @@ def create_deployment_slot( ) -> "_models.Deployment": """Create a deployment for an app, or a deployment slot. - Description for 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 @@ -31173,6 +33123,7 @@ def create_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(deployment, 'Deployment') @@ -31183,6 +33134,7 @@ def create_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_deployment_slot.metadata['url'], @@ -31190,7 +33142,11 @@ def create_deployment_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31205,11 +33161,11 @@ def create_deployment_slot( return deserialized - create_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + create_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace - def delete_deployment_slot( + def delete_deployment_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31219,7 +33175,7 @@ def delete_deployment_slot( ) -> None: """Delete a deployment by its ID for an app, or a deployment slot. - Description for Delete a deployment by its ID for an app, or a deployment slot. + 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 @@ -31241,6 +33197,8 @@ def delete_deployment_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_deployment_slot_request( resource_group_name=resource_group_name, @@ -31248,12 +33206,17 @@ def delete_deployment_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_deployment_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -31264,7 +33227,7 @@ def delete_deployment_slot( if cls: return cls(pipeline_response, None, {}) - delete_deployment_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}'} # type: ignore + delete_deployment_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}"} # type: ignore @distributed_trace @@ -31278,7 +33241,7 @@ def list_deployment_log_slot( ) -> "_models.Deployment": """List deployment log for specific deployment for an app, or a deployment slot. - Description for List deployment log for specific deployment for an app, or a deployment slot. + 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 @@ -31301,6 +33264,8 @@ def list_deployment_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_deployment_log_slot_request( resource_group_name=resource_group_name, @@ -31308,12 +33273,17 @@ def list_deployment_log_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_deployment_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31328,7 +33298,7 @@ def list_deployment_log_slot( return deserialized - list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} # type: ignore + list_deployment_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log"} # type: ignore @distributed_trace @@ -31343,8 +33313,8 @@ def discover_backup_slot( """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. + 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 @@ -31367,6 +33337,7 @@ def discover_backup_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -31376,6 +33347,7 @@ def discover_backup_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.discover_backup_slot.metadata['url'], @@ -31383,7 +33355,11 @@ def discover_backup_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31398,7 +33374,7 @@ def discover_backup_slot( return deserialized - discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} # type: ignore + discover_backup_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup"} # type: ignore @distributed_trace @@ -31411,7 +33387,7 @@ def list_domain_ownership_identifiers_slot( ) -> Iterable["_models.IdentifierCollection"]: """Lists ownership identifiers for domain associated with web app. - Description for 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 @@ -31426,6 +33402,8 @@ def list_domain_ownership_identifiers_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -31439,6 +33417,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_domain_ownership_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -31451,6 +33430,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -31468,7 +33448,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31482,7 +33466,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_domain_ownership_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers'} # type: ignore + list_domain_ownership_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers"} # type: ignore @distributed_trace def get_domain_ownership_identifier_slot( @@ -31495,7 +33479,7 @@ def get_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Get domain ownership identifier for web app. - Description for 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 @@ -31517,6 +33501,8 @@ def get_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -31524,12 +33510,17 @@ def get_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31544,7 +33535,7 @@ def get_domain_ownership_identifier_slot( return deserialized - get_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + get_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31559,8 +33550,7 @@ def create_or_update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -31584,6 +33574,7 @@ def create_or_update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -31594,6 +33585,7 @@ def create_or_update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_domain_ownership_identifier_slot.metadata['url'], @@ -31601,7 +33593,11 @@ def create_or_update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31616,11 +33612,11 @@ def create_or_update_domain_ownership_identifier_slot( return deserialized - create_or_update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + create_or_update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace - def delete_domain_ownership_identifier_slot( + def delete_domain_ownership_identifier_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -31630,7 +33626,7 @@ def delete_domain_ownership_identifier_slot( ) -> None: """Deletes a domain ownership identifier for a web app. - Description for 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 @@ -31652,6 +33648,8 @@ def delete_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_domain_ownership_identifier_slot_request( resource_group_name=resource_group_name, @@ -31659,12 +33657,17 @@ def delete_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_domain_ownership_identifier_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -31675,7 +33678,7 @@ def delete_domain_ownership_identifier_slot( if cls: return cls(pipeline_response, None, {}) - delete_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + delete_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31690,8 +33693,7 @@ def update_domain_ownership_identifier_slot( ) -> "_models.Identifier": """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. - Description for Creates a domain ownership identifier for web app, or updates an existing - ownership identifier. + 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 @@ -31715,6 +33717,7 @@ def update_domain_ownership_identifier_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(domain_ownership_identifier, 'Identifier') @@ -31725,6 +33728,7 @@ def update_domain_ownership_identifier_slot( domain_ownership_identifier_name=domain_ownership_identifier_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_domain_ownership_identifier_slot.metadata['url'], @@ -31732,7 +33736,11 @@ def update_domain_ownership_identifier_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31747,7 +33755,7 @@ def update_domain_ownership_identifier_slot( return deserialized - update_domain_ownership_identifier_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}'} # type: ignore + update_domain_ownership_identifier_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}"} # type: ignore @distributed_trace @@ -31760,7 +33768,7 @@ def get_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -31779,18 +33787,25 @@ def get_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ms_deploy_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31805,7 +33820,7 @@ def get_ms_deploy_status_slot( return deserialized - get_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + get_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore def _create_ms_deploy_operation_slot_initial( @@ -31822,6 +33837,7 @@ def _create_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -31831,6 +33847,7 @@ def _create_ms_deploy_operation_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_ms_deploy_operation_slot_initial.metadata['url'], @@ -31838,7 +33855,11 @@ def _create_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -31852,7 +33873,7 @@ def _create_ms_deploy_operation_slot_initial( return deserialized - _create_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + _create_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -31866,7 +33887,7 @@ def begin_create_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -31889,8 +33910,9 @@ def begin_create_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -31903,6 +33925,7 @@ def begin_create_ms_deploy_operation_slot( name=name, slot=slot, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -31927,10 +33950,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy'} # type: ignore + begin_create_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_ms_deploy_log_slot( @@ -31942,7 +33964,7 @@ def get_ms_deploy_log_slot( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -31961,18 +33983,25 @@ def get_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_ms_deploy_log_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -31987,7 +34016,7 @@ def get_ms_deploy_log_slot( return deserialized - get_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log'} # type: ignore + get_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -32000,7 +34029,7 @@ def list_instance_functions_slot( ) -> Iterable["_models.FunctionEnvelopeCollection"]: """List the functions for a web site, or a deployment slot. - Description for List the functions for a web site, or a deployment slot. + 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 @@ -32015,6 +34044,8 @@ def list_instance_functions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.FunctionEnvelopeCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelopeCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32028,6 +34059,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_functions_slot.metadata['url'], ) request = _convert_request(request) @@ -32040,6 +34072,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -32057,7 +34090,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32071,7 +34108,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions'} # type: ignore + list_instance_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions"} # type: ignore @distributed_trace def get_functions_admin_token_slot( @@ -32083,7 +34120,7 @@ def get_functions_admin_token_slot( ) -> str: """Fetch a short lived token that can be exchanged for a master key. - Description for Fetch a short lived token that can be exchanged for a master key. + 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 @@ -32102,18 +34139,25 @@ def get_functions_admin_token_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_functions_admin_token_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_functions_admin_token_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32128,7 +34172,7 @@ def get_functions_admin_token_slot( return deserialized - get_functions_admin_token_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token'} # type: ignore + get_functions_admin_token_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token"} # type: ignore @distributed_trace @@ -32142,7 +34186,7 @@ def get_instance_function_slot( ) -> "_models.FunctionEnvelope": """Get function information by its ID for web site, or a deployment slot. - Description for Get function information by its ID for web site, or a deployment slot. + 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 @@ -32163,6 +34207,8 @@ def get_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_function_slot_request( resource_group_name=resource_group_name, @@ -32170,12 +34216,17 @@ def get_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32190,7 +34241,7 @@ def get_instance_function_slot( return deserialized - get_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + get_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore def _create_instance_function_slot_initial( @@ -32208,6 +34259,7 @@ def _create_instance_function_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(function_envelope, 'FunctionEnvelope') @@ -32218,6 +34270,7 @@ def _create_instance_function_slot_initial( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_function_slot_initial.metadata['url'], @@ -32225,7 +34278,11 @@ def _create_instance_function_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -32239,7 +34296,7 @@ def _create_instance_function_slot_initial( return deserialized - _create_instance_function_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + _create_instance_function_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -32254,7 +34311,7 @@ def begin_create_instance_function_slot( ) -> LROPoller["_models.FunctionEnvelope"]: """Create function for web site, or a deployment slot. - Description for 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 @@ -32279,8 +34336,9 @@ def begin_create_instance_function_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.FunctionEnvelope] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.FunctionEnvelope"] lro_delay = kwargs.pop( 'polling_interval', @@ -32294,6 +34352,7 @@ def begin_create_instance_function_slot( function_name=function_name, slot=slot, function_envelope=function_envelope, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -32318,13 +34377,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + begin_create_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace - def delete_instance_function_slot( + def delete_instance_function_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32334,7 +34392,7 @@ def delete_instance_function_slot( ) -> None: """Delete a function for web site, or a deployment slot. - Description for 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 @@ -32355,6 +34413,8 @@ def delete_instance_function_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_instance_function_slot_request( resource_group_name=resource_group_name, @@ -32362,12 +34422,17 @@ def delete_instance_function_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_function_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32378,7 +34443,7 @@ def delete_instance_function_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_function_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}'} # type: ignore + delete_instance_function_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}"} # type: ignore @distributed_trace @@ -32394,7 +34459,7 @@ def create_or_update_function_secret_slot( ) -> "_models.KeyInfo": """Add or update a function secret. - Description for 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 @@ -32419,6 +34484,7 @@ def create_or_update_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -32430,6 +34496,7 @@ def create_or_update_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_function_secret_slot.metadata['url'], @@ -32437,7 +34504,11 @@ def create_or_update_function_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -32456,11 +34527,11 @@ def create_or_update_function_secret_slot( return deserialized - create_or_update_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + create_or_update_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace - def delete_function_secret_slot( + def delete_function_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32471,7 +34542,7 @@ def delete_function_secret_slot( ) -> None: """Delete a function secret. - Description for 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 @@ -32494,6 +34565,8 @@ def delete_function_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_function_secret_slot_request( resource_group_name=resource_group_name, @@ -32502,12 +34575,17 @@ def delete_function_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_function_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32518,7 +34596,7 @@ def delete_function_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_function_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}'} # type: ignore + delete_function_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}"} # type: ignore @distributed_trace @@ -32532,7 +34610,7 @@ def list_function_keys_slot( ) -> "_models.StringDictionary": """Get function keys for a function in a web site, or a deployment slot. - Description for Get function keys for a function in a web site, or a deployment slot. + 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 @@ -32553,6 +34631,8 @@ def list_function_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_function_keys_slot_request( resource_group_name=resource_group_name, @@ -32560,12 +34640,17 @@ def list_function_keys_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32580,7 +34665,7 @@ def list_function_keys_slot( return deserialized - list_function_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys'} # type: ignore + list_function_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys"} # type: ignore @distributed_trace @@ -32594,7 +34679,7 @@ def list_function_secrets_slot( ) -> "_models.FunctionSecrets": """Get function secrets for a function in a web site, or a deployment slot. - Description for Get function secrets for a function in a web site, or a deployment slot. + 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 @@ -32615,6 +34700,8 @@ def list_function_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_function_secrets_slot_request( resource_group_name=resource_group_name, @@ -32622,12 +34709,17 @@ def list_function_secrets_slot( function_name=function_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_function_secrets_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32642,7 +34734,7 @@ def list_function_secrets_slot( return deserialized - list_function_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets'} # type: ignore + list_function_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets"} # type: ignore @distributed_trace @@ -32655,7 +34747,7 @@ def list_host_keys_slot( ) -> "_models.HostKeys": """Get host secrets for a function app. - Description for 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 @@ -32674,18 +34766,25 @@ def list_host_keys_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_host_keys_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_keys_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -32700,11 +34799,11 @@ def list_host_keys_slot( return deserialized - list_host_keys_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys'} # type: ignore + list_host_keys_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listkeys"} # type: ignore @distributed_trace - def list_sync_status_slot( + def list_sync_status_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32713,7 +34812,7 @@ def list_sync_status_slot( ) -> None: """This is to allow calling via powershell and ARM template. - Description for 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 @@ -32732,18 +34831,25 @@ def list_sync_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_sync_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32754,11 +34860,11 @@ def list_sync_status_slot( if cls: return cls(pipeline_response, None, {}) - list_sync_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus'} # type: ignore + list_sync_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus"} # type: ignore @distributed_trace - def sync_functions_slot( + def sync_functions_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32767,7 +34873,7 @@ def sync_functions_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -32786,18 +34892,25 @@ def sync_functions_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_functions_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_functions_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32808,7 +34921,7 @@ def sync_functions_slot( if cls: return cls(pipeline_response, None, {}) - sync_functions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync'} # type: ignore + sync_functions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/sync"} # type: ignore @distributed_trace @@ -32824,7 +34937,7 @@ def create_or_update_host_secret_slot( ) -> "_models.KeyInfo": """Add or update a host level secret. - Description for 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 @@ -32849,6 +34962,7 @@ def create_or_update_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(key, 'KeyInfo') @@ -32860,6 +34974,7 @@ def create_or_update_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_secret_slot.metadata['url'], @@ -32867,7 +34982,11 @@ def create_or_update_host_secret_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -32886,11 +35005,11 @@ def create_or_update_host_secret_slot( return deserialized - create_or_update_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + create_or_update_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace - def delete_host_secret_slot( + def delete_host_secret_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -32901,7 +35020,7 @@ def delete_host_secret_slot( ) -> None: """Delete a host level secret. - Description for 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 @@ -32924,6 +35043,8 @@ def delete_host_secret_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_host_secret_slot_request( resource_group_name=resource_group_name, @@ -32932,12 +35053,17 @@ def delete_host_secret_slot( key_name=key_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_secret_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -32948,7 +35074,7 @@ def delete_host_secret_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_secret_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}'} # type: ignore + delete_host_secret_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}"} # type: ignore @distributed_trace @@ -32961,7 +35087,7 @@ def list_host_name_bindings_slot( ) -> Iterable["_models.HostNameBindingCollection"]: """Get hostname bindings for an app or a deployment slot. - Description for Get hostname bindings for an app or a deployment slot. + 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 @@ -32977,6 +35103,8 @@ def list_host_name_bindings_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.HostNameBindingCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostNameBindingCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -32990,6 +35118,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_host_name_bindings_slot.metadata['url'], ) request = _convert_request(request) @@ -33002,6 +35131,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33019,7 +35149,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33033,7 +35167,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_host_name_bindings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings'} # type: ignore + list_host_name_bindings_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings"} # type: ignore @distributed_trace def get_host_name_binding_slot( @@ -33046,7 +35180,7 @@ def get_host_name_binding_slot( ) -> "_models.HostNameBinding": """Get the named hostname binding for an app (or deployment slot, if specified). - Description for Get the named hostname binding for an app (or deployment slot, if specified). + 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 @@ -33068,6 +35202,8 @@ def get_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -33075,12 +35211,17 @@ def get_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33095,7 +35236,7 @@ def get_host_name_binding_slot( return deserialized - get_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + get_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -33110,7 +35251,7 @@ def create_or_update_host_name_binding_slot( ) -> "_models.HostNameBinding": """Creates a hostname binding for an app. - Description for 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 @@ -33135,6 +35276,7 @@ def create_or_update_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(host_name_binding, 'HostNameBinding') @@ -33145,6 +35287,7 @@ def create_or_update_host_name_binding_slot( host_name=host_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_host_name_binding_slot.metadata['url'], @@ -33152,7 +35295,11 @@ def create_or_update_host_name_binding_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33167,11 +35314,11 @@ def create_or_update_host_name_binding_slot( return deserialized - create_or_update_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + create_or_update_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace - def delete_host_name_binding_slot( + def delete_host_name_binding_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33181,7 +35328,7 @@ def delete_host_name_binding_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -33203,6 +35350,8 @@ def delete_host_name_binding_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_host_name_binding_slot_request( resource_group_name=resource_group_name, @@ -33210,12 +35359,17 @@ def delete_host_name_binding_slot( slot=slot, host_name=host_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_host_name_binding_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -33226,7 +35380,7 @@ def delete_host_name_binding_slot( if cls: return cls(pipeline_response, None, {}) - delete_host_name_binding_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}'} # type: ignore + delete_host_name_binding_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}"} # type: ignore @distributed_trace @@ -33241,7 +35395,7 @@ def get_hybrid_connection_slot( ) -> "_models.HybridConnection": """Retrieves a specific Service Bus Hybrid Connection used by this Web App. - Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + 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 @@ -33264,6 +35418,8 @@ def get_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -33272,12 +35428,17 @@ def get_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33292,7 +35453,7 @@ def get_hybrid_connection_slot( return deserialized - get_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + get_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -33308,7 +35469,7 @@ def create_or_update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -33333,6 +35494,7 @@ def create_or_update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -33344,6 +35506,7 @@ def create_or_update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_hybrid_connection_slot.metadata['url'], @@ -33351,7 +35514,11 @@ def create_or_update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33366,11 +35533,11 @@ def create_or_update_hybrid_connection_slot( return deserialized - create_or_update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + create_or_update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace - def delete_hybrid_connection_slot( + def delete_hybrid_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33381,7 +35548,7 @@ def delete_hybrid_connection_slot( ) -> None: """Removes a Hybrid Connection from this site. - Description for 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 @@ -33404,6 +35571,8 @@ def delete_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_hybrid_connection_slot_request( resource_group_name=resource_group_name, @@ -33412,12 +35581,17 @@ def delete_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_hybrid_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33428,7 +35602,7 @@ def delete_hybrid_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + delete_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -33444,7 +35618,7 @@ def update_hybrid_connection_slot( ) -> "_models.HybridConnection": """Creates a new Hybrid Connection using a Service Bus relay. - Description for 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 @@ -33469,6 +35643,7 @@ def update_hybrid_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'HybridConnection') @@ -33480,6 +35655,7 @@ def update_hybrid_connection_slot( relay_name=relay_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_hybrid_connection_slot.metadata['url'], @@ -33487,7 +35663,11 @@ def update_hybrid_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33502,7 +35682,7 @@ def update_hybrid_connection_slot( return deserialized - update_hybrid_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}'} # type: ignore + update_hybrid_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}"} # type: ignore @distributed_trace @@ -33515,7 +35695,7 @@ def list_hybrid_connections_slot( ) -> "_models.HybridConnection": """Retrieves all Service Bus Hybrid Connections used by this Web App. - Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + 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 @@ -33534,18 +35714,25 @@ def list_hybrid_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_hybrid_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_hybrid_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33560,7 +35747,7 @@ def list_hybrid_connections_slot( return deserialized - list_hybrid_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'} # type: ignore + list_hybrid_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays"} # type: ignore @distributed_trace @@ -33573,8 +35760,7 @@ def list_relay_service_connections_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets hybrid connections configured for an app (or deployment slot, if specified). - Description for Gets hybrid connections configured for an app (or deployment slot, if - specified). + 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 @@ -33594,18 +35780,25 @@ def list_relay_service_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_relay_service_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_relay_service_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33620,7 +35813,7 @@ def list_relay_service_connections_slot( return deserialized - list_relay_service_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection'} # type: ignore + list_relay_service_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection"} # type: ignore @distributed_trace @@ -33634,7 +35827,7 @@ def get_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Gets a hybrid connection configuration by its name. - Description for 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 @@ -33656,6 +35849,8 @@ def get_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -33663,12 +35858,17 @@ def get_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33683,7 +35883,7 @@ def get_relay_service_connection_slot( return deserialized - get_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + get_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33698,8 +35898,7 @@ def create_or_update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -33723,6 +35922,7 @@ def create_or_update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -33733,6 +35933,7 @@ def create_or_update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_relay_service_connection_slot.metadata['url'], @@ -33740,7 +35941,11 @@ def create_or_update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33755,11 +35960,11 @@ def create_or_update_relay_service_connection_slot( return deserialized - create_or_update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + create_or_update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace - def delete_relay_service_connection_slot( + def delete_relay_service_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -33769,7 +35974,7 @@ def delete_relay_service_connection_slot( ) -> None: """Deletes a relay service connection by its name. - Description for 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 @@ -33791,6 +35996,8 @@ def delete_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_relay_service_connection_slot_request( resource_group_name=resource_group_name, @@ -33798,12 +36005,17 @@ def delete_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_relay_service_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33814,7 +36026,7 @@ def delete_relay_service_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + delete_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33829,8 +36041,7 @@ def update_relay_service_connection_slot( ) -> "_models.RelayServiceConnectionEntity": """Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). - Description for Creates a new hybrid connection configuration (PUT), or updates an existing one - (PATCH). + 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 @@ -33854,6 +36065,7 @@ def update_relay_service_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') @@ -33864,6 +36076,7 @@ def update_relay_service_connection_slot( entity_name=entity_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_relay_service_connection_slot.metadata['url'], @@ -33871,7 +36084,11 @@ def update_relay_service_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33886,7 +36103,7 @@ def update_relay_service_connection_slot( return deserialized - update_relay_service_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}'} # type: ignore + update_relay_service_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}"} # type: ignore @distributed_trace @@ -33899,7 +36116,7 @@ def list_instance_identifiers_slot( ) -> Iterable["_models.WebAppInstanceStatusCollection"]: """Gets all scale-out instances of an app. - Description for 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 @@ -33915,6 +36132,8 @@ def list_instance_identifiers_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebAppInstanceStatusCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebAppInstanceStatusCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -33928,6 +36147,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_identifiers_slot.metadata['url'], ) request = _convert_request(request) @@ -33940,6 +36160,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -33957,7 +36178,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -33971,7 +36196,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_identifiers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances'} # type: ignore + list_instance_identifiers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances"} # type: ignore @distributed_trace def get_instance_info_slot( @@ -33984,7 +36209,7 @@ def get_instance_info_slot( ) -> "_models.WebSiteInstanceStatus": """Gets all scale-out instances of an app. - Description for 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 @@ -34006,6 +36231,8 @@ def get_instance_info_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_info_slot_request( resource_group_name=resource_group_name, @@ -34013,12 +36240,17 @@ def get_instance_info_slot( instance_id=instance_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_info_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34033,7 +36265,7 @@ def get_instance_info_slot( return deserialized - get_instance_info_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}'} # type: ignore + get_instance_info_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}"} # type: ignore @distributed_trace @@ -34047,7 +36279,7 @@ def get_instance_ms_deploy_status_slot( ) -> "_models.MSDeployStatus": """Get the status of the last MSDeploy operation. - Description for 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 @@ -34068,6 +36300,8 @@ def get_instance_ms_deploy_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_ms_deploy_status_slot_request( resource_group_name=resource_group_name, @@ -34075,12 +36309,17 @@ def get_instance_ms_deploy_status_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34095,7 +36334,7 @@ def get_instance_ms_deploy_status_slot( return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + get_instance_ms_deploy_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore def _create_instance_ms_deploy_operation_slot_initial( @@ -34113,6 +36352,7 @@ def _create_instance_ms_deploy_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(ms_deploy, 'MSDeploy') @@ -34123,6 +36363,7 @@ def _create_instance_ms_deploy_operation_slot_initial( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_instance_ms_deploy_operation_slot_initial.metadata['url'], @@ -34130,7 +36371,11 @@ def _create_instance_ms_deploy_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [201]: @@ -34144,7 +36389,7 @@ def _create_instance_ms_deploy_operation_slot_initial( return deserialized - _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + _create_instance_ms_deploy_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace @@ -34159,7 +36404,7 @@ def begin_create_instance_ms_deploy_operation_slot( ) -> LROPoller["_models.MSDeployStatus"]: """Invoke the MSDeploy web app extension. - Description for 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 @@ -34184,8 +36429,9 @@ def begin_create_instance_ms_deploy_operation_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.MSDeployStatus] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.MSDeployStatus"] lro_delay = kwargs.pop( 'polling_interval', @@ -34199,6 +36445,7 @@ def begin_create_instance_ms_deploy_operation_slot( slot=slot, instance_id=instance_id, ms_deploy=ms_deploy, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -34223,10 +36470,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} # type: ignore + begin_create_instance_ms_deploy_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy"} # type: ignore @distributed_trace def get_instance_ms_deploy_log_slot( @@ -34239,7 +36485,7 @@ def get_instance_ms_deploy_log_slot( ) -> "_models.MSDeployLog": """Get the MSDeploy Log for the last MSDeploy operation. - Description for 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 @@ -34260,6 +36506,8 @@ def get_instance_ms_deploy_log_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_ms_deploy_log_slot_request( resource_group_name=resource_group_name, @@ -34267,12 +36515,17 @@ def get_instance_ms_deploy_log_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_ms_deploy_log_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34287,7 +36540,7 @@ def get_instance_ms_deploy_log_slot( return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} # type: ignore + get_instance_ms_deploy_log_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log"} # type: ignore @distributed_trace @@ -34302,8 +36555,8 @@ def list_instance_processes_slot( """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. + 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 @@ -34321,6 +36574,8 @@ def list_instance_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34335,6 +36590,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -34348,6 +36604,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34365,7 +36622,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34379,7 +36640,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} # type: ignore + list_instance_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes"} # type: ignore @distributed_trace def get_instance_process_slot( @@ -34393,8 +36654,7 @@ def get_instance_process_slot( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34419,6 +36679,8 @@ def get_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_slot_request( resource_group_name=resource_group_name, @@ -34427,12 +36689,17 @@ def get_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34447,11 +36714,11 @@ def get_instance_process_slot( return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + get_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace - def delete_instance_process_slot( + def delete_instance_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -34463,8 +36730,8 @@ def delete_instance_process_slot( """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. + 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 @@ -34489,6 +36756,8 @@ def delete_instance_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_instance_process_slot_request( resource_group_name=resource_group_name, @@ -34497,12 +36766,17 @@ def delete_instance_process_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_instance_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -34513,7 +36787,7 @@ def delete_instance_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} # type: ignore + delete_instance_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}"} # type: ignore @distributed_trace @@ -34528,8 +36802,7 @@ def get_instance_process_dump_slot( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -34554,6 +36827,8 @@ def get_instance_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_dump_slot_request( resource_group_name=resource_group_name, @@ -34562,12 +36837,17 @@ def get_instance_process_dump_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34582,7 +36862,7 @@ def get_instance_process_dump_slot( return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} # type: ignore + get_instance_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -34598,8 +36878,8 @@ def list_instance_process_modules_slot( """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. + 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 @@ -34620,6 +36900,8 @@ def list_instance_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34635,6 +36917,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -34649,6 +36932,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34666,7 +36950,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34680,7 +36968,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} # type: ignore + list_instance_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_instance_process_module_slot( @@ -34695,8 +36983,7 @@ def get_instance_process_module_slot( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -34723,6 +37010,8 @@ def get_instance_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_instance_process_module_slot_request( resource_group_name=resource_group_name, @@ -34732,12 +37021,17 @@ def get_instance_process_module_slot( slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_instance_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34752,7 +37046,7 @@ def get_instance_process_module_slot( return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_instance_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -34767,8 +37061,7 @@ def list_instance_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -34789,6 +37082,8 @@ def list_instance_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34804,6 +37099,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_instance_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -34818,6 +37114,7 @@ def prepare_request(next_link=None): slot=slot, instance_id=instance_id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34835,7 +37132,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34849,7 +37150,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} # type: ignore + list_instance_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads"} # type: ignore @distributed_trace def is_cloneable_slot( @@ -34861,7 +37162,7 @@ def is_cloneable_slot( ) -> "_models.SiteCloneability": """Shows whether an app can be cloned to another resource group or subscription. - Description for Shows whether an app can be cloned to another resource group or subscription. + 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 @@ -34881,18 +37182,25 @@ def is_cloneable_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_is_cloneable_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.is_cloneable_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34907,7 +37215,7 @@ def is_cloneable_slot( return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} # type: ignore + is_cloneable_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable"} # type: ignore @distributed_trace @@ -34920,7 +37228,7 @@ def list_site_backups_slot( ) -> Iterable["_models.BackupItemCollection"]: """Gets existing backups of an app. - Description for 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 @@ -34935,6 +37243,8 @@ def list_site_backups_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.BackupItemCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupItemCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -34948,6 +37258,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_backups_slot.metadata['url'], ) request = _convert_request(request) @@ -34960,6 +37271,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -34977,7 +37289,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -34991,7 +37307,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups'} # type: ignore + list_site_backups_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listbackups"} # type: ignore @distributed_trace def list_sync_function_triggers_slot( @@ -35003,7 +37319,7 @@ def list_sync_function_triggers_slot( ) -> "_models.FunctionSecrets": """This is to allow calling via powershell and ARM template. - Description for 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 @@ -35022,18 +37338,25 @@ def list_sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35048,7 +37371,7 @@ def list_sync_function_triggers_slot( return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} # type: ignore + list_sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus"} # type: ignore @distributed_trace @@ -35062,8 +37385,8 @@ def get_migrate_my_sql_status_slot( """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. + 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 @@ -35082,18 +37405,25 @@ def get_migrate_my_sql_status_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_migrate_my_sql_status_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_migrate_my_sql_status_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35108,7 +37438,7 @@ def get_migrate_my_sql_status_slot( return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} # type: ignore + get_migrate_my_sql_status_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status"} # type: ignore @distributed_trace @@ -35121,7 +37451,7 @@ def get_swift_virtual_network_connection_slot( ) -> "_models.SwiftVirtualNetwork": """Gets a Swift Virtual Network connection. - Description for 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 @@ -35141,18 +37471,25 @@ def get_swift_virtual_network_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_swift_virtual_network_connection_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_swift_virtual_network_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35167,7 +37504,7 @@ def get_swift_virtual_network_connection_slot( return deserialized - get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + get_swift_virtual_network_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -35184,9 +37521,9 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( 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 + 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. @@ -35209,6 +37546,7 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -35218,6 +37556,7 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_swift_virtual_network_connection_with_check_slot.metadata['url'], @@ -35225,7 +37564,11 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35240,11 +37583,11 @@ def create_or_update_swift_virtual_network_connection_with_check_slot( return deserialized - create_or_update_swift_virtual_network_connection_with_check_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + create_or_update_swift_virtual_network_connection_with_check_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace - def delete_swift_virtual_network_slot( + def delete_swift_virtual_network_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35253,7 +37596,7 @@ def delete_swift_virtual_network_slot( ) -> None: """Deletes a Swift Virtual Network connection from an app (or deployment slot). - Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + 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 @@ -35273,18 +37616,25 @@ def delete_swift_virtual_network_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_swift_virtual_network_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_swift_virtual_network_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35295,7 +37645,7 @@ def delete_swift_virtual_network_slot( if cls: return cls(pipeline_response, None, {}) - delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + delete_swift_virtual_network_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -35312,9 +37662,9 @@ def update_swift_virtual_network_connection_with_check_slot( 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 + 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. @@ -35337,6 +37687,7 @@ def update_swift_virtual_network_connection_with_check_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') @@ -35346,6 +37697,7 @@ def update_swift_virtual_network_connection_with_check_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_swift_virtual_network_connection_with_check_slot.metadata['url'], @@ -35353,7 +37705,11 @@ def update_swift_virtual_network_connection_with_check_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35368,7 +37724,7 @@ def update_swift_virtual_network_connection_with_check_slot( return deserialized - update_swift_virtual_network_connection_with_check_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} # type: ignore + update_swift_virtual_network_connection_with_check_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork"} # type: ignore @distributed_trace @@ -35382,7 +37738,7 @@ def list_network_features_slot( ) -> "_models.NetworkFeatures": """Gets all network features used by the app (or deployment slot, if specified). - Description for Gets all network features used by the app (or deployment slot, if specified). + 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 @@ -35404,6 +37760,8 @@ def list_network_features_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_network_features_slot_request( resource_group_name=resource_group_name, @@ -35411,12 +37769,17 @@ def list_network_features_slot( view=view, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_network_features_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35431,7 +37794,7 @@ def list_network_features_slot( return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} # type: ignore + list_network_features_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}"} # type: ignore @distributed_trace @@ -35445,8 +37808,7 @@ def get_network_trace_operation_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35468,6 +37830,8 @@ def get_network_trace_operation_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_trace_operation_slot_request( resource_group_name=resource_group_name, @@ -35475,12 +37839,17 @@ def get_network_trace_operation_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35499,7 +37868,7 @@ def get_network_trace_operation_slot( return deserialized - get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -35515,7 +37884,7 @@ def start_web_site_network_trace_slot( ) -> str: """Start capturing network packets for the site (To be deprecated). - Description for 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 @@ -35523,11 +37892,11 @@ def start_web_site_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :return: str, or the result of cls(response) @@ -35540,12 +37909,15 @@ def start_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -35554,7 +37926,11 @@ def start_web_site_network_trace_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35569,7 +37945,7 @@ def start_web_site_network_trace_slot( return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} # type: ignore + start_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start"} # type: ignore def _start_web_site_network_trace_operation_slot_initial( @@ -35588,12 +37964,15 @@ def _start_web_site_network_trace_operation_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_web_site_network_trace_operation_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -35602,7 +37981,11 @@ def _start_web_site_network_trace_operation_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35620,7 +38003,7 @@ def _start_web_site_network_trace_operation_slot_initial( return deserialized - _start_web_site_network_trace_operation_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + _start_web_site_network_trace_operation_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace @@ -35636,7 +38019,7 @@ def begin_start_web_site_network_trace_operation_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -35644,11 +38027,11 @@ def begin_start_web_site_network_trace_operation_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -35663,7 +38046,8 @@ def begin_start_web_site_network_trace_operation_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_03_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -35678,6 +38062,7 @@ def begin_start_web_site_network_trace_operation_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -35701,13 +38086,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} # type: ignore + begin_start_web_site_network_trace_operation_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation"} # type: ignore @distributed_trace - def stop_web_site_network_trace_slot( + def stop_web_site_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35716,7 +38100,7 @@ def stop_web_site_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -35735,18 +38119,25 @@ def stop_web_site_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_web_site_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_web_site_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -35757,7 +38148,7 @@ def stop_web_site_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} # type: ignore + stop_web_site_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop"} # type: ignore @distributed_trace @@ -35771,8 +38162,7 @@ def get_network_traces_slot( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35794,6 +38184,8 @@ def get_network_traces_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_traces_slot_request( resource_group_name=resource_group_name, @@ -35801,12 +38193,17 @@ def get_network_traces_slot( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35821,7 +38218,7 @@ def get_network_traces_slot( return deserialized - get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} # type: ignore + get_network_traces_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}"} # type: ignore @distributed_trace @@ -35835,8 +38232,7 @@ def get_network_trace_operation_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35858,6 +38254,8 @@ def get_network_trace_operation_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_trace_operation_slot_v2_request( resource_group_name=resource_group_name, @@ -35865,12 +38263,17 @@ def get_network_trace_operation_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_trace_operation_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -35889,7 +38292,7 @@ def get_network_trace_operation_slot_v2( return deserialized - get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} # type: ignore + get_network_trace_operation_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}"} # type: ignore @distributed_trace @@ -35903,8 +38306,7 @@ def get_network_traces_slot_v2( ) -> List["_models.NetworkTrace"]: """Gets a named operation for a network trace capturing (or deployment slot, if specified). - Description for Gets a named operation for a network trace capturing (or deployment slot, if - specified). + 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 @@ -35926,6 +38328,8 @@ def get_network_traces_slot_v2( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_network_traces_slot_v2_request( resource_group_name=resource_group_name, @@ -35933,12 +38337,17 @@ def get_network_traces_slot_v2( operation_id=operation_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_network_traces_slot_v2.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -35953,11 +38362,11 @@ def get_network_traces_slot_v2( return deserialized - get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} # type: ignore + get_network_traces_slot_v2.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}"} # type: ignore @distributed_trace - def generate_new_site_publishing_password_slot( + def generate_new_site_publishing_password_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -35966,8 +38375,7 @@ def generate_new_site_publishing_password_slot( ) -> None: """Generates a new publishing password for an app (or deployment slot, if specified). - Description for Generates a new publishing password for an app (or deployment slot, if - specified). + 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 @@ -35987,18 +38395,25 @@ def generate_new_site_publishing_password_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_generate_new_site_publishing_password_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.generate_new_site_publishing_password_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -36009,7 +38424,7 @@ def generate_new_site_publishing_password_slot( if cls: return cls(pipeline_response, None, {}) - generate_new_site_publishing_password_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword'} # type: ignore + generate_new_site_publishing_password_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword"} # type: ignore @distributed_trace @@ -36023,7 +38438,7 @@ def list_perf_mon_counters_slot( ) -> Iterable["_models.PerfMonCounterCollection"]: """Gets perfmon counters for web app. - Description for 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 @@ -36033,7 +38448,7 @@ def list_perf_mon_counters_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]'. + and timeGrain eq duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PerfMonCounterCollection or the result of @@ -36042,6 +38457,8 @@ def list_perf_mon_counters_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PerfMonCounterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerfMonCounterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36055,6 +38472,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_perf_mon_counters_slot.metadata['url'], ) @@ -36068,6 +38486,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -36086,7 +38505,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36100,7 +38523,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_perf_mon_counters_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters'} # type: ignore + list_perf_mon_counters_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters"} # type: ignore @distributed_trace def get_site_php_error_log_flag_slot( @@ -36112,7 +38535,7 @@ def get_site_php_error_log_flag_slot( ) -> "_models.SitePhpErrorLogFlag": """Gets web app's event logs. - Description for 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 @@ -36131,18 +38554,25 @@ def get_site_php_error_log_flag_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_php_error_log_flag_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_php_error_log_flag_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36157,7 +38587,7 @@ def get_site_php_error_log_flag_slot( return deserialized - get_site_php_error_log_flag_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging'} # type: ignore + get_site_php_error_log_flag_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging"} # type: ignore @distributed_trace @@ -36170,7 +38600,7 @@ def list_premier_add_ons_slot( ) -> "_models.PremierAddOn": """Gets the premier add-ons of an app. - Description for 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 @@ -36190,18 +38620,25 @@ def list_premier_add_ons_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_premier_add_ons_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_ons_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36216,7 +38653,7 @@ def list_premier_add_ons_slot( return deserialized - list_premier_add_ons_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons'} # type: ignore + list_premier_add_ons_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons"} # type: ignore @distributed_trace @@ -36230,7 +38667,7 @@ def get_premier_add_on_slot( ) -> "_models.PremierAddOn": """Gets a named add-on of an app. - Description for 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 @@ -36252,6 +38689,8 @@ def get_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -36259,12 +38698,17 @@ def get_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36279,7 +38723,7 @@ def get_premier_add_on_slot( return deserialized - get_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + get_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -36294,7 +38738,7 @@ def add_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -36318,6 +38762,7 @@ def add_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOn') @@ -36328,6 +38773,7 @@ def add_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.add_premier_add_on_slot.metadata['url'], @@ -36335,7 +38781,11 @@ def add_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36350,11 +38800,11 @@ def add_premier_add_on_slot( return deserialized - add_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + add_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace - def delete_premier_add_on_slot( + def delete_premier_add_on_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -36364,7 +38814,7 @@ def delete_premier_add_on_slot( ) -> None: """Delete a premier add-on from an app. - Description for 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 @@ -36386,6 +38836,8 @@ def delete_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_premier_add_on_slot_request( resource_group_name=resource_group_name, @@ -36393,12 +38845,17 @@ def delete_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_premier_add_on_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36409,7 +38866,7 @@ def delete_premier_add_on_slot( if cls: return cls(pipeline_response, None, {}) - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + delete_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -36424,7 +38881,7 @@ def update_premier_add_on_slot( ) -> "_models.PremierAddOn": """Updates a named add-on of an app. - Description for 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 @@ -36448,6 +38905,7 @@ def update_premier_add_on_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') @@ -36458,6 +38916,7 @@ def update_premier_add_on_slot( premier_add_on_name=premier_add_on_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_premier_add_on_slot.metadata['url'], @@ -36465,7 +38924,11 @@ def update_premier_add_on_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36480,7 +38943,7 @@ def update_premier_add_on_slot( return deserialized - update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} # type: ignore + update_premier_add_on_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}"} # type: ignore @distributed_trace @@ -36494,8 +38957,8 @@ def get_private_access_slot( """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. + 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 @@ -36514,18 +38977,25 @@ def get_private_access_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_access_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_access_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36540,7 +39010,7 @@ def get_private_access_slot( return deserialized - get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + get_private_access_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -36555,8 +39025,8 @@ def put_private_access_vnet_slot( """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. + 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 @@ -36577,6 +39047,7 @@ def put_private_access_vnet_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(access, 'PrivateAccess') @@ -36586,6 +39057,7 @@ def put_private_access_vnet_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.put_private_access_vnet_slot.metadata['url'], @@ -36593,7 +39065,11 @@ def put_private_access_vnet_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36608,7 +39084,7 @@ def put_private_access_vnet_slot( return deserialized - put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} # type: ignore + put_private_access_vnet_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks"} # type: ignore @distributed_trace @@ -36621,7 +39097,7 @@ def get_private_endpoint_connection_list_slot( ) -> Iterable["_models.PrivateEndpointConnectionCollection"]: """Gets the list of private endpoint connections associated with a site. - Description for Gets the list of private endpoint connections associated with a site. + 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 @@ -36636,6 +39112,8 @@ def get_private_endpoint_connection_list_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PrivateEndpointConnectionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -36649,6 +39127,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_list_slot.metadata['url'], ) request = _convert_request(request) @@ -36661,6 +39140,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -36678,7 +39158,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36692,7 +39176,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - get_private_endpoint_connection_list_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections'} # type: ignore + get_private_endpoint_connection_list_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections"} # type: ignore @distributed_trace def get_private_endpoint_connection_slot( @@ -36705,7 +39189,7 @@ def get_private_endpoint_connection_slot( ) -> "_models.RemotePrivateEndpointConnectionARMResource": """Gets a private endpoint connection. - Description for Gets a private endpoint connection. + Gets a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36726,6 +39210,8 @@ def get_private_endpoint_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_endpoint_connection_slot_request( resource_group_name=resource_group_name, @@ -36733,12 +39219,17 @@ def get_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_endpoint_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -36753,7 +39244,7 @@ def get_private_endpoint_connection_slot( return deserialized - get_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + get_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _approve_or_reject_private_endpoint_connection_slot_initial( @@ -36771,6 +39262,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(private_endpoint_wrapper, 'PrivateLinkConnectionApprovalRequestResource') @@ -36781,6 +39273,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._approve_or_reject_private_endpoint_connection_slot_initial.metadata['url'], @@ -36788,7 +39281,11 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -36806,7 +39303,7 @@ def _approve_or_reject_private_endpoint_connection_slot_initial( return deserialized - _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _approve_or_reject_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -36821,7 +39318,7 @@ def begin_approve_or_reject_private_endpoint_connection_slot( ) -> LROPoller["_models.RemotePrivateEndpointConnectionARMResource"]: """Approves or rejects a private endpoint connection. - Description for Approves or rejects a private endpoint connection. + 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 @@ -36848,8 +39345,9 @@ def begin_approve_or_reject_private_endpoint_connection_slot( ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.RemotePrivateEndpointConnectionARMResource] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.RemotePrivateEndpointConnectionARMResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -36863,6 +39361,7 @@ def begin_approve_or_reject_private_endpoint_connection_slot( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, private_endpoint_wrapper=private_endpoint_wrapper, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -36887,10 +39386,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_approve_or_reject_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore def _delete_private_endpoint_connection_slot_initial( self, @@ -36906,6 +39404,8 @@ def _delete_private_endpoint_connection_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_private_endpoint_connection_slot_request_initial( resource_group_name=resource_group_name, @@ -36913,12 +39413,17 @@ def _delete_private_endpoint_connection_slot_initial( private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._delete_private_endpoint_connection_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202, 204]: @@ -36939,7 +39444,7 @@ def _delete_private_endpoint_connection_slot_initial( return deserialized - _delete_private_endpoint_connection_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + _delete_private_endpoint_connection_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace @@ -36953,7 +39458,7 @@ def begin_delete_private_endpoint_connection_slot( ) -> LROPoller[Any]: """Deletes a private endpoint connection. - Description for Deletes a private endpoint connection. + Deletes a private endpoint connection. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -36975,7 +39480,8 @@ def begin_delete_private_endpoint_connection_slot( :rtype: ~azure.core.polling.LROPoller[any] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[Any] lro_delay = kwargs.pop( 'polling_interval', @@ -36988,6 +39494,7 @@ def begin_delete_private_endpoint_connection_slot( name=name, private_endpoint_connection_name=private_endpoint_connection_name, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -37011,10 +39518,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_private_endpoint_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + begin_delete_private_endpoint_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}"} # type: ignore @distributed_trace def get_private_link_resources_slot( @@ -37026,7 +39532,7 @@ def get_private_link_resources_slot( ) -> "_models.PrivateLinkResourcesWrapper": """Gets the private link resources. - Description for Gets the private link resources. + Gets the private link resources. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str @@ -37045,18 +39551,25 @@ def get_private_link_resources_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_private_link_resources_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_private_link_resources_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37071,7 +39584,7 @@ def get_private_link_resources_slot( return deserialized - get_private_link_resources_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources'} # type: ignore + get_private_link_resources_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateLinkResources"} # type: ignore @distributed_trace @@ -37085,8 +39598,8 @@ def list_processes_slot( """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. + 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 @@ -37101,6 +39614,8 @@ def list_processes_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37114,6 +39629,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_processes_slot.metadata['url'], ) request = _convert_request(request) @@ -37126,6 +39642,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37143,7 +39660,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37157,7 +39678,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes'} # type: ignore + list_processes_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes"} # type: ignore @distributed_trace def get_process_slot( @@ -37170,8 +39691,7 @@ def get_process_slot( ) -> "_models.ProcessInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -37193,6 +39713,8 @@ def get_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_slot_request( resource_group_name=resource_group_name, @@ -37200,12 +39722,17 @@ def get_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37220,11 +39747,11 @@ def get_process_slot( return deserialized - get_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + get_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace - def delete_process_slot( + def delete_process_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37235,8 +39762,8 @@ def delete_process_slot( """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. + 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 @@ -37258,6 +39785,8 @@ def delete_process_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_process_slot_request( resource_group_name=resource_group_name, @@ -37265,12 +39794,17 @@ def delete_process_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_process_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -37281,7 +39815,7 @@ def delete_process_slot( if cls: return cls(pipeline_response, None, {}) - delete_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}'} # type: ignore + delete_process_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}"} # type: ignore @distributed_trace @@ -37295,8 +39829,7 @@ def get_process_dump_slot( ) -> IO: """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. - Description for Get a memory dump of a process by its ID for a specific scaled-out instance in - a web site. + 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 @@ -37318,6 +39851,8 @@ def get_process_dump_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_dump_slot_request( resource_group_name=resource_group_name, @@ -37325,12 +39860,17 @@ def get_process_dump_slot( process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_dump_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37345,7 +39885,7 @@ def get_process_dump_slot( return deserialized - get_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump'} # type: ignore + get_process_dump_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump"} # type: ignore @distributed_trace @@ -37360,8 +39900,8 @@ def list_process_modules_slot( """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. + 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 @@ -37379,6 +39919,8 @@ def list_process_modules_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessModuleInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessModuleInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37393,6 +39935,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_modules_slot.metadata['url'], ) request = _convert_request(request) @@ -37406,6 +39949,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37423,7 +39967,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37437,7 +39985,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules'} # type: ignore + list_process_modules_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules"} # type: ignore @distributed_trace def get_process_module_slot( @@ -37451,8 +39999,7 @@ def get_process_module_slot( ) -> "_models.ProcessModuleInfo": """Get process information by its ID for a specific scaled-out instance in a web site. - Description for Get process information by its ID for a specific scaled-out instance in a web - site. + 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 @@ -37476,6 +40023,8 @@ def get_process_module_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_process_module_slot_request( resource_group_name=resource_group_name, @@ -37484,12 +40033,17 @@ def get_process_module_slot( base_address=base_address, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_process_module_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37504,7 +40058,7 @@ def get_process_module_slot( return deserialized - get_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}'} # type: ignore + get_process_module_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}"} # type: ignore @distributed_trace @@ -37518,8 +40072,7 @@ def list_process_threads_slot( ) -> Iterable["_models.ProcessThreadInfoCollection"]: """List the threads in a process by its ID for a specific scaled-out instance in a web site. - Description for List the threads in a process by its ID for a specific scaled-out instance in a - web site. + 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 @@ -37537,6 +40090,8 @@ def list_process_threads_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.ProcessThreadInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProcessThreadInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37551,6 +40106,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_process_threads_slot.metadata['url'], ) request = _convert_request(request) @@ -37564,6 +40120,7 @@ def prepare_request(next_link=None): process_id=process_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37581,7 +40138,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37595,7 +40156,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads'} # type: ignore + list_process_threads_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads"} # type: ignore @distributed_trace def list_public_certificates_slot( @@ -37607,7 +40168,7 @@ def list_public_certificates_slot( ) -> Iterable["_models.PublicCertificateCollection"]: """Get public certificates for an app or a deployment slot. - Description for Get public certificates for an app or a deployment slot. + 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 @@ -37623,6 +40184,8 @@ def list_public_certificates_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PublicCertificateCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicCertificateCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -37636,6 +40199,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_public_certificates_slot.metadata['url'], ) request = _convert_request(request) @@ -37648,6 +40212,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -37665,7 +40230,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37679,7 +40248,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_public_certificates_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates'} # type: ignore + list_public_certificates_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates"} # type: ignore @distributed_trace def get_public_certificate_slot( @@ -37692,7 +40261,7 @@ def get_public_certificate_slot( ) -> "_models.PublicCertificate": """Get the named public certificate for an app (or deployment slot, if specified). - Description for Get the named public certificate for an app (or deployment slot, if specified). + 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 @@ -37714,6 +40283,8 @@ def get_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -37721,12 +40292,17 @@ def get_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37741,7 +40317,7 @@ def get_public_certificate_slot( return deserialized - get_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + get_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -37756,7 +40332,7 @@ def create_or_update_public_certificate_slot( ) -> "_models.PublicCertificate": """Creates a hostname binding for an app. - Description for 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 @@ -37781,6 +40357,7 @@ def create_or_update_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(public_certificate, 'PublicCertificate') @@ -37791,6 +40368,7 @@ def create_or_update_public_certificate_slot( public_certificate_name=public_certificate_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_public_certificate_slot.metadata['url'], @@ -37798,7 +40376,11 @@ def create_or_update_public_certificate_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37813,11 +40395,11 @@ def create_or_update_public_certificate_slot( return deserialized - create_or_update_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + create_or_update_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace - def delete_public_certificate_slot( + def delete_public_certificate_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37827,7 +40409,7 @@ def delete_public_certificate_slot( ) -> None: """Deletes a hostname binding for an app. - Description for 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 @@ -37849,6 +40431,8 @@ def delete_public_certificate_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_public_certificate_slot_request( resource_group_name=resource_group_name, @@ -37856,12 +40440,17 @@ def delete_public_certificate_slot( slot=slot, public_certificate_name=public_certificate_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_public_certificate_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -37872,7 +40461,7 @@ def delete_public_certificate_slot( if cls: return cls(pipeline_response, None, {}) - delete_public_certificate_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}'} # type: ignore + delete_public_certificate_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}"} # type: ignore @distributed_trace @@ -37886,7 +40475,7 @@ def list_publishing_profile_xml_with_secrets_slot( ) -> IO: """Gets the publishing profile for an app (or deployment slot, if specified). - Description for Gets the publishing profile for an app (or deployment slot, if specified). + 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 @@ -37910,6 +40499,7 @@ def list_publishing_profile_xml_with_secrets_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') @@ -37919,6 +40509,7 @@ def list_publishing_profile_xml_with_secrets_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_publishing_profile_xml_with_secrets_slot.metadata['url'], @@ -37926,7 +40517,11 @@ def list_publishing_profile_xml_with_secrets_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=True, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37941,11 +40536,11 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} # type: ignore + list_publishing_profile_xml_with_secrets_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml"} # type: ignore @distributed_trace - def reset_slot_configuration_slot( + def reset_slot_configuration_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -37955,8 +40550,8 @@ def reset_slot_configuration_slot( """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. + 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 @@ -37976,18 +40571,25 @@ def reset_slot_configuration_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_reset_slot_configuration_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.reset_slot_configuration_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -37998,11 +40600,11 @@ def reset_slot_configuration_slot( if cls: return cls(pipeline_response, None, {}) - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} # type: ignore + reset_slot_configuration_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig"} # type: ignore @distributed_trace - def restart_slot( + def restart_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38013,7 +40615,7 @@ def restart_slot( ) -> None: """Restarts an app (or deployment slot, if specified). - Description for 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 @@ -38023,10 +40625,11 @@ def restart_slot( 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. + if necessary. By default, the API always restarts and reprovisions the app. Default value is + None. :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). + false, and the API responds immediately (asynchronous). Default value is None. :type synchronous: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -38039,12 +40642,15 @@ def restart_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_restart_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, soft_restart=soft_restart, synchronous=synchronous, template_url=self.restart_slot.metadata['url'], @@ -38052,7 +40658,11 @@ def restart_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38063,10 +40673,10 @@ def restart_slot( if cls: return cls(pipeline_response, None, {}) - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} # type: ignore + restart_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart"} # type: ignore - def _restore_from_backup_blob_slot_initial( + def _restore_from_backup_blob_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38080,6 +40690,7 @@ def _restore_from_backup_blob_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request, 'RestoreRequest') @@ -38089,6 +40700,7 @@ def _restore_from_backup_blob_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_backup_blob_slot_initial.metadata['url'], @@ -38096,7 +40708,11 @@ def _restore_from_backup_blob_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38106,11 +40722,11 @@ def _restore_from_backup_blob_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_backup_blob_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + _restore_from_backup_blob_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore @distributed_trace - def begin_restore_from_backup_blob_slot( + def begin_restore_from_backup_blob_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38120,7 +40736,7 @@ def begin_restore_from_backup_blob_slot( ) -> LROPoller[None]: """Restores an app from a backup blob in Azure Storage. - Description for 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 @@ -38143,8 +40759,9 @@ def begin_restore_from_backup_blob_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38157,6 +40774,7 @@ def begin_restore_from_backup_blob_slot( name=name, slot=slot, request=request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38178,12 +40796,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} # type: ignore + begin_restore_from_backup_blob_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob"} # type: ignore - def _restore_from_deleted_app_slot_initial( + def _restore_from_deleted_app_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38197,6 +40814,7 @@ def _restore_from_deleted_app_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') @@ -38206,6 +40824,7 @@ def _restore_from_deleted_app_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_from_deleted_app_slot_initial.metadata['url'], @@ -38213,7 +40832,11 @@ def _restore_from_deleted_app_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38223,11 +40846,11 @@ def _restore_from_deleted_app_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_from_deleted_app_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + _restore_from_deleted_app_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore @distributed_trace - def begin_restore_from_deleted_app_slot( + def begin_restore_from_deleted_app_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38237,7 +40860,7 @@ def begin_restore_from_deleted_app_slot( ) -> LROPoller[None]: """Restores a deleted web app to this web app. - Description for 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 @@ -38259,8 +40882,9 @@ def begin_restore_from_deleted_app_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38273,6 +40897,7 @@ def begin_restore_from_deleted_app_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38294,12 +40919,11 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} # type: ignore + begin_restore_from_deleted_app_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp"} # type: ignore - def _restore_snapshot_slot_initial( + def _restore_snapshot_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38313,6 +40937,7 @@ def _restore_snapshot_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(restore_request, 'SnapshotRestoreRequest') @@ -38322,6 +40947,7 @@ def _restore_snapshot_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._restore_snapshot_slot_initial.metadata['url'], @@ -38329,7 +40955,11 @@ def _restore_snapshot_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38339,11 +40969,11 @@ def _restore_snapshot_slot_initial( if cls: return cls(pipeline_response, None, {}) - _restore_snapshot_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + _restore_snapshot_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace - def begin_restore_snapshot_slot( + def begin_restore_snapshot_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38353,7 +40983,7 @@ def begin_restore_snapshot_slot( ) -> LROPoller[None]: """Restores a web app from a snapshot. - Description for 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 @@ -38376,8 +41006,9 @@ def begin_restore_snapshot_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38390,6 +41021,7 @@ def begin_restore_snapshot_slot( name=name, slot=slot, restore_request=restore_request, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38411,10 +41043,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} # type: ignore + begin_restore_snapshot_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot"} # type: ignore @distributed_trace def list_site_extensions_slot( @@ -38426,7 +41057,7 @@ def list_site_extensions_slot( ) -> Iterable["_models.SiteExtensionInfoCollection"]: """Get list of siteextensions for a web site, or a deployment slot. - Description for Get list of siteextensions for a web site, or a deployment slot. + 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 @@ -38442,6 +41073,8 @@ def list_site_extensions_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SiteExtensionInfoCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfoCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38455,6 +41088,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_site_extensions_slot.metadata['url'], ) request = _convert_request(request) @@ -38467,6 +41101,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -38484,7 +41119,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38498,7 +41137,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_extensions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions'} # type: ignore + list_site_extensions_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions"} # type: ignore @distributed_trace def get_site_extension_slot( @@ -38511,7 +41150,7 @@ def get_site_extension_slot( ) -> "_models.SiteExtensionInfo": """Get site extension information by its ID for a web site, or a deployment slot. - Description for Get site extension information by its ID for a web site, or a deployment slot. + 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 @@ -38533,6 +41172,8 @@ def get_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_site_extension_slot_request( resource_group_name=resource_group_name, @@ -38540,12 +41181,17 @@ def get_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38560,7 +41206,7 @@ def get_site_extension_slot( return deserialized - get_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + get_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore def _install_site_extension_slot_initial( @@ -38577,6 +41223,8 @@ def _install_site_extension_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_install_site_extension_slot_request_initial( resource_group_name=resource_group_name, @@ -38584,12 +41232,17 @@ def _install_site_extension_slot_initial( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._install_site_extension_slot_initial.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -38607,7 +41260,7 @@ def _install_site_extension_slot_initial( return deserialized - _install_site_extension_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + _install_site_extension_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -38621,7 +41274,7 @@ def begin_install_site_extension_slot( ) -> LROPoller["_models.SiteExtensionInfo"]: """Install site extension on a web site, or a deployment slot. - Description for Install site extension on a web site, or a deployment slot. + 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 @@ -38645,7 +41298,8 @@ def begin_install_site_extension_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.SiteExtensionInfo] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteExtensionInfo"] lro_delay = kwargs.pop( 'polling_interval', @@ -38658,6 +41312,7 @@ def begin_install_site_extension_slot( name=name, site_extension_id=site_extension_id, slot=slot, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -38681,13 +41336,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_install_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + begin_install_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace - def delete_site_extension_slot( + def delete_site_extension_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38697,7 +41351,7 @@ def delete_site_extension_slot( ) -> None: """Remove a site extension from a web site, or a deployment slot. - Description for Remove a site extension from a web site, or a deployment slot. + 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 @@ -38719,6 +41373,8 @@ def delete_site_extension_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_site_extension_slot_request( resource_group_name=resource_group_name, @@ -38726,12 +41382,17 @@ def delete_site_extension_slot( site_extension_id=site_extension_id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_site_extension_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -38742,7 +41403,7 @@ def delete_site_extension_slot( if cls: return cls(pipeline_response, None, {}) - delete_site_extension_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}'} # type: ignore + delete_site_extension_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}"} # type: ignore @distributed_trace @@ -38756,7 +41417,7 @@ def list_slot_differences_slot( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -38774,6 +41435,7 @@ def list_slot_differences_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -38790,6 +41452,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_slot.metadata['url'], @@ -38805,6 +41468,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -38824,7 +41488,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -38838,9 +41506,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs'} # type: ignore + list_slot_differences_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs"} # type: ignore - def _swap_slot_initial( + def _swap_slot_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38854,6 +41522,7 @@ def _swap_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -38863,6 +41532,7 @@ def _swap_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_initial.metadata['url'], @@ -38870,7 +41540,11 @@ def _swap_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -38880,11 +41554,11 @@ def _swap_slot_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + _swap_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot( + def begin_swap_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -38894,7 +41568,7 @@ def begin_swap_slot( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -38917,8 +41591,9 @@ def begin_swap_slot( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -38931,6 +41606,7 @@ def begin_swap_slot( name=name, slot=slot, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -38952,10 +41628,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap'} # type: ignore + begin_swap_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap"} # type: ignore @distributed_trace def list_snapshots_slot( @@ -38967,7 +41642,7 @@ def list_snapshots_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -38980,6 +41655,8 @@ def list_snapshots_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -38993,6 +41670,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_slot.metadata['url'], ) request = _convert_request(request) @@ -39005,6 +41683,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39022,7 +41701,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39036,7 +41719,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} # type: ignore + list_snapshots_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary_slot( @@ -39048,7 +41731,7 @@ def list_snapshots_from_dr_secondary_slot( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -39061,6 +41744,8 @@ def list_snapshots_from_dr_secondary_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39074,6 +41759,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary_slot.metadata['url'], ) request = _convert_request(request) @@ -39086,6 +41772,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39103,7 +41790,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39117,7 +41808,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control_slot( @@ -39129,7 +41820,7 @@ def get_source_control_slot( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -39149,18 +41840,25 @@ def get_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39182,7 +41880,7 @@ def get_source_control_slot( return deserialized - get_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + get_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_slot_initial( @@ -39199,6 +41897,7 @@ def _create_or_update_source_control_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39208,6 +41907,7 @@ def _create_or_update_source_control_slot_initial( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_slot_initial.metadata['url'], @@ -39215,7 +41915,11 @@ def _create_or_update_source_control_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39236,7 +41940,7 @@ def _create_or_update_source_control_slot_initial( return deserialized - _create_or_update_source_control_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39250,7 +41954,7 @@ def begin_create_or_update_source_control_slot( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -39274,8 +41978,9 @@ def begin_create_or_update_source_control_slot( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -39288,6 +41993,7 @@ def begin_create_or_update_source_control_slot( name=name, slot=slot, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -39312,13 +42018,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control_slot( + def delete_source_control_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39328,7 +42033,7 @@ def delete_source_control_slot( ) -> None: """Deletes the source control configuration of an app. - Description for 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 @@ -39337,7 +42042,7 @@ def delete_source_control_slot( :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: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -39350,19 +42055,26 @@ def delete_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_source_control_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39373,7 +42085,7 @@ def delete_source_control_slot( if cls: return cls(pipeline_response, None, {}) - delete_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + delete_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -39387,7 +42099,7 @@ def update_source_control_slot( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -39409,6 +42121,7 @@ def update_source_control_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -39418,6 +42131,7 @@ def update_source_control_slot( name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control_slot.metadata['url'], @@ -39425,7 +42139,11 @@ def update_source_control_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -39447,11 +42165,11 @@ def update_source_control_slot( return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} # type: ignore + update_source_control_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web"} # type: ignore @distributed_trace - def start_slot( + def start_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39460,7 +42178,7 @@ def start_slot( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -39480,18 +42198,25 @@ def start_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39502,7 +42227,7 @@ def start_slot( if cls: return cls(pipeline_response, None, {}) - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} # type: ignore + start_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start"} # type: ignore def _start_network_trace_slot_initial( @@ -39521,12 +42246,15 @@ def _start_network_trace_slot_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_network_trace_slot_request_initial( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -39535,7 +42263,11 @@ def _start_network_trace_slot_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -39553,7 +42285,7 @@ def _start_network_trace_slot_initial( return deserialized - _start_network_trace_slot_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + _start_network_trace_slot_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace @@ -39569,7 +42301,7 @@ def begin_start_network_trace_slot( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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 @@ -39577,11 +42309,11 @@ def begin_start_network_trace_slot( :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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -39596,7 +42328,8 @@ def begin_start_network_trace_slot( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_03_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -39611,6 +42344,7 @@ def begin_start_network_trace_slot( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -39634,13 +42368,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} # type: ignore + begin_start_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace"} # type: ignore @distributed_trace - def stop_slot( + def stop_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39649,7 +42382,7 @@ def stop_slot( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -39669,18 +42402,25 @@ def stop_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39691,11 +42431,11 @@ def stop_slot( if cls: return cls(pipeline_response, None, {}) - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} # type: ignore + stop_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop"} # type: ignore @distributed_trace - def stop_network_trace_slot( + def stop_network_trace_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39704,7 +42444,7 @@ def stop_network_trace_slot( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -39723,18 +42463,25 @@ def stop_network_trace_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_network_trace_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -39745,11 +42492,11 @@ def stop_network_trace_slot( if cls: return cls(pipeline_response, None, {}) - stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} # type: ignore + stop_network_trace_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository_slot( + def sync_repository_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39758,7 +42505,7 @@ def sync_repository_slot( ) -> None: """Sync web app repository. - Description for 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 @@ -39777,18 +42524,25 @@ def sync_repository_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_repository_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39799,11 +42553,11 @@ def sync_repository_slot( if cls: return cls(pipeline_response, None, {}) - sync_repository_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync'} # type: ignore + sync_repository_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync"} # type: ignore @distributed_trace - def sync_function_triggers_slot( + def sync_function_triggers_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -39812,7 +42566,7 @@ def sync_function_triggers_slot( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -39831,18 +42585,25 @@ def sync_function_triggers_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_function_triggers_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -39853,7 +42614,7 @@ def sync_function_triggers_slot( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers'} # type: ignore + sync_function_triggers_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -39866,7 +42627,7 @@ def list_triggered_web_jobs_slot( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -39882,6 +42643,8 @@ def list_triggered_web_jobs_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -39895,6 +42658,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -39907,6 +42671,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -39924,7 +42689,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -39938,7 +42707,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job_slot( @@ -39951,7 +42720,7 @@ def get_triggered_web_job_slot( ) -> "_models.TriggeredWebJob": """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -39973,6 +42742,8 @@ def get_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -39980,12 +42751,17 @@ def get_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40000,11 +42776,11 @@ def get_triggered_web_job_slot( return deserialized - get_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job_slot( + def delete_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40014,7 +42790,7 @@ def delete_triggered_web_job_slot( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -40036,6 +42812,8 @@ def delete_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -40043,12 +42821,17 @@ def delete_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -40059,7 +42842,7 @@ def delete_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -40073,7 +42856,7 @@ def list_triggered_web_job_history_slot( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -40091,6 +42874,8 @@ def list_triggered_web_job_history_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40105,6 +42890,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) @@ -40118,6 +42904,7 @@ def prepare_request(next_link=None): web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40135,7 +42922,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40149,7 +42940,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history_slot( @@ -40163,8 +42954,7 @@ def get_triggered_web_job_history_slot( ) -> "_models.TriggeredJobHistory": """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -40188,6 +42978,8 @@ def get_triggered_web_job_history_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_triggered_web_job_history_slot_request( resource_group_name=resource_group_name, @@ -40196,12 +42988,17 @@ def get_triggered_web_job_history_slot( id=id, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40216,11 +43013,11 @@ def get_triggered_web_job_history_slot( return deserialized - get_triggered_web_job_history_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job_slot( + def run_triggered_web_job_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40230,7 +43027,7 @@ def run_triggered_web_job_slot( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -40252,6 +43049,8 @@ def run_triggered_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_run_triggered_web_job_slot_request( resource_group_name=resource_group_name, @@ -40259,12 +43058,17 @@ def run_triggered_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40275,7 +43079,7 @@ def run_triggered_web_job_slot( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -40289,7 +43093,7 @@ def list_usages_slot( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -40301,7 +43105,7 @@ def list_usages_slot( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -40310,6 +43114,8 @@ def list_usages_slot( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40323,6 +43129,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages_slot.metadata['url'], ) @@ -40336,6 +43143,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -40354,7 +43162,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40368,7 +43180,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages'} # type: ignore + list_usages_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages"} # type: ignore @distributed_trace def list_vnet_connections_slot( @@ -40380,7 +43192,7 @@ def list_vnet_connections_slot( ) -> List["_models.VnetInfoResource"]: """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. + 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 @@ -40400,18 +43212,25 @@ def list_vnet_connections_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_vnet_connections_slot_request( resource_group_name=resource_group_name, name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40426,7 +43245,7 @@ def list_vnet_connections_slot( return deserialized - list_vnet_connections_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections'} # type: ignore + list_vnet_connections_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -40440,7 +43259,7 @@ def get_vnet_connection_slot( ) -> "_models.VnetInfoResource": """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. + 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 @@ -40462,6 +43281,8 @@ def get_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -40469,12 +43290,17 @@ def get_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40489,7 +43315,7 @@ def get_vnet_connection_slot( return deserialized - get_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40505,8 +43331,8 @@ def create_or_update_vnet_connection_slot( """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). + 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 @@ -40530,6 +43356,7 @@ def create_or_update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfoResource') @@ -40540,6 +43367,7 @@ def create_or_update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_slot.metadata['url'], @@ -40547,7 +43375,11 @@ def create_or_update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40562,11 +43394,11 @@ def create_or_update_vnet_connection_slot( return deserialized - create_or_update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection_slot( + def delete_vnet_connection_slot( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -40576,8 +43408,7 @@ def delete_vnet_connection_slot( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -40599,6 +43430,8 @@ def delete_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_vnet_connection_slot_request( resource_group_name=resource_group_name, @@ -40606,12 +43439,17 @@ def delete_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40622,7 +43460,7 @@ def delete_vnet_connection_slot( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40638,8 +43476,8 @@ def update_vnet_connection_slot( """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). + 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 @@ -40663,6 +43501,7 @@ def update_vnet_connection_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfoResource') @@ -40673,6 +43512,7 @@ def update_vnet_connection_slot( vnet_name=vnet_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_slot.metadata['url'], @@ -40680,7 +43520,11 @@ def update_vnet_connection_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40695,7 +43539,7 @@ def update_vnet_connection_slot( return deserialized - update_vnet_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -40710,7 +43554,7 @@ def get_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Gets an app's Virtual Network gateway. - Description for 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 @@ -40734,6 +43578,8 @@ def get_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_connection_gateway_slot_request( resource_group_name=resource_group_name, @@ -40742,12 +43588,17 @@ def get_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40762,7 +43613,7 @@ def get_vnet_connection_gateway_slot( return deserialized - get_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40778,7 +43629,7 @@ def create_or_update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40804,6 +43655,7 @@ def create_or_update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40815,6 +43667,7 @@ def create_or_update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway_slot.metadata['url'], @@ -40822,7 +43675,11 @@ def create_or_update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40837,7 +43694,7 @@ def create_or_update_vnet_connection_gateway_slot( return deserialized - create_or_update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40853,7 +43710,7 @@ def update_vnet_connection_gateway_slot( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -40879,6 +43736,7 @@ def update_vnet_connection_gateway_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -40890,6 +43748,7 @@ def update_vnet_connection_gateway_slot( gateway_name=gateway_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway_slot.metadata['url'], @@ -40897,7 +43756,11 @@ def update_vnet_connection_gateway_slot( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40912,7 +43775,7 @@ def update_vnet_connection_gateway_slot( return deserialized - update_vnet_connection_gateway_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -40925,7 +43788,7 @@ def list_web_jobs_slot( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -40939,6 +43802,8 @@ def list_web_jobs_slot( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -40952,6 +43817,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs_slot.metadata['url'], ) request = _convert_request(request) @@ -40964,6 +43830,7 @@ def prepare_request(next_link=None): name=name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -40981,7 +43848,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -40995,7 +43866,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs'} # type: ignore + list_web_jobs_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs"} # type: ignore @distributed_trace def get_web_job_slot( @@ -41008,7 +43879,7 @@ def get_web_job_slot( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -41030,6 +43901,8 @@ def get_web_job_slot( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_web_job_slot_request( resource_group_name=resource_group_name, @@ -41037,12 +43910,17 @@ def get_web_job_slot( web_job_name=web_job_name, slot=slot, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job_slot.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41057,7 +43935,7 @@ def get_web_job_slot( return deserialized - get_web_job_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}'} # type: ignore + get_web_job_slot.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}"} # type: ignore @distributed_trace @@ -41070,7 +43948,7 @@ def list_slot_differences_from_production( ) -> Iterable["_models.SlotDifferenceCollection"]: """Get the difference in configuration settings between two web app slots. - Description for Get the difference in configuration settings between two web app slots. + 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 @@ -41085,6 +43963,7 @@ def list_slot_differences_from_production( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SlotDifferenceCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.SlotDifferenceCollection"] @@ -41100,6 +43979,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_slot_differences_from_production.metadata['url'], @@ -41114,6 +43994,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -41133,7 +44014,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41147,9 +44032,9 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_slot_differences_from_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs'} # type: ignore + list_slot_differences_from_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs"} # type: ignore - def _swap_slot_with_production_initial( + def _swap_slot_with_production_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41162,6 +44047,7 @@ def _swap_slot_with_production_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') @@ -41170,6 +44056,7 @@ def _swap_slot_with_production_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._swap_slot_with_production_initial.metadata['url'], @@ -41177,7 +44064,11 @@ def _swap_slot_with_production_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -41187,11 +44078,11 @@ def _swap_slot_with_production_initial( if cls: return cls(pipeline_response, None, {}) - _swap_slot_with_production_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + _swap_slot_with_production_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace - def begin_swap_slot_with_production( + def begin_swap_slot_with_production( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41200,7 +44091,7 @@ def begin_swap_slot_with_production( ) -> LROPoller[None]: """Swaps two deployment slots of an app. - Description for 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 @@ -41220,8 +44111,9 @@ def begin_swap_slot_with_production( :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -41233,6 +44125,7 @@ def begin_swap_slot_with_production( resource_group_name=resource_group_name, name=name, slot_swap_entity=slot_swap_entity, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -41254,10 +44147,9 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_swap_slot_with_production.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap'} # type: ignore + begin_swap_slot_with_production.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap"} # type: ignore @distributed_trace def list_snapshots( @@ -41268,7 +44160,7 @@ def list_snapshots( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user. - Description for 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 @@ -41279,6 +44171,8 @@ def list_snapshots( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41291,6 +44185,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots.metadata['url'], ) request = _convert_request(request) @@ -41302,6 +44197,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41319,7 +44215,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41333,7 +44233,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} # type: ignore + list_snapshots.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots"} # type: ignore @distributed_trace def list_snapshots_from_dr_secondary( @@ -41344,7 +44244,7 @@ def list_snapshots_from_dr_secondary( ) -> Iterable["_models.SnapshotCollection"]: """Returns all Snapshots to the user from DRSecondary endpoint. - Description for 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 @@ -41355,6 +44255,8 @@ def list_snapshots_from_dr_secondary( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SnapshotCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -41367,6 +44269,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_snapshots_from_dr_secondary.metadata['url'], ) request = _convert_request(request) @@ -41378,6 +44281,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -41395,7 +44299,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41409,7 +44317,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} # type: ignore + list_snapshots_from_dr_secondary.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr"} # type: ignore @distributed_trace def get_source_control( @@ -41420,7 +44328,7 @@ def get_source_control( ) -> "_models.SiteSourceControl": """Gets the source control configuration of an app. - Description for 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 @@ -41437,17 +44345,24 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -41469,7 +44384,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + get_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore def _create_or_update_source_control_initial( @@ -41485,6 +44400,7 @@ def _create_or_update_source_control_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -41493,6 +44409,7 @@ def _create_or_update_source_control_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self._create_or_update_source_control_initial.metadata['url'], @@ -41500,7 +44417,11 @@ def _create_or_update_source_control_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -41521,7 +44442,7 @@ def _create_or_update_source_control_initial( return deserialized - _create_or_update_source_control_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + _create_or_update_source_control_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -41534,7 +44455,7 @@ def begin_create_or_update_source_control( ) -> LROPoller["_models.SiteSourceControl"]: """Updates the source control configuration of an app. - Description for 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 @@ -41555,8 +44476,9 @@ def begin_create_or_update_source_control( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.web.v2021_03_01.models.SiteSourceControl] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.SiteSourceControl"] lro_delay = kwargs.pop( 'polling_interval', @@ -41568,6 +44490,7 @@ def begin_create_or_update_source_control( resource_group_name=resource_group_name, name=name, site_source_control=site_source_control, + api_version=api_version, content_type=content_type, cls=lambda x,y,z: x, **kwargs @@ -41592,13 +44515,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + begin_create_or_update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def delete_source_control( + def delete_source_control( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41607,13 +44529,13 @@ def delete_source_control( ) -> None: """Deletes the source control configuration of an app. - Description for 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 additional_flags: + :param additional_flags: Default value is None. :type additional_flags: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -41626,18 +44548,25 @@ def delete_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_source_control_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, additional_flags=additional_flags, template_url=self.delete_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -41648,7 +44577,7 @@ def delete_source_control( if cls: return cls(pipeline_response, None, {}) - delete_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + delete_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace @@ -41661,7 +44590,7 @@ def update_source_control( ) -> "_models.SiteSourceControl": """Updates the source control configuration of an app. - Description for 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 @@ -41680,6 +44609,7 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(site_source_control, 'SiteSourceControl') @@ -41688,6 +44618,7 @@ def update_source_control( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -41695,7 +44626,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 201, 202]: @@ -41717,11 +44652,11 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web'} # type: ignore + update_source_control.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web"} # type: ignore @distributed_trace - def start( + def start( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41729,7 +44664,7 @@ def start( ) -> None: """Starts an app (or deployment slot, if specified). - Description for 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 @@ -41746,17 +44681,24 @@ def start( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.start.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41767,7 +44709,7 @@ def start( if cls: return cls(pipeline_response, None, {}) - start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} # type: ignore + start.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start"} # type: ignore def _start_network_trace_initial( @@ -41785,11 +44727,14 @@ def _start_network_trace_initial( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_start_network_trace_request_initial( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, @@ -41798,7 +44743,11 @@ def _start_network_trace_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -41816,7 +44765,7 @@ def _start_network_trace_initial( return deserialized - _start_network_trace_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + _start_network_trace_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace @@ -41831,17 +44780,17 @@ def begin_start_network_trace( ) -> LROPoller[List["_models.NetworkTrace"]]: """Start capturing network packets for the site. - Description for 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. + :param duration_in_seconds: The duration to keep capturing in seconds. Default value is None. :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). + :param max_frame_length: The maximum frame length in bytes (Optional). Default value is None. :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. + :param sas_url: The Blob URL to store capture file. Default value is None. :type sas_url: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -41856,7 +44805,8 @@ def begin_start_network_trace( :rtype: ~azure.core.polling.LROPoller[list[~azure.mgmt.web.v2021_03_01.models.NetworkTrace]] :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[List["_models.NetworkTrace"]] lro_delay = kwargs.pop( 'polling_interval', @@ -41870,6 +44820,7 @@ def begin_start_network_trace( duration_in_seconds=duration_in_seconds, max_frame_length=max_frame_length, sas_url=sas_url, + api_version=api_version, cls=lambda x,y,z: x, **kwargs ) @@ -41893,13 +44844,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} # type: ignore + begin_start_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace"} # type: ignore @distributed_trace - def stop( + def stop( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41907,7 +44857,7 @@ def stop( ) -> None: """Stops an app (or deployment slot, if specified). - Description for 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 @@ -41924,17 +44874,24 @@ def stop( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -41945,11 +44902,11 @@ def stop( if cls: return cls(pipeline_response, None, {}) - stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} # type: ignore + stop.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop"} # type: ignore @distributed_trace - def stop_network_trace( + def stop_network_trace( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -41957,7 +44914,7 @@ def stop_network_trace( ) -> None: """Stop ongoing capturing network packets for the site. - Description for 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 @@ -41974,17 +44931,24 @@ def stop_network_trace( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_stop_network_trace_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.stop_network_trace.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -41995,11 +44959,11 @@ def stop_network_trace( if cls: return cls(pipeline_response, None, {}) - stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} # type: ignore + stop_network_trace.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace"} # type: ignore @distributed_trace - def sync_repository( + def sync_repository( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42007,7 +44971,7 @@ def sync_repository( ) -> None: """Sync web app repository. - Description for 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 @@ -42024,17 +44988,24 @@ def sync_repository( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_repository_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_repository.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42045,11 +45016,11 @@ def sync_repository( if cls: return cls(pipeline_response, None, {}) - sync_repository.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync'} # type: ignore + sync_repository.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync"} # type: ignore @distributed_trace - def sync_function_triggers( + def sync_function_triggers( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42057,7 +45028,7 @@ def sync_function_triggers( ) -> None: """Syncs function trigger metadata to the management database. - Description for 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 @@ -42074,17 +45045,24 @@ def sync_function_triggers( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_sync_function_triggers_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.sync_function_triggers.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -42095,7 +45073,7 @@ def sync_function_triggers( if cls: return cls(pipeline_response, None, {}) - sync_function_triggers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers'} # type: ignore + sync_function_triggers.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers"} # type: ignore @distributed_trace @@ -42107,7 +45085,7 @@ def list_triggered_web_jobs( ) -> Iterable["_models.TriggeredWebJobCollection"]: """List triggered web jobs for an app, or a deployment slot. - Description for List triggered web jobs for an app, or a deployment slot. + 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 @@ -42120,6 +45098,8 @@ def list_triggered_web_jobs( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.TriggeredWebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredWebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -42132,6 +45112,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -42143,6 +45124,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -42160,7 +45142,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42174,7 +45160,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs'} # type: ignore + list_triggered_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs"} # type: ignore @distributed_trace def get_triggered_web_job( @@ -42186,7 +45172,7 @@ def get_triggered_web_job( ) -> "_models.TriggeredWebJob": """Gets a triggered web job by its ID for an app, or a deployment slot. - Description for Gets a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -42205,18 +45191,25 @@ def get_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42231,11 +45224,11 @@ def get_triggered_web_job( return deserialized - get_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + get_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace - def delete_triggered_web_job( + def delete_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42244,7 +45237,7 @@ def delete_triggered_web_job( ) -> None: """Delete a triggered web job by its ID for an app, or a deployment slot. - Description for Delete a triggered web job by its ID for an app, or a deployment slot. + 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 @@ -42263,18 +45256,25 @@ def delete_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -42285,7 +45285,7 @@ def delete_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - delete_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}'} # type: ignore + delete_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}"} # type: ignore @distributed_trace @@ -42298,7 +45298,7 @@ def list_triggered_web_job_history( ) -> Iterable["_models.TriggeredJobHistoryCollection"]: """List a triggered web job's history for an app, or a deployment slot. - Description for List a triggered web job's history for an app, or a deployment slot. + 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 @@ -42313,6 +45313,8 @@ def list_triggered_web_job_history( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.TriggeredJobHistoryCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.TriggeredJobHistoryCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -42326,6 +45328,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) @@ -42338,6 +45341,7 @@ def prepare_request(next_link=None): name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -42355,7 +45359,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42369,7 +45377,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history'} # type: ignore + list_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history"} # type: ignore @distributed_trace def get_triggered_web_job_history( @@ -42382,8 +45390,7 @@ def get_triggered_web_job_history( ) -> "_models.TriggeredJobHistory": """Gets a triggered web job's history by its ID for an app, , or a deployment slot. - Description for Gets a triggered web job's history by its ID for an app, , or a deployment - slot. + 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 @@ -42404,6 +45411,8 @@ def get_triggered_web_job_history( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_triggered_web_job_history_request( resource_group_name=resource_group_name, @@ -42411,12 +45420,17 @@ def get_triggered_web_job_history( web_job_name=web_job_name, id=id, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_triggered_web_job_history.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42431,11 +45445,11 @@ def get_triggered_web_job_history( return deserialized - get_triggered_web_job_history.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}'} # type: ignore + get_triggered_web_job_history.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}"} # type: ignore @distributed_trace - def run_triggered_web_job( + def run_triggered_web_job( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42444,7 +45458,7 @@ def run_triggered_web_job( ) -> None: """Run a triggered web job for an app, or a deployment slot. - Description for Run a triggered web job for an app, or a deployment slot. + 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 @@ -42463,18 +45477,25 @@ def run_triggered_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_run_triggered_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.run_triggered_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42485,7 +45506,7 @@ def run_triggered_web_job( if cls: return cls(pipeline_response, None, {}) - run_triggered_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run'} # type: ignore + run_triggered_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run"} # type: ignore @distributed_trace @@ -42498,7 +45519,7 @@ def list_usages( ) -> Iterable["_models.CsmUsageQuotaCollection"]: """Gets the quota usage information of an app (or deployment slot, if specified). - Description for Gets the quota usage information of an app (or deployment slot, if specified). + 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 @@ -42507,7 +45528,7 @@ def list_usages( :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]'. + duration'[Hour|Minute|Day]'. Default value is None. :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CsmUsageQuotaCollection or the result of @@ -42516,6 +45537,8 @@ def list_usages( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CsmUsageQuotaCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CsmUsageQuotaCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -42528,6 +45551,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=self.list_usages.metadata['url'], ) @@ -42540,6 +45564,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, filter=filter, template_url=next_link, ) @@ -42558,7 +45583,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42572,7 +45601,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages'} # type: ignore + list_usages.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages"} # type: ignore @distributed_trace def list_vnet_connections( @@ -42583,7 +45612,7 @@ def list_vnet_connections( ) -> List["_models.VnetInfoResource"]: """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. + 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 @@ -42600,17 +45629,24 @@ def list_vnet_connections( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_vnet_connections_request( resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_vnet_connections.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42625,7 +45661,7 @@ def list_vnet_connections( return deserialized - list_vnet_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections'} # type: ignore + list_vnet_connections.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections"} # type: ignore @distributed_trace @@ -42638,7 +45674,7 @@ def get_vnet_connection( ) -> "_models.VnetInfoResource": """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. + 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 @@ -42657,18 +45693,25 @@ def get_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42683,7 +45726,7 @@ def get_vnet_connection( return deserialized - get_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + get_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42698,8 +45741,8 @@ def create_or_update_vnet_connection( """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). + 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 @@ -42720,6 +45763,7 @@ def create_or_update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfoResource') @@ -42729,6 +45773,7 @@ def create_or_update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection.metadata['url'], @@ -42736,7 +45781,11 @@ def create_or_update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42751,11 +45800,11 @@ def create_or_update_vnet_connection( return deserialized - create_or_update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + create_or_update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace - def delete_vnet_connection( + def delete_vnet_connection( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, name: str, @@ -42764,8 +45813,7 @@ def delete_vnet_connection( ) -> None: """Deletes a connection from an app (or deployment slot to a named virtual network. - Description for Deletes a connection from an app (or deployment slot to a named virtual - network. + 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 @@ -42784,18 +45832,25 @@ def delete_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_delete_vnet_connection_request( resource_group_name=resource_group_name, name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.delete_vnet_connection.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42806,7 +45861,7 @@ def delete_vnet_connection( if cls: return cls(pipeline_response, None, {}) - delete_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + delete_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42821,8 +45876,8 @@ def update_vnet_connection( """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). + 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 @@ -42843,6 +45898,7 @@ def update_vnet_connection( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetInfoResource') @@ -42852,6 +45908,7 @@ def update_vnet_connection( name=name, vnet_name=vnet_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection.metadata['url'], @@ -42859,7 +45916,11 @@ def update_vnet_connection( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42874,7 +45935,7 @@ def update_vnet_connection( return deserialized - update_vnet_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}'} # type: ignore + update_vnet_connection.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}"} # type: ignore @distributed_trace @@ -42888,7 +45949,7 @@ def get_vnet_connection_gateway( ) -> "_models.VnetGateway": """Gets an app's Virtual Network gateway. - Description for 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 @@ -42909,6 +45970,8 @@ def get_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_vnet_connection_gateway_request( resource_group_name=resource_group_name, @@ -42916,12 +45979,17 @@ def get_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_vnet_connection_gateway.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -42936,7 +46004,7 @@ def get_vnet_connection_gateway( return deserialized - get_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + get_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -42951,7 +46019,7 @@ def create_or_update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -42974,6 +46042,7 @@ def create_or_update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -42984,6 +46053,7 @@ def create_or_update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.create_or_update_vnet_connection_gateway.metadata['url'], @@ -42991,7 +46061,11 @@ def create_or_update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -43006,7 +46080,7 @@ def create_or_update_vnet_connection_gateway( return deserialized - create_or_update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + create_or_update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -43021,7 +46095,7 @@ def update_vnet_connection_gateway( ) -> "_models.VnetGateway": """Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + 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 @@ -43044,6 +46118,7 @@ def update_vnet_connection_gateway( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(connection_envelope, 'VnetGateway') @@ -43054,6 +46129,7 @@ def update_vnet_connection_gateway( vnet_name=vnet_name, gateway_name=gateway_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_vnet_connection_gateway.metadata['url'], @@ -43061,7 +46137,11 @@ def update_vnet_connection_gateway( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -43076,7 +46156,7 @@ def update_vnet_connection_gateway( return deserialized - update_vnet_connection_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}'} # type: ignore + update_vnet_connection_gateway.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}"} # type: ignore @distributed_trace @@ -43088,7 +46168,7 @@ def list_web_jobs( ) -> Iterable["_models.WebJobCollection"]: """List webjobs for an app, or a deployment slot. - Description for 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 @@ -43099,6 +46179,8 @@ def list_web_jobs( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.WebJobCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebJobCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -43111,6 +46193,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_web_jobs.metadata['url'], ) request = _convert_request(request) @@ -43122,6 +46205,7 @@ def prepare_request(next_link=None): resource_group_name=resource_group_name, name=name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -43139,7 +46223,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -43153,7 +46241,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_web_jobs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs'} # type: ignore + list_web_jobs.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs"} # type: ignore @distributed_trace def get_web_job( @@ -43165,7 +46253,7 @@ def get_web_job( ) -> "_models.WebJob": """Get webjob information for an app, or a deployment slot. - Description for 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 @@ -43184,18 +46272,25 @@ def get_web_job( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_web_job_request( resource_group_name=resource_group_name, name=name, web_job_name=web_job_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_web_job.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -43210,5 +46305,5 @@ def get_web_job( return deserialized - get_web_job.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}'} # type: ignore + get_web_job.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}"} # type: ignore diff --git a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_web_site_management_client_operations.py b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_web_site_management_client_operations.py index 05b132038110..da08ed21b577 100644 --- a/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_web_site_management_client_operations.py +++ b/sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2021_03_01/operations/_web_site_management_client_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import functools -from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union -import warnings +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -16,7 +17,6 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section @@ -30,24 +30,25 @@ def build_get_publishing_user_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -58,28 +59,28 @@ def build_update_publishing_user_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/publishingUsers/web') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/publishingUsers/web") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -89,24 +90,25 @@ def build_update_publishing_user_request( def build_list_source_controls_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols") # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -115,29 +117,30 @@ def build_get_source_control_request( source_control_type: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -149,33 +152,33 @@ def build_update_source_control_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}') + _url = kwargs.pop("template_url", "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") path_format_arguments = { "sourceControlType": _SERIALIZER.url("source_control_type", source_control_type, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -189,33 +192,34 @@ def build_list_billing_meters_request( os_type: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if billing_location is not None: - query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') + _query_parameters['billingLocation'] = _SERIALIZER.query("billing_location", billing_location, 'str') if os_type is not None: - query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['osType'] = _SERIALIZER.query("os_type", os_type, 'str') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -227,33 +231,33 @@ def build_check_name_availability_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -264,29 +268,30 @@ def build_list_custom_host_name_sites_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -295,29 +300,30 @@ def build_get_subscription_deployment_locations_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -331,37 +337,38 @@ def build_list_geo_regions_request( linux_dynamic_workers_enabled: Optional[bool] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] if sku is not None: - query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') + _query_parameters['sku'] = _SERIALIZER.query("sku", sku, 'str') if linux_workers_enabled is not None: - query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') + _query_parameters['linuxWorkersEnabled'] = _SERIALIZER.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: - query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + _query_parameters['xenonWorkersEnabled'] = _SERIALIZER.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') if linux_dynamic_workers_enabled is not None: - query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters['linuxDynamicWorkersEnabled'] = _SERIALIZER.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -373,33 +380,33 @@ def build_list_site_identifiers_assigned_to_host_name_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -410,29 +417,30 @@ def build_list_premier_add_on_offers_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -441,29 +449,30 @@ def build_list_skus_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-03-01" + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, **kwargs ) @@ -475,33 +484,33 @@ def build_verify_hosting_environment_vnet_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -516,34 +525,34 @@ def build_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -558,34 +567,34 @@ def build_validate_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -600,34 +609,34 @@ def build_validate_move_request( content: Any = None, **kwargs: Any ) -> HttpRequest: + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-03-01" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources') + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - url = _format_url_section(url, **path_format_arguments) + _url = _format_url_section(_url, **path_format_arguments) # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=url, - params=query_parameters, - headers=header_parameters, + url=_url, + params=_query_parameters, + headers=_header_parameters, json=json, content=content, **kwargs @@ -642,7 +651,7 @@ def get_publishing_user( ) -> "_models.User": """Gets publishing user. - Description for Gets publishing user. + Gets publishing user. :keyword callable cls: A custom type or function that will be passed the direct response :return: User, or the result of cls(response) @@ -655,14 +664,21 @@ def get_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_publishing_user_request( + api_version=api_version, template_url=self.get_publishing_user.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -677,7 +693,7 @@ def get_publishing_user( return deserialized - get_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + get_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -688,7 +704,7 @@ def update_publishing_user( ) -> "_models.User": """Updates publishing user. - Description for Updates publishing user. + Updates publishing user. :param user_details: Details of publishing user. :type user_details: ~azure.mgmt.web.v2021_03_01.models.User @@ -703,11 +719,13 @@ def update_publishing_user( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(user_details, 'User') request = build_update_publishing_user_request( + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_publishing_user.metadata['url'], @@ -715,7 +733,11 @@ def update_publishing_user( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -730,7 +752,7 @@ def update_publishing_user( return deserialized - update_publishing_user.metadata = {'url': '/providers/Microsoft.Web/publishingUsers/web'} # type: ignore + update_publishing_user.metadata = {'url': "/providers/Microsoft.Web/publishingUsers/web"} # type: ignore @distributed_trace @@ -740,7 +762,7 @@ def list_source_controls( ) -> Iterable["_models.SourceControlCollection"]: """Gets the source controls available for Azure websites. - Description for Gets the source controls available for Azure websites. + Gets the source controls available for Azure websites. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SourceControlCollection or the result of @@ -749,6 +771,8 @@ def list_source_controls( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.SourceControlCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.SourceControlCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -758,6 +782,7 @@ def prepare_request(next_link=None): if not next_link: request = build_list_source_controls_request( + api_version=api_version, template_url=self.list_source_controls.metadata['url'], ) request = _convert_request(request) @@ -766,6 +791,7 @@ def prepare_request(next_link=None): else: request = build_list_source_controls_request( + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -783,7 +809,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -797,7 +827,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_source_controls.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols'} # type: ignore + list_source_controls.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols"} # type: ignore @distributed_trace def get_source_control( @@ -807,7 +837,7 @@ def get_source_control( ) -> "_models.SourceControl": """Gets source control token. - Description for Gets source control token. + Gets source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -822,15 +852,22 @@ def get_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_source_control_request( source_control_type=source_control_type, + api_version=api_version, template_url=self.get_source_control.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -845,7 +882,7 @@ def get_source_control( return deserialized - get_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + get_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -857,7 +894,7 @@ def update_source_control( ) -> "_models.SourceControl": """Updates source control token. - Description for Updates source control token. + Updates source control token. :param source_control_type: Type of source control. :type source_control_type: str @@ -874,12 +911,14 @@ def update_source_control( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(request_message, 'SourceControl') request = build_update_source_control_request( source_control_type=source_control_type, + api_version=api_version, content_type=content_type, json=_json, template_url=self.update_source_control.metadata['url'], @@ -887,7 +926,11 @@ def update_source_control( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -902,7 +945,7 @@ def update_source_control( return deserialized - update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} # type: ignore + update_source_control.metadata = {'url': "/providers/Microsoft.Web/sourcecontrols/{sourceControlType}"} # type: ignore @distributed_trace @@ -914,11 +957,11 @@ def list_billing_meters( ) -> Iterable["_models.BillingMeterCollection"]: """Gets a list of meters for a given location. - Description for 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. + :param billing_location: Azure Location of billable resource. Default value is None. :type billing_location: str - :param os_type: App Service OS type meters used for. + :param os_type: App Service OS type meters used for. Default value is None. :type os_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BillingMeterCollection or the result of @@ -926,6 +969,8 @@ def list_billing_meters( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.BillingMeterCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.BillingMeterCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -936,6 +981,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=self.list_billing_meters.metadata['url'], @@ -947,6 +993,7 @@ def prepare_request(next_link=None): request = build_list_billing_meters_request( subscription_id=self._config.subscription_id, + api_version=api_version, billing_location=billing_location, os_type=os_type, template_url=next_link, @@ -966,7 +1013,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -980,7 +1031,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} # type: ignore + list_billing_meters.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters"} # type: ignore @distributed_trace def check_name_availability( @@ -992,13 +1043,13 @@ def check_name_availability( ) -> "_models.ResourceNameAvailability": """Check if a resource name is available. - Description for 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. :type type: str or ~azure.mgmt.web.v2021_03_01.models.CheckNameResourceTypes - :param is_fqdn: Is fully qualified domain name. + :param is_fqdn: Is fully qualified domain name. Default value is None. :type is_fqdn: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: ResourceNameAvailability, or the result of cls(response) @@ -1011,6 +1062,7 @@ def check_name_availability( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _request = _models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -1018,6 +1070,7 @@ def check_name_availability( request = build_check_name_availability_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.check_name_availability.metadata['url'], @@ -1025,7 +1078,11 @@ def check_name_availability( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1040,7 +1097,7 @@ def check_name_availability( return deserialized - check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability'} # type: ignore + check_name_availability.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"} # type: ignore @distributed_trace @@ -1059,6 +1116,8 @@ def list_custom_host_name_sites( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.CustomHostnameSitesCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomHostnameSitesCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1069,6 +1128,7 @@ def prepare_request(next_link=None): request = build_list_custom_host_name_sites_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_custom_host_name_sites.metadata['url'], ) request = _convert_request(request) @@ -1078,6 +1138,7 @@ def prepare_request(next_link=None): request = build_list_custom_host_name_sites_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1095,7 +1156,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1109,7 +1174,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_custom_host_name_sites.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites'} # type: ignore + list_custom_host_name_sites.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites"} # type: ignore @distributed_trace def get_subscription_deployment_locations( @@ -1118,7 +1183,7 @@ def get_subscription_deployment_locations( ) -> "_models.DeploymentLocations": """Gets list of available geo regions plus ministamps. - Description for Gets list of available geo regions plus ministamps. + Gets list of available geo regions plus ministamps. :keyword callable cls: A custom type or function that will be passed the direct response :return: DeploymentLocations, or the result of cls(response) @@ -1131,15 +1196,22 @@ def get_subscription_deployment_locations( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_get_subscription_deployment_locations_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.get_subscription_deployment_locations.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1154,7 +1226,7 @@ def get_subscription_deployment_locations( return deserialized - get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} # type: ignore + get_subscription_deployment_locations.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations"} # type: ignore @distributed_trace @@ -1168,24 +1240,26 @@ def list_geo_regions( ) -> Iterable["_models.GeoRegionCollection"]: """Get a list of available geographical regions. - Description for Get a list of available geographical regions. + Get a list of available geographical regions. - :param sku: Name of SKU used to filter the regions. + :param sku: Name of SKU used to filter the regions. Default value is None. :type sku: str or ~azure.mgmt.web.v2021_03_01.models.SkuName :param linux_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Linux workers. + regions that support Linux workers. Default value is None. :type linux_workers_enabled: bool :param xenon_workers_enabled: Specify :code:`true` if you want to filter to only - regions that support Xenon workers. + regions that support Xenon workers. Default value is None. :type xenon_workers_enabled: bool :param linux_dynamic_workers_enabled: Specify :code:`true` if you want to filter - to only regions that support Linux Consumption Workers. + to only regions that support Linux Consumption Workers. Default value is None. :type linux_dynamic_workers_enabled: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GeoRegionCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.GeoRegionCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.GeoRegionCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1196,6 +1270,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1209,6 +1284,7 @@ def prepare_request(next_link=None): request = build_list_geo_regions_request( subscription_id=self._config.subscription_id, + api_version=api_version, sku=sku, linux_workers_enabled=linux_workers_enabled, xenon_workers_enabled=xenon_workers_enabled, @@ -1230,7 +1306,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1244,7 +1324,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_geo_regions.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions'} # type: ignore + list_geo_regions.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions"} # type: ignore @distributed_trace def list_site_identifiers_assigned_to_host_name( @@ -1254,7 +1334,7 @@ def list_site_identifiers_assigned_to_host_name( ) -> Iterable["_models.IdentifierCollection"]: """List all apps that are assigned to a hostname. - Description for List all apps that are assigned to a hostname. + List all apps that are assigned to a hostname. :param name_identifier: Hostname information. :type name_identifier: ~azure.mgmt.web.v2021_03_01.models.NameIdentifier @@ -1264,6 +1344,7 @@ def list_site_identifiers_assigned_to_host_name( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.IdentifierCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] cls = kwargs.pop('cls', None) # type: ClsType["_models.IdentifierCollection"] @@ -1277,6 +1358,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.list_site_identifiers_assigned_to_host_name.metadata['url'], @@ -1289,6 +1371,7 @@ def prepare_request(next_link=None): request = build_list_site_identifiers_assigned_to_host_name_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=next_link, @@ -1308,7 +1391,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1322,7 +1409,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_site_identifiers_assigned_to_host_name.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName'} # type: ignore + list_site_identifiers_assigned_to_host_name.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName"} # type: ignore @distributed_trace def list_premier_add_on_offers( @@ -1331,7 +1418,7 @@ def list_premier_add_on_offers( ) -> Iterable["_models.PremierAddOnOfferCollection"]: """List all premier add-on offers. - Description for List all premier add-on offers. + List all premier add-on offers. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PremierAddOnOfferCollection or the result of @@ -1340,6 +1427,8 @@ def list_premier_add_on_offers( ~azure.core.paging.ItemPaged[~azure.mgmt.web.v2021_03_01.models.PremierAddOnOfferCollection] :raises: ~azure.core.exceptions.HttpResponseError """ + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.PremierAddOnOfferCollection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1350,6 +1439,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_premier_add_on_offers.metadata['url'], ) request = _convert_request(request) @@ -1359,6 +1449,7 @@ def prepare_request(next_link=None): request = build_list_premier_add_on_offers_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=next_link, ) request = _convert_request(request) @@ -1376,7 +1467,11 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1390,7 +1485,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_premier_add_on_offers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers'} # type: ignore + list_premier_add_on_offers.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers"} # type: ignore @distributed_trace def list_skus( @@ -1399,7 +1494,7 @@ def list_skus( ) -> "_models.SkuInfos": """List all SKUs. - Description for List all SKUs. + List all SKUs. :keyword callable cls: A custom type or function that will be passed the direct response :return: SkuInfos, or the result of cls(response) @@ -1412,15 +1507,22 @@ def list_skus( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str + request = build_list_skus_request( subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self.list_skus.metadata['url'], ) request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1435,7 +1537,7 @@ def list_skus( return deserialized - list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus'} # type: ignore + list_skus.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/skus"} # type: ignore @distributed_trace @@ -1447,8 +1549,8 @@ def verify_hosting_environment_vnet( """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. + 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.v2021_03_01.models.VnetParameters @@ -1463,12 +1565,14 @@ def verify_hosting_environment_vnet( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(parameters, 'VnetParameters') request = build_verify_hosting_environment_vnet_request( subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.verify_hosting_environment_vnet.metadata['url'], @@ -1476,7 +1580,11 @@ def verify_hosting_environment_vnet( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1491,11 +1599,11 @@ def verify_hosting_environment_vnet( return deserialized - verify_hosting_environment_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet'} # type: ignore + verify_hosting_environment_vnet.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet"} # type: ignore @distributed_trace - def move( + def move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1503,7 +1611,7 @@ def move( ) -> None: """Move resources between resource groups. - Description for 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 @@ -1520,6 +1628,7 @@ def move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1527,6 +1636,7 @@ def move( request = build_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.move.metadata['url'], @@ -1534,7 +1644,11 @@ def move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1545,7 +1659,7 @@ def move( if cls: return cls(pipeline_response, None, {}) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources'} # type: ignore + move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources"} # type: ignore @distributed_trace @@ -1557,7 +1671,7 @@ def validate( ) -> "_models.ValidateResponse": """Validate if a resource can be created. - Description for 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 @@ -1574,6 +1688,7 @@ def validate( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(validate_request, 'ValidateRequest') @@ -1581,6 +1696,7 @@ def validate( request = build_validate_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate.metadata['url'], @@ -1588,7 +1704,11 @@ def validate( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: @@ -1603,11 +1723,11 @@ def validate( return deserialized - validate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate'} # type: ignore + validate.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate"} # type: ignore @distributed_trace - def validate_move( + def validate_move( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, move_resource_envelope: "_models.CsmMoveResourceEnvelope", @@ -1615,7 +1735,7 @@ def validate_move( ) -> None: """Validate whether a resource can be moved. - Description for 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 @@ -1632,6 +1752,7 @@ def validate_move( } error_map.update(kwargs.pop('error_map', {})) + api_version = kwargs.pop('api_version', "2021-03-01") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(move_resource_envelope, 'CsmMoveResourceEnvelope') @@ -1639,6 +1760,7 @@ def validate_move( request = build_validate_move_request( resource_group_name=resource_group_name, subscription_id=self._config.subscription_id, + api_version=api_version, content_type=content_type, json=_json, template_url=self.validate_move.metadata['url'], @@ -1646,7 +1768,11 @@ def validate_move( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [204]: @@ -1657,5 +1783,5 @@ def validate_move( if cls: return cls(pipeline_response, None, {}) - validate_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources'} # type: ignore + validate_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources"} # type: ignore